#include <cds_resource.h>
Definition at line 48 of file cds_resource.h.
| CdsResource::CdsResource | ( | int | handlerType | ) |
creates a new resource object.
The CdsResource object represents a <res> tag in the DIDL-Lite XML.
| handler_type | id of the associated handler |
Definition at line 43 of file cds_resource.cc.
References attributes, options, and parameters.
| CdsResource::CdsResource | ( | int | handlerType, | |
| zmm::Ref< Dictionary > | attributes, | |||
| zmm::Ref< Dictionary > | parameters, | |||
| zmm::Ref< Dictionary > | options | |||
| ) |
Definition at line 50 of file cds_resource.cc.
| void CdsResource::addAttribute | ( | zmm::String | name, | |
| zmm::String | value | |||
| ) |
Adds a resource attribute.
This maps to an attribute of the <res> tag in the DIDL-Lite XML.
| name | attribute name | |
| value | attribute value |
Definition at line 61 of file cds_resource.cc.
References attributes.
| void CdsResource::addOption | ( | zmm::String | name, | |
| zmm::String | value | |||
| ) |
Add an option to the resource.
The options are internal, they do not appear in the URL or in the XML but can be used for any purpose.
Definition at line 82 of file cds_resource.cc.
References options.
| void CdsResource::addParameter | ( | zmm::String | name, | |
| zmm::String | value | |||
| ) |
Adds a parameter (will be appended to the URL).
The parameters will be appended to the object URL in the DIDL-Lite XML. This is useful for cases, where you need to identify specific options, i.e. something that is only relevant to a particular metadata handler and so on. The parameters will be automatically URL encoded.
| name | parameter name | |
| value | parameter value |
Definition at line 77 of file cds_resource.cc.
References parameters.
| Ref< CdsResource > CdsResource::clone | ( | ) |
Definition at line 132 of file cds_resource.cc.
References attributes, CdsResource(), handlerType, options, and parameters.
| Ref< CdsResource > CdsResource::decode | ( | zmm::String | serial | ) | [static] |
Definition at line 154 of file cds_resource.cc.
References _, _Exception, CdsResource(), handlerType, RESOURCE_PART_SEP, and split_string().
Referenced by SQLStorage::createObjectFromRow().
| String CdsResource::encode | ( | ) |
Definition at line 140 of file cds_resource.cc.
References attributes, handlerType, options, parameters, and RESOURCE_PART_SEP.
| bool CdsResource::equals | ( | zmm::Ref< CdsResource > | other | ) |
Definition at line 122 of file cds_resource.cc.
References attributes, handlerType, options, and parameters.
| String CdsResource::getAttribute | ( | zmm::String | name | ) |
Definition at line 107 of file cds_resource.cc.
References attributes.
| Ref< Dictionary > CdsResource::getAttributes | ( | ) |
Definition at line 92 of file cds_resource.cc.
References attributes.
| int CdsResource::getHandlerType | ( | ) |
Definition at line 87 of file cds_resource.cc.
References handlerType.
| String CdsResource::getOption | ( | zmm::String | name | ) |
Definition at line 117 of file cds_resource.cc.
References options.
| Ref< Dictionary > CdsResource::getOptions | ( | ) |
Definition at line 102 of file cds_resource.cc.
References options.
| String CdsResource::getParameter | ( | zmm::String | name | ) |
Definition at line 112 of file cds_resource.cc.
References parameters.
| Ref< Dictionary > CdsResource::getParameters | ( | ) |
Definition at line 97 of file cds_resource.cc.
References parameters.
| int Object::getRefCount | ( | ) | [inherited] |
Definition at line 78 of file object.cc.
References zmm::Object::_ref_count, and atomic_get().
| void CdsResource::mergeAttributes | ( | zmm::Ref< Dictionary > | additional | ) |
Merge existing attributes with new ones.
Definition at line 71 of file cds_resource.cc.
References attributes.
| void Object::operator delete | ( | void * | ptr | ) | [static, inherited] |
| void * Object::operator new | ( | size_t | size | ) | [static, inherited] |
| void CdsResource::optimize | ( | ) |
Frees unnecessary memory.
Definition at line 181 of file cds_resource.cc.
References attributes, options, and parameters.
| void Object::release | ( | ) | [inherited] |
Definition at line 66 of file object.cc.
References zmm::Object::_ref_count, atomic_dec(), and zmm::Object::mutex.
Referenced by zmm::ArrayBase::clear(), zmm::String::operator=(), DSOHash< zmm::Array< CacheObject > >::releaseData(), DSBHash< VT >::releaseData(), DSOHash< zmm::Array< CacheObject > >::remove(), zmm::ArrayBase::remove(), zmm::ArrayBase::removeUnordered(), zmm::ArrayBase::set(), zmm::ArrayBase::~ArrayBase(), DSOHash< zmm::Array< CacheObject > >::~DSOHash(), zmm::ObjectQueue< AutoscanDirectory >::~ObjectQueue(), zmm::ObjectStack< Element >::~ObjectStack(), and zmm::String::~String().
| void CdsResource::removeAttribute | ( | zmm::String | name | ) |
Removes a resource attribute.
| name | attribute name |
Definition at line 66 of file cds_resource.cc.
References attributes.
| void Object::retain | ( | ) | [inherited] |
Definition at line 58 of file object.cc.
References zmm::Object::_ref_count, atomic_inc(), and zmm::Object::mutex.
Referenced by zmm::ArrayBase::append(), zmm::ObjectQueue< AutoscanDirectory >::enqueue(), zmm::ArrayBase::insert(), zmm::String::operator=(), zmm::ObjectStack< Element >::push(), DSOHash< zmm::Array< CacheObject > >::put(), DSBHash< VT >::put(), zmm::ArrayBase::set(), and zmm::String::String().
mt_atomic_t zmm::Object::_ref_count [protected, inherited] |
Definition at line 54 of file object.h.
Referenced by zmm::Object::getRefCount(), zmm::Object::Object(), zmm::Object::release(), and zmm::Object::retain().
zmm::Ref<Dictionary> CdsResource::attributes [protected] |
Definition at line 52 of file cds_resource.h.
Referenced by addAttribute(), CdsResource(), clone(), encode(), equals(), getAttribute(), getAttributes(), mergeAttributes(), optimize(), and removeAttribute().
int CdsResource::handlerType [protected] |
Definition at line 51 of file cds_resource.h.
Referenced by clone(), decode(), encode(), equals(), and getHandlerType().
pthread_mutex_t zmm::Object::mutex [protected, inherited] |
Reimplemented in AutoscanList, AutoscanInotify, CachedURL, Dictionary_r, DVDNavReader, IOHandlerBufferHelper, ReentrantArray< T >, SingletonManager, Singleton< T >, StorageCache, MutexAutolock, Cond, ThreadExecutor, Singleton< UpdateManager >, Singleton< Timer >, Singleton< ContentDirectoryService >, Singleton< ConfigManager >, Singleton< Server >, Singleton< Runtime >, Singleton< ContentManager >, Singleton< ConnectionManagerService >, Singleton< PlayHook >, Singleton< Storage >, and Singleton< SessionManager >.
Definition at line 56 of file object.h.
Referenced by zmm::Object::Object(), zmm::Object::release(), zmm::Object::retain(), and zmm::Object::~Object().
zmm::Ref<Dictionary> CdsResource::options [protected] |
Definition at line 54 of file cds_resource.h.
Referenced by addOption(), CdsResource(), clone(), encode(), equals(), getOption(), getOptions(), and optimize().
zmm::Ref<Dictionary> CdsResource::parameters [protected] |
Definition at line 53 of file cds_resource.h.
Referenced by addParameter(), CdsResource(), clone(), encode(), equals(), getParameter(), getParameters(), and optimize().
1.6.1