Eina_Bool eupnp_service_parser_init(void) { xmlInitParser(); EUPNP_ERROR_SERVICE_PARSER_INSUFFICIENT_FEED = eina_error_msg_register("Parser feeded with less than 4 chars. Feed it with at least 4 chars"); if ((_log_dom = eina_log_domain_register("Eupnp.ServiceParser", EINA_COLOR_BLUE)) < 0) { EINA_LOG_DOM_ERR (EUPNP_LOGGING_DOM_GLOBAL, "Failed to create logging domain for service parser module."); goto log_dom_error; } INF("Initializing service parser module."); return EINA_TRUE; log_dom_error: xmlCleanupParser(); return EINA_FALSE; }
EAPI void egueb_dom_init(void) { if (_initializing) return; _initializing = EINA_TRUE; if (_init_count) goto done; eina_init(); enesim_init(); egueb_dom_log_dom_global = eina_log_domain_register("egueb_dom", 0); if (egueb_dom_log_dom_global < 0) { EINA_LOG_ERR("Egueb_Dom: Can not create a general log domain."); goto shutdown_eina; } /* register the dom errors */ EGUEB_DOM_ERROR_DOMSTRING_SIZE = eina_error_msg_register("The specified range of text does not fit into a DOMString"); EGUEB_DOM_ERROR_HIERARCHY_REQUEST = eina_error_msg_register("A Node is inserted somewhere it doesn't belong"); EGUEB_DOM_ERROR_INDEX_SIZE = eina_error_msg_register("Index or size is negative, or greater than the allowed value"); EGUEB_DOM_ERROR_INUSE_ATTRIBUTE = eina_error_msg_register("An attempt is made to add an attribute that is already in use elsewhere"); EGUEB_DOM_ERROR_INVALID_ACCESS = eina_error_msg_register("A parameter or an operation is not supported by the underlying object"); EGUEB_DOM_ERROR_INVALID_CHARACTER = eina_error_msg_register("An invalid or illegal character is specified, such as in an XML name"); EGUEB_DOM_ERROR_INVALID_STATE = eina_error_msg_register("An attempt is made to use an object that is not, or is no longer, usable"); EGUEB_DOM_ERROR_NAMESPACE = eina_error_msg_register("An attempt is made to create or change an object in a way which is incorrect with regard to namespaces"); EGUEB_DOM_ERROR_NOT_FOUND = eina_error_msg_register("An attempt is made to reference a Node in a context where it does not exist"); EGUEB_DOM_ERROR_NOT_SUPPORTED = eina_error_msg_register("The implementation does not support the requested type of object or operation"); EGUEB_DOM_ERROR_NO_DATA_ALLOWED = eina_error_msg_register("Data is specified for a Node which does not support data"); EGUEB_DOM_ERROR_NO_MODIFICATION_ALLOWED = eina_error_msg_register(""); EGUEB_DOM_ERROR_SYNTAX = eina_error_msg_register(""); EGUEB_DOM_ERROR_INVALID_MODIFICATION = eina_error_msg_register(""); EGUEB_DOM_ERROR_VALIDATION = eina_error_msg_register(""); EGUEB_DOM_ERROR_TYPE_MISMATCH = eina_error_msg_register(""); EGUEB_DOM_ERROR_WRONG_DOCUMENT = eina_error_msg_register("Node is used in a different document than the one that created it (that doesn't support it)"); _egueb_dom_strings_init(); egueb_dom_registry_init(); egueb_dom_key_init(); done: _init_count++; _initializing = EINA_FALSE; return; shutdown_eina: eina_shutdown(); }