#include <config_manager.h>
Public Member Functions | |
| ConfigManager () | |
| virtual | ~ConfigManager () |
| zmm::String | getConfigFilename () |
| Returns the name of the config file that was used to launch the server. | |
| void | load (zmm::String filename) |
| zmm::String | getOption (config_option_t option) |
| returns a config option of type String | |
| int | getIntOption (config_option_t option) |
| returns a config option of type int | |
| bool | getBoolOption (config_option_t option) |
| returns a config option of type bool | |
| zmm::Ref< Dictionary > | getDictionaryOption (config_option_t option) |
| returns a config option of type Dictionary | |
| zmm::Ref< zmm::Array < zmm::StringBase > > | getStringArrayOption (config_option_t option) |
| returns a config option of type Array of StringBase | |
| zmm::Ref< ObjectDictionary < zmm::Object > > | getObjectDictionaryOption (config_option_t option) |
| zmm::Ref< AutoscanList > | getAutoscanListOption (config_option_t option) |
| returns a config option of type AutoscanList | |
| void | writeBookmark (zmm::String ip, zmm::String port) |
| Creates a html file that is a redirector to the current server i instance. | |
| void | retain () |
| void | release () |
| int | getRefCount () |
Static Public Member Functions | |
| static void | setStaticArgs (zmm::String _filename, zmm::String _userhome, zmm::String _config_dir=_(DEFAULT_CONFIG_HOME), zmm::String _prefix_dir=_(PACKAGE_DATADIR), zmm::String _magic=nil, bool _debug_logging=false) |
| sets static configuration parameters that will be used by when the ConfigManager class initializes | |
| static bool | isDebugLogging () |
| static zmm::Ref< ConfigManager > | getInstance () |
| static void * | operator new (size_t size) |
| static void | operator delete (void *ptr) |
Protected Member Functions | |
| zmm::Ref< mxml::Element > | map_from_to (zmm::String from, zmm::String to) |
| zmm::Ref< mxml::Element > | treat_as (zmm::String mimetype, zmm::String as) |
| zmm::Ref< mxml::Element > | renderTranscodingSection () |
| zmm::Ref< mxml::Element > | renderExtendedRuntimeSection () |
| zmm::Ref< mxml::Element > | renderOnlineSection () |
| zmm::String | createDefaultConfig (zmm::String userhome) |
| void | save () |
| void | save_text (zmm::String filename, zmm::String content) |
| void | migrate () |
| void | validate (zmm::String serverhome) |
| void | prepare_udn () |
| zmm::String | construct_path (zmm::String path) |
| void | prepare_path (zmm::String path, bool needDir=false, bool existenceUnneeded=false) |
| zmm::String | getOption (zmm::String xpath, zmm::String def) |
| Returns a config option with the given path, if option does not exist a default value is returned. | |
| int | getIntOption (zmm::String xpath, int def) |
| same as getOption but returns an integer value of the option | |
| zmm::String | getOption (zmm::String xpath) |
| Returns a config option with the given path, an exception is raised if option does not exist. | |
| int | getIntOption (zmm::String xpath) |
| same as getOption but returns an integer value of the option | |
| zmm::Ref< mxml::Element > | getElement (zmm::String xpath) |
| Returns a config XML element with the given path, an exception is raised if element does not exist. | |
| zmm::String | checkOptionString (zmm::String xpath) |
| Checks if the string returned by getOption is valid. | |
| zmm::Ref< Dictionary > | createDictionaryFromNodeset (zmm::Ref< mxml::Element > element, zmm::String nodeName, zmm::String keyAttr, zmm::String valAttr, bool tolower=false) |
| Creates a dictionary from an XML nodeset. | |
| zmm::Ref< AutoscanList > | createAutoscanListFromNodeset (zmm::Ref< mxml::Element > element, scan_mode_t scanmode) |
| Creates an aray of AutoscanDirectory objects from an XML nodeset. | |
| zmm::Ref< zmm::Array < zmm::StringBase > > | createArrayFromNodeset (zmm::Ref< mxml::Element > element, zmm::String nodeName, zmm::String attrName) |
| void | dumpOptions () |
| virtual void | init () |
| virtual void | shutdown () |
| virtual void | registerSingleton () |
Protected Attributes | |
| zmm::Ref< mxml::Document > | rootDoc |
| zmm::Ref< mxml::Element > | root |
| zmm::Ref< Dictionary > | mime_content |
| zmm::Ref< zmm::Array < ConfigOption > > | options |
| mt_atomic_t | _ref_count |
Static Protected Attributes | |
| static zmm::String | filename = nil |
| static zmm::String | userhome = nil |
| static zmm::String | config_dir = _(DEFAULT_CONFIG_HOME) |
| static zmm::String | prefix_dir = _(PACKAGE_DATADIR) |
| static zmm::String | magic = nil |
| static bool | debug_logging = false |
| static zmm::Ref< Mutex > | mutex |
| static zmm::Ref< ConfigManager > | instance |
| static bool | singletonActive |
Definition at line 201 of file config_manager.h.
| ConfigManager::ConfigManager | ( | ) |
Definition at line 101 of file config_manager.cc.
References _, _Exception, zmm::String::c_str(), CFG_MAX, check_path(), config_dir, createDefaultConfig(), DEFAULT_CONFIG_NAME, DIR_SEPARATOR, filename, load(), log_info, nil, normalizePath(), options, prepare_udn(), root, string_ok(), userhome, and validate().
| ConfigManager::~ConfigManager | ( | ) | [virtual] |
Definition at line 80 of file config_manager.cc.
References _, config_dir, DEFAULT_CONFIG_HOME, filename, magic, nil, prefix_dir, and userhome.
| String ConfigManager::checkOptionString | ( | zmm::String | xpath | ) | [protected] |
Checks if the string returned by getOption is valid.
| xpath | xpath expression to the XML node |
Definition at line 2475 of file config_manager.cc.
References _, _Exception, getOption(), and string_ok().
Referenced by migrate(), prepare_path(), and validate().
| String ConfigManager::construct_path | ( | zmm::String | path | ) | [protected] |
Definition at line 148 of file config_manager.cc.
References _, CFG_SERVER_HOME, zmm::String::charAt(), DIR_SEPARATOR, getOption(), and zmm::String::length().
Referenced by prepare_path(), and writeBookmark().
| Ref< Array< StringBase > > ConfigManager::createArrayFromNodeset | ( | zmm::Ref< mxml::Element > | element, | |
| zmm::String | nodeName, | |||
| zmm::String | attrName | |||
| ) | [protected] |
Definition at line 3110 of file config_manager.cc.
References nil, and string_ok().
Referenced by validate().
| Ref< AutoscanList > ConfigManager::createAutoscanListFromNodeset | ( | zmm::Ref< mxml::Element > | element, | |
| scan_mode_t | scanmode | |||
| ) | [protected] |
Creates an aray of AutoscanDirectory objects from an XML nodeset.
| element | starting element of the ndoeset. | |
| scanmode | add only directories with the specified scanmode to the array |
Definition at line 2905 of file config_manager.cc.
References _, _Exception, BasicScanLevel, check_path(), FullScanLevel, zmm::Exception::getMessage(), getOption(), InotifyScanMode, nil, normalizePath(), string_ok(), TimedScanMode, and zmm::String::toUInt().
Referenced by validate().
| String ConfigManager::createDefaultConfig | ( | zmm::String | userhome | ) | [protected] |
Definition at line 407 of file config_manager.cc.
References _, _Exception, zmm::String::c_str(), check_path(), config_dir, CONFIG_MAPPINGS_TEMPLATE, CONFIG_XML_VERSION, CONTENT_TYPE_AVI, CONTENT_TYPE_DVD, CONTENT_TYPE_FLAC, CONTENT_TYPE_JPG, CONTENT_TYPE_MP3, CONTENT_TYPE_MP4, CONTENT_TYPE_OGG, CONTENT_TYPE_PCM, CONTENT_TYPE_PLAYLIST, DEFAULT_ACCOUNT_PASSWORD, DEFAULT_ACCOUNT_USER, DEFAULT_ACCOUNTS_EN_VALUE, DEFAULT_COMMON_SCRIPT, DEFAULT_CONFIG_NAME, DEFAULT_DVD_SCRIPT, DEFAULT_EXTEND_PROTOCOLINFO, DEFAULT_HIDDEN_FILES_VALUE, DEFAULT_IGNORE_UNKNOWN_EXTENSIONS, DEFAULT_IMPORT_SCRIPT, DEFAULT_JS_CHARSET, DEFAULT_JS_DIR, DEFAULT_LAYOUT_TYPE, DEFAULT_MYSQL_ENABLED, DEFAULT_PLAYLISTS_SCRIPT, DEFAULT_SESSION_TIMEOUT, DEFAULT_SQLITE3_DB_FILENAME, DEFAULT_SQLITE_ENABLED, DEFAULT_UI_EN_VALUE, DEFAULT_UI_SHOW_TOOLTIPS_VALUE, DEFAULT_WEB_DIR, DIR_SEPARATOR, log_info, magic, map_from_to(), prefix_dir, RefCast, renderExtendedRuntimeSection(), renderOnlineSection(), renderTranscodingSection(), save_text(), string_ok(), treat_as(), UPNP_DEFAULT_CLASS_MUSIC_TRACK, UPNP_DEFAULT_CLASS_VIDEO_ITEM, XML_XMLNS, XML_XMLNS_XSI, and YES.
Referenced by ConfigManager().
| Ref< Dictionary > ConfigManager::createDictionaryFromNodeset | ( | zmm::Ref< mxml::Element > | element, | |
| zmm::String | nodeName, | |||
| zmm::String | keyAttr, | |||
| zmm::String | valAttr, | |||
| bool | tolower = false | |||
| ) | [protected] |
Creates a dictionary from an XML nodeset.
| element | starting element of the nodeset. | |
| nodeName | name of each node in the set | |
| keyAttr | attribute name to be used as a key | |
| valAttr | attribute name to be used as value |
The basic idea is the following: You have a piece of XML that looks like this <some-section> <map from="1" to="2"> <map from="3" to="4"> </some-section>
This function will create a dictionary with the following key:value paris: "1":"2", "3":"4"
Definition at line 2484 of file config_manager.cc.
References nil, string_ok(), and zmm::String::toLower().
Referenced by validate().
| void ConfigManager::dumpOptions | ( | ) | [protected] |
Definition at line 3082 of file config_manager.cc.
References CFG_MAX, getBoolOption(), getIntOption(), getOption(), and log_debug.
| Ref< AutoscanList > ConfigManager::getAutoscanListOption | ( | config_option_t | option | ) |
returns a config option of type AutoscanList
| option | to retrieve |
Definition at line 3172 of file config_manager.cc.
References options.
| bool ConfigManager::getBoolOption | ( | config_option_t | option | ) |
returns a config option of type bool
| option | option to retrieve. |
Definition at line 3145 of file config_manager.cc.
References options.
Referenced by dumpOptions(), validate(), and writeBookmark().
| zmm::String ConfigManager::getConfigFilename | ( | ) | [inline] |
Returns the name of the config file that was used to launch the server.
Definition at line 209 of file config_manager.h.
References filename.
| Ref< Dictionary > ConfigManager::getDictionaryOption | ( | config_option_t | option | ) |
returns a config option of type Dictionary
| option | option to retrieve. |
Definition at line 3150 of file config_manager.cc.
References options.
| Ref< Element > ConfigManager::getElement | ( | zmm::String | xpath | ) | [protected] |
Returns a config XML element with the given path, an exception is raised if element does not exist.
| xpath | option xpath. |
The xpath parameter has XPath syntax. "/path/to/element" will return the text value of the given "element" element
Definition at line 2434 of file config_manager.cc.
References root.
Referenced by prepare_path(), and validate().
| static zmm::Ref<ConfigManager > Singleton< ConfigManager >::getInstance | ( | ) | [inline, static, inherited] |
Definition at line 62 of file singleton.h.
Referenced by ContentManager::_addFile(), ContentManager::_rescanDirectory(), WebRequestHandler::accountsEnabled(), ContentManager::addRecursive(), CdsResourceManager::addResources(), web::auth::auth(), create_request_handler(), StringConverter::f2i(), FallbackLayout::FallbackLayout(), Filesystem::fileAllowed(), Filesystem::Filesystem(), ServeRequestHandler::get_info(), FileRequestHandler::get_info(), StringConverter::i2f(), SQLStorage::init(), ContentManager::init(), StringConverter::m2i(), main(), WebRequestHandler::open(), ServeRequestHandler::open(), FileRequestHandler::open(), web::items::process(), web::containers::process(), web::auth::process(), ConnectionManagerService::process_subscription_request(), ContentDirectoryService::process_subscription_request(), FallbackLayout::processCdsObject(), ContentManager::removeAutoscanDirectory(), ContentManager::removeObject(), run_simple_process(), ContentManager::setAutoscanDirectory(), MetadataHandler::setMetadata(), ConnectionManagerService::subscription_update(), ContentDirectoryService::subscription_update(), ContentDirectoryService::upnp_action_Browse(), and UpnpXML_RenderDeviceDescription().
| int ConfigManager::getIntOption | ( | zmm::String | xpath | ) | [protected] |
same as getOption but returns an integer value of the option
Definition at line 2426 of file config_manager.cc.
References getOption(), and zmm::String::toInt().
| int ConfigManager::getIntOption | ( | zmm::String | xpath, | |
| int | def | |||
| ) | [protected] |
same as getOption but returns an integer value of the option
Definition at line 2403 of file config_manager.cc.
References getOption(), and zmm::String::toInt().
| int ConfigManager::getIntOption | ( | config_option_t | option | ) |
returns a config option of type int
| option | option to retrieve. |
Definition at line 3140 of file config_manager.cc.
References options.
Referenced by dumpOptions(), migrate(), and validate().
| Ref< ObjectDictionary< zmm::Object > > ConfigManager::getObjectDictionaryOption | ( | config_option_t | option | ) |
Definition at line 3160 of file config_manager.cc.
References options.
| String ConfigManager::getOption | ( | zmm::String | xpath | ) | [protected] |
Returns a config option with the given path, an exception is raised if option does not exist.
| xpath | option xpath. |
The xpath parameter has XPath syntax. Currently only two xpath constructs are supported: "/path/to/option" will return the text value of the given "option" element "/path/to/option/attribute::attr" will return the value of the attribute "attr"
Definition at line 2413 of file config_manager.cc.
References _, _Exception, nil, root, and trim_string().
| String ConfigManager::getOption | ( | zmm::String | xpath, | |
| zmm::String | def | |||
| ) | [protected] |
Returns a config option with the given path, if option does not exist a default value is returned.
| xpath | option xpath | |
| def | default value if option not found |
the name parameter has the XPath syntax. Currently only two xpath constructs are supported: "/path/to/option" will return the text value of the given "option" element "/path/to/option/attribute::attr" will return the value of the attribute "attr"
Definition at line 2350 of file config_manager.cc.
References _, _Exception, zmm::String::c_str(), XPath::getAxis(), XPath::getAxisPart(), XPath::getPathPart(), XPath::getSpec(), log_debug, nil, root, split_string(), string_ok(), and trim_string().
| String ConfigManager::getOption | ( | config_option_t | option | ) |
returns a config option of type String
| option | option to retrieve. |
Definition at line 3135 of file config_manager.cc.
References options.
Referenced by checkOptionString(), construct_path(), createAutoscanListFromNodeset(), dumpOptions(), getIntOption(), migrate(), prepare_udn(), validate(), and writeBookmark().
| int Object::getRefCount | ( | ) | [inherited] |
Definition at line 78 of file object.cc.
References zmm::Object::_ref_count, and atomic_get().
| Ref< Array< StringBase > > ConfigManager::getStringArrayOption | ( | config_option_t | option | ) |
returns a config option of type Array of StringBase
| option | option to retrieve. |
Definition at line 3155 of file config_manager.cc.
References options.
| virtual void Singleton< ConfigManager >::init | ( | ) | [inline, protected, virtual, inherited] |
Definition at line 87 of file singleton.h.
| static bool ConfigManager::isDebugLogging | ( | ) | [inline, static] |
Definition at line 258 of file config_manager.h.
References debug_logging.
Referenced by _log_debug(), and _print_backtrace().
| void ConfigManager::load | ( | zmm::String | filename | ) |
Definition at line 2337 of file config_manager.cc.
References _, _Exception, nil, root, and rootDoc.
Referenced by ConfigManager().
| Ref< Element > ConfigManager::map_from_to | ( | zmm::String | from, | |
| zmm::String | to | |||
| ) | [protected] |
Definition at line 168 of file config_manager.cc.
References _.
Referenced by createDefaultConfig().
| void ConfigManager::migrate | ( | ) | [protected] |
Definition at line 675 of file config_manager.cc.
References _, _Exception, checkOptionString(), CONFIG_XML_VERSION, CONFIG_XML_VERSION_0_11_0, DEFAULT_STORAGE_CACHING_ENABLED, DEFAULT_UI_SHOW_TOOLTIPS_VALUE, getIntOption(), getOption(), log_info, nil, renderExtendedRuntimeSection(), renderOnlineSection(), renderTranscodingSection(), root, save(), string_ok(), zmm::String::toInt(), treat_as(), XML_XMLNS, XML_XMLNS_XSI, and YES.
Referenced by validate().
| void Object::operator delete | ( | void * | ptr | ) | [static, inherited] |
| void * Object::operator new | ( | size_t | size | ) | [static, inherited] |
| void ConfigManager::prepare_path | ( | zmm::String | path, | |
| bool | needDir = false, |
|||
| bool | existenceUnneeded = false | |||
| ) | [protected] |
Definition at line 2294 of file config_manager.cc.
References check_path_ex(), checkOptionString(), construct_path(), getElement(), and nil.
Referenced by validate().
| void ConfigManager::prepare_udn | ( | ) | [protected] |
Definition at line 2263 of file config_manager.cc.
References _, getOption(), log_info, nil, root, save(), uuid_generate(), and uuid_unparse().
Referenced by ConfigManager().
| virtual void Singleton< ConfigManager >::registerSingleton | ( | ) | [inline, protected, virtual, inherited] |
Definition at line 94 of file singleton.h.
| 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().
Definition at line 275 of file config_manager.cc.
References _, DEFAULT_MARK_PLAYED_CONTENT_VIDEO, DEFAULT_MARK_PLAYED_ITEMS_ENABLED, DEFAULT_MARK_PLAYED_ITEMS_STRING, DEFAULT_MARK_PLAYED_ITEMS_STRING_MODE, and DEFAULT_MARK_PLAYED_ITEMS_SUPPRESS_CDS_UPDATES.
Referenced by createDefaultConfig(), and migrate().
| zmm::Ref<mxml::Element> ConfigManager::renderOnlineSection | ( | ) | [protected] |
Referenced by createDefaultConfig(), and migrate().
| zmm::Ref<mxml::Element> ConfigManager::renderTranscodingSection | ( | ) | [protected] |
Referenced by createDefaultConfig(), and migrate().
| 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().
| void ConfigManager::save | ( | ) | [protected] |
Definition at line 2309 of file config_manager.cc.
References filename, rootDoc, and save_text().
Referenced by migrate(), and prepare_udn().
| void ConfigManager::save_text | ( | zmm::String | filename, | |
| zmm::String | content | |||
| ) | [protected] |
Definition at line 2314 of file config_manager.cc.
References _, _Exception, zmm::String::c_str(), zmm::String::length(), NULL, and XML_HEADER.
Referenced by createDefaultConfig(), and save().
| void ConfigManager::setStaticArgs | ( | zmm::String | _filename, | |
| zmm::String | _userhome, | |||
| zmm::String | _config_dir = _(DEFAULT_CONFIG_HOME), |
|||
| zmm::String | _prefix_dir = _(PACKAGE_DATADIR), |
|||
| zmm::String | _magic = nil, |
|||
| bool | _debug_logging = false | |||
| ) | [static] |
sets static configuration parameters that will be used by when the ConfigManager class initializes
Definition at line 89 of file config_manager.cc.
References config_dir, debug_logging, filename, magic, prefix_dir, and userhome.
Referenced by main().
| virtual void Singleton< ConfigManager >::shutdown | ( | ) | [inline, protected, virtual, inherited] |
Definition at line 88 of file singleton.h.
| Ref< Element > ConfigManager::treat_as | ( | zmm::String | mimetype, | |
| zmm::String | as | |||
| ) | [protected] |
Definition at line 176 of file config_manager.cc.
References _.
Referenced by createDefaultConfig(), and migrate().
| void ConfigManager::validate | ( | zmm::String | serverhome | ) | [protected] |
Definition at line 900 of file config_manager.cc.
References _, _Exception, zmm::String::c_str(), CFG_IMPORT_AUTOSCAN_TIMED_LIST, CFG_IMPORT_FILESYSTEM_CHARSET, CFG_IMPORT_HIDDEN_FILES, CFG_IMPORT_MAPPINGS_EXTENSION_TO_MIMETYPE_CASE_SENSITIVE, CFG_IMPORT_MAPPINGS_EXTENSION_TO_MIMETYPE_LIST, CFG_IMPORT_MAPPINGS_IGNORE_UNKNOWN_EXTENSIONS, CFG_IMPORT_MAPPINGS_MIMETYPE_TO_CONTENTTYPE_LIST, CFG_IMPORT_MAPPINGS_MIMETYPE_TO_UPNP_CLASS_LIST, CFG_IMPORT_METADATA_CHARSET, CFG_IMPORT_PLAYLIST_CHARSET, CFG_IMPORT_SCRIPTING_VIRTUAL_LAYOUT_TYPE, CFG_SERVER_ALIVE_INTERVAL, CFG_SERVER_APPEND_PRESENTATION_URL_TO, CFG_SERVER_BOOKMARK_FILE, CFG_SERVER_CUSTOM_HTTP_HEADERS, CFG_SERVER_EXTOPTS_MARK_PLAYED_ITEMS_CONTENT_LIST, CFG_SERVER_EXTOPTS_MARK_PLAYED_ITEMS_ENABLED, CFG_SERVER_EXTOPTS_MARK_PLAYED_ITEMS_STRING, CFG_SERVER_EXTOPTS_MARK_PLAYED_ITEMS_STRING_MODE_PREPEND, CFG_SERVER_EXTOPTS_MARK_PLAYED_ITEMS_SUPPRESS_CDS_UPDATES, CFG_SERVER_HIDE_PC_DIRECTORY, CFG_SERVER_HOME, CFG_SERVER_IP, CFG_SERVER_MANUFACTURER_URL, CFG_SERVER_MODEL_DESCRIPTION, CFG_SERVER_MODEL_NAME, CFG_SERVER_MODEL_NUMBER, CFG_SERVER_NAME, CFG_SERVER_NETWORK_INTERFACE, CFG_SERVER_PORT, CFG_SERVER_PRESENTATION_URL, CFG_SERVER_SERIAL_NUMBER, CFG_SERVER_SERVEDIR, CFG_SERVER_STORAGE_CACHING_ENABLED, CFG_SERVER_STORAGE_DRIVER, CFG_SERVER_TMPDIR, CFG_SERVER_UDN, CFG_SERVER_UI_ACCOUNT_LIST, CFG_SERVER_UI_ACCOUNTS_ENABLED, CFG_SERVER_UI_DEFAULT_ITEMS_PER_PAGE, CFG_SERVER_UI_ENABLED, CFG_SERVER_UI_ITEMS_PER_PAGE_DROPDOWN, CFG_SERVER_UI_POLL_INTERVAL, CFG_SERVER_UI_POLL_WHEN_IDLE, CFG_SERVER_UI_SESSION_TIMEOUT, CFG_SERVER_UI_SHOW_TOOLTIPS, CFG_SERVER_UPNP_TITLE_AND_DESC_STRING_LIMIT, CFG_SERVER_WEBROOT, check_path(), checkOptionString(), CONFIG_XML_VERSION, CONTENT_TYPE_AVI, CONTENT_TYPE_DVD, CONTENT_TYPE_FLAC, CONTENT_TYPE_JPG, CONTENT_TYPE_MP3, CONTENT_TYPE_MP4, CONTENT_TYPE_MPEG, CONTENT_TYPE_OGG, CONTENT_TYPE_PCM, CONTENT_TYPE_PLAYLIST, createArrayFromNodeset(), createAutoscanListFromNodeset(), createDictionaryFromNodeset(), DEFAULT_ACCOUNTS_EN_VALUE, DEFAULT_ALIVE_INTERVAL, DEFAULT_BOOKMARK_FILE, DEFAULT_CASE_SENSITIVE_EXTENSION_MAPPINGS, DEFAULT_COMMON_SCRIPT, DEFAULT_DVD_SCRIPT, DEFAULT_EXTEND_PROTOCOLINFO, DEFAULT_FALLBACK_CHARSET, DEFAULT_FILESYSTEM_CHARSET, DEFAULT_HIDDEN_FILES_VALUE, DEFAULT_HIDE_PC_DIRECTORY, DEFAULT_IGNORE_UNKNOWN_EXTENSIONS, DEFAULT_IMPORT_SCRIPT, DEFAULT_INTERNAL_CHARSET, DEFAULT_ITEMS_PER_PAGE_1, DEFAULT_ITEMS_PER_PAGE_2, DEFAULT_ITEMS_PER_PAGE_3, DEFAULT_ITEMS_PER_PAGE_4, DEFAULT_JS_CHARSET, DEFAULT_JS_DIR, DEFAULT_LAYOUT_TYPE, DEFAULT_MARK_PLAYED_CONTENT_AUDIO, DEFAULT_MARK_PLAYED_CONTENT_IMAGE, DEFAULT_MARK_PLAYED_CONTENT_VIDEO, DEFAULT_MARK_PLAYED_ITEMS_ENABLED, DEFAULT_MARK_PLAYED_ITEMS_STRING, DEFAULT_MARK_PLAYED_ITEMS_STRING_MODE, DEFAULT_MARK_PLAYED_ITEMS_SUPPRESS_CDS_UPDATES, DEFAULT_MYSQL_ENABLED, DEFAULT_PLAYLIST_CREATE_LINK, DEFAULT_PLAYLISTS_SCRIPT, DEFAULT_POLL_INTERVAL, DEFAULT_POLL_WHEN_IDLE_VALUE, DEFAULT_PRES_URL_APPENDTO_ATTR, DEFAULT_SESSION_TIMEOUT, DEFAULT_SQLITE_ENABLED, DEFAULT_STORAGE_CACHING_ENABLED, DEFAULT_TMPDIR, DEFAULT_UI_EN_VALUE, DEFAULT_UI_SHOW_TOOLTIPS_VALUE, DEFAULT_UPNP_STRING_LIMIT, DESC_FRIENDLY_NAME, DESC_MANUFACTURER_URL, DESC_MODEL_DESCRIPTION, DESC_MODEL_NAME, DESC_MODEL_NUMBER, DESC_SERIAL_NUMBER, DIR_SEPARATOR, getBoolOption(), getElement(), getIntOption(), getOption(), InotifyScanMode, log_debug, log_info, log_warning, magic, migrate(), mime_content, NEW_AUTOSCANLIST_OPTION, NEW_BOOL_OPTION, NEW_DICT_OPTION, NEW_INT_OPTION, NEW_OPTION, NEW_STRARR_OPTION, nil, NULL, prefix_dir, prepare_path(), root, rootDoc, SET_AUTOSCANLIST_OPTION, SET_BOOL_OPTION, SET_DICT_OPTION, SET_INT_OPTION, SET_OPTION, SET_STRARR_OPTION, string_ok(), Inotify::supported(), TimedScanMode, zmm::String::toInt(), validateYesNo(), and YES.
Referenced by ConfigManager().
| void ConfigManager::writeBookmark | ( | zmm::String | ip, | |
| zmm::String | port | |||
| ) |
Creates a html file that is a redirector to the current server i instance.
Definition at line 2440 of file config_manager.cc.
References _, _Exception, zmm::String::c_str(), CFG_SERVER_BOOKMARK_FILE, CFG_SERVER_UI_ENABLED, construct_path(), filename, getBoolOption(), getOption(), http_redirect_to(), zmm::String::length(), and NULL.
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().
String ConfigManager::config_dir = _(DEFAULT_CONFIG_HOME) [static, protected] |
Definition at line 285 of file config_manager.h.
Referenced by ConfigManager(), createDefaultConfig(), setStaticArgs(), and ~ConfigManager().
bool ConfigManager::debug_logging = false [static, protected] |
Definition at line 288 of file config_manager.h.
Referenced by isDebugLogging(), and setStaticArgs().
String ConfigManager::filename = nil [static, protected] |
Definition at line 283 of file config_manager.h.
Referenced by ConfigManager(), getConfigFilename(), save(), setStaticArgs(), writeBookmark(), and ~ConfigManager().
zmm::Ref<ConfigManager > Singleton< ConfigManager >::instance [static, protected, inherited] |
Definition at line 91 of file singleton.h.
String ConfigManager::magic = nil [static, protected] |
Definition at line 287 of file config_manager.h.
Referenced by createDefaultConfig(), setStaticArgs(), validate(), and ~ConfigManager().
zmm::Ref<Dictionary> ConfigManager::mime_content [protected] |
Definition at line 293 of file config_manager.h.
Referenced by validate().
zmm::Ref<Mutex> Singleton< ConfigManager >::mutex [static, protected, inherited] |
Reimplemented from zmm::Object.
Definition at line 90 of file singleton.h.
zmm::Ref<zmm::Array<ConfigOption> > ConfigManager::options [protected] |
Definition at line 295 of file config_manager.h.
Referenced by ConfigManager(), getAutoscanListOption(), getBoolOption(), getDictionaryOption(), getIntOption(), getObjectDictionaryOption(), getOption(), and getStringArrayOption().
String ConfigManager::prefix_dir = _(PACKAGE_DATADIR) [static, protected] |
Definition at line 286 of file config_manager.h.
Referenced by createDefaultConfig(), setStaticArgs(), validate(), and ~ConfigManager().
zmm::Ref<mxml::Element> ConfigManager::root [protected] |
Definition at line 291 of file config_manager.h.
Referenced by ConfigManager(), getElement(), getOption(), load(), migrate(), prepare_udn(), and validate().
zmm::Ref<mxml::Document> ConfigManager::rootDoc [protected] |
Definition at line 290 of file config_manager.h.
Referenced by load(), save(), and validate().
bool Singleton< ConfigManager >::singletonActive [static, protected, inherited] |
Definition at line 92 of file singleton.h.
String ConfigManager::userhome = nil [static, protected] |
Definition at line 284 of file config_manager.h.
Referenced by ConfigManager(), setStaticArgs(), and ~ConfigManager().
1.6.1