/**
 * @internal
 * @brief Initialize the share_common module.
 *
 * @return #EINA_TRUE on success, #EINA_FALSE on failure.
 *
 * This function sets up the share_common module of Eina. It is called by
 * eina_init().
 *
 * @see eina_init()
 */
Eina_Bool
eina_stringshare_init(void)
{
   Eina_Bool ret;

   if (_eina_share_stringshare_log_dom < 0)
     {
        _eina_share_stringshare_log_dom = eina_log_domain_register
          ("eina_stringshare", EINA_LOG_COLOR_DEFAULT);

        if (_eina_share_stringshare_log_dom < 0)
          {
             EINA_LOG_ERR("Could not register log domain: eina_stringshare");
             return EINA_FALSE;
          }
     }

   ret = eina_share_common_init(&stringshare_share,
                                EINA_MAGIC_STRINGSHARE_NODE,
                                EINA_MAGIC_STRINGSHARE_NODE_STR);
   if (ret)
      _eina_stringshare_small_init();
   else
     {
        eina_log_domain_unregister(_eina_share_stringshare_log_dom);
        _eina_share_stringshare_log_dom = -1;
     }

   return ret;
}
示例#2
0
文件: eolian.c 项目: RomainNaour/efl
EAPI int eolian_init(void)
{
   const char *log_dom = "eolian";
   if (_eolian_init_counter > 0) return ++_eolian_init_counter;

   eina_init();
   _eolian_log_dom = eina_log_domain_register(log_dom, EINA_COLOR_LIGHTBLUE);
   if (_eolian_log_dom < 0)
     {
        EINA_LOG_ERR("Could not register log domain: %s", log_dom);
        return EINA_FALSE;
     }

   eina_log_timing(_eolian_log_dom,
                   EINA_LOG_STATE_STOP,
                   EINA_LOG_STATE_INIT);

   INF("Init");

   _eolian_prefix = eina_prefix_new(NULL, eolian_init, "EOLIAN", "eolian",
                                    NULL, "", "", PACKAGE_DATA_DIR, "");
   if (!_eolian_prefix)
     {
        ERR("Could not initialize the Eolian prefix.");
        return EINA_FALSE;
     }

   database_init();
   eo_lexer_init();
   return ++_eolian_init_counter;
}
示例#3
0
void
azy_rpc_log_enable(void)
{
   EINA_SAFETY_ON_TRUE_RETURN(!azy_init_count_);
   azy_rpc_log_dom = eina_log_domain_register("azy_rpc", EINA_COLOR_LIGHTCYAN);
   if (azy_rpc_log_dom < 0)
     ERR("Could not register 'azy_rpc' log domain!");
}
示例#4
0
文件: eio_main.c 项目: tguillem/efl
EAPI int
eio_init(void)
{
    if (++_eio_init_count != 1)
        return _eio_init_count;

    if (!eina_init())
    {
        fprintf(stderr, "Eio can not initialize Eina\n");
        return --_eio_init_count;
    }

    _eio_log_dom_global = eina_log_domain_register("eio", EIO_DEFAULT_LOG_COLOR);
    if (_eio_log_dom_global < 0)
    {
        EINA_LOG_ERR("Eio can not create a general log domain.");
        goto shutdown_eina;
    }

    if (!ecore_init())
    {
        ERR("Can not initialize Ecore\n");
        goto unregister_log_domain;
    }

    memset(&progress_pool, 0, sizeof(progress_pool));
    memset(&direct_info_pool, 0, sizeof(direct_info_pool));
    memset(&char_pool, 0, sizeof(char_pool));
    memset(&associate_pool, 0, sizeof(associate_pool));

    eina_lock_new(&(progress_pool.lock));
    progress_pool.mem_size = sizeof (Eio_Progress);
    eina_lock_new(&(direct_info_pool.lock));
    direct_info_pool.mem_size = sizeof (Eio_File_Direct_Info);
    eina_lock_new(&(char_pool.lock));
    char_pool.mem_size = sizeof (Eio_File_Char);
    eina_lock_new(&(associate_pool.lock));
    associate_pool.mem_size = sizeof (Eio_File_Associate);

    eina_spinlock_new(&(memory_pool_lock));
    eina_lock_new(&(memory_pool_mutex));
    eina_condition_new(&(memory_pool_cond), &(memory_pool_mutex));

    eio_monitor_init();

    eina_log_timing(_eio_log_dom_global,
                    EINA_LOG_STATE_STOP,
                    EINA_LOG_STATE_INIT);

    return _eio_init_count;

unregister_log_domain:
    eina_log_domain_unregister(_eio_log_dom_global);
    _eio_log_dom_global = -1;
shutdown_eina:
    eina_shutdown();
    return --_eio_init_count;
}
示例#5
0
void
termpty_init(void)
{
   if (_termpty_log_dom >= 0) return;

   _termpty_log_dom = eina_log_domain_register("termpty", NULL);
   if (_termpty_log_dom < 0)
     EINA_LOG_CRIT("could not create log domain 'termpty'.");
}
示例#6
0
/*============================================================================*
 *                                   API                                      *
 *============================================================================*/
EAPI void egueb_video_init(void)
{
	if (!_init++)
	{
		eina_init();
		egueb_video_log = eina_log_domain_register("egueb-video", EGUEB_VIDEO_LOG_COLOR_DEFAULT);
		egueb_dom_init();
	}
}
示例#7
0
void
miniview_init(void)
{
   if (_miniview_log_dom >= 0) return;

   _miniview_log_dom = eina_log_domain_register("miniview", NULL);
   if (_miniview_log_dom < 0)
     EINA_LOG_CRIT(_("Could not create logging domain '%s'."), "miniview");
}
示例#8
0
文件: eon_checkbox.c 项目: turran/eon
/*============================================================================*
 *                                 Global                                     *
 *============================================================================*/
void eon_checkbox_init(void)
{
	_eon_checkbox_log = eina_log_domain_register("eon_checkbox", EON_LOG_COLOR_DEFAULT);
	if (_eon_checkbox_log < 0)
	{
		EINA_LOG_ERR("Can not create log domain.");
		return;
	}
	_eon_checkbox_init();
}
示例#9
0
Eina_Bool log_init(void) {
	if (config_log_dom < 0) {
		config_log_dom = eina_log_domain_register("rck_config", NULL);
	} else return EINA_FALSE;
	if (conn_log_dom < 0) {
		conn_log_dom = eina_log_domain_register("rck_conn", NULL);
	} else return EINA_FALSE;
	if (cmd_log_dom < 0) {
		cmd_log_dom = eina_log_domain_register("rck_cmd", NULL);
	} else return EINA_FALSE;
	if (ui_upd_log_dom < 0) {
		ui_upd_log_dom = eina_log_domain_register("rck_UIupd", NULL);
	} else return EINA_FALSE;
	if (playlist_log_dom < 0) {
		playlist_log_dom = eina_log_domain_register("rck_pls", NULL);
	} else return EINA_FALSE;

	return EINA_TRUE;
}
示例#10
0
int ewk_init(void)
{
    if (_ewkInitCount)
        return ++_ewkInitCount;

    if (!eina_init())
        goto error_eina;

    _ewk_log_dom = eina_log_domain_register("ewebkit", EINA_COLOR_ORANGE);
    if (_ewk_log_dom < 0) {
        EINA_LOG_CRIT("could not register log domain 'ewebkit'");
        goto error_log_domain;
    }

    if (!evas_init()) {
        CRITICAL("could not init evas.");
        goto error_evas;
    }

    if (!ecore_init()) {
        CRITICAL("could not init ecore.");
        goto error_ecore;
    }

    if (!ecore_evas_init()) {
        CRITICAL("could not init ecore_evas.");
        goto error_ecore_evas;
    }

    if (!edje_init()) {
        CRITICAL("could not init edje.");
        goto error_edje;
    }

    if (!_ewk_init_body()) {
        CRITICAL("could not init body");
        goto error_edje;
    }

    return ++_ewkInitCount;

error_edje:
    ecore_evas_shutdown();
error_ecore_evas:
    ecore_shutdown();
error_ecore:
    evas_shutdown();
error_evas:
    eina_log_domain_unregister(_ewk_log_dom);
    _ewk_log_dom = -1;
error_log_domain:
    eina_shutdown();
error_eina:
    return 0;
}
/**
 * @internal
 * @brief Initialize the matrixsparse module.
 *
 * @return #EINA_TRUE on success, #EINA_FALSE on failure.
 *
 * This function sets up the matrixsparse module of Eina. It is called by
 * eina_init().
 *
 * This function creates mempool to speed up matrix rows and cells
 * management, using EINA_MEMPOOL environment variable if it is set to
 * choose the memory pool type to use.
 *
 * @see eina_init()
 */
Eina_Bool
eina_matrixsparse_init(void)
{
   const char *choice, *tmp;

   _eina_matrixsparse_log_dom = eina_log_domain_register("eina_matrixsparse", EINA_LOG_COLOR_DEFAULT);
   if (_eina_matrixsparse_log_dom < 0)
     {
	EINA_LOG_ERR("Could not register log domain: eina_matrixsparse");
	return EINA_FALSE;
     }

#ifdef EINA_DEFAULT_MEMPOOL
   choice = "pass_through";
#else
   choice = "chained_mempool";
#endif
   tmp = getenv("EINA_MEMPOOL");
   if (tmp && tmp[0])
     choice = tmp;

   _eina_matrixsparse_cell_mp = eina_mempool_add
     (choice, "matrixsparse_cell", NULL, sizeof (Eina_Matrixsparse_Cell), 120);
   if (!_eina_matrixsparse_cell_mp)
     {
	ERR("Mempool for matrixsparse_cell cannot be allocated in matrixsparse init.");
	goto on_init_fail;
     }

   _eina_matrixsparse_row_mp = eina_mempool_add
     (choice, "matrixsparse_row", NULL, sizeof (Eina_Matrixsparse_Row), 120);
   if (!_eina_matrixsparse_row_mp)
     {
	ERR("Mempool for matrixsparse_row cannot be allocated in matrixsparse init.");
	goto on_init_fail;
     }

#define EMS(n) eina_magic_string_static_set(n, n##_STR)
   EMS(EINA_MAGIC_MATRIXSPARSE);
   EMS(EINA_MAGIC_MATRIXSPARSE_ROW);
   EMS(EINA_MAGIC_MATRIXSPARSE_CELL);
   EMS(EINA_MAGIC_MATRIXSPARSE_ITERATOR);
   EMS(EINA_MAGIC_MATRIXSPARSE_ROW_ACCESSOR);
   EMS(EINA_MAGIC_MATRIXSPARSE_ROW_ITERATOR);
   EMS(EINA_MAGIC_MATRIXSPARSE_CELL_ACCESSOR);
   EMS(EINA_MAGIC_MATRIXSPARSE_CELL_ITERATOR);
#undef EMS

   return EINA_TRUE;

 on_init_fail:
   eina_log_domain_unregister(_eina_matrixsparse_log_dom);
   _eina_matrixsparse_log_dom = -1;
   return EINA_FALSE;
}
示例#12
0
EAPI int
ecore_drm2_init(void)
{
   if (++_ecore_drm2_init_count != 1) return _ecore_drm2_init_count;

   if (!eina_init()) goto eina_err;

   if (!ecore_init())
     {
        EINA_LOG_ERR("Could not initialize Ecore library");
        goto ecore_err;
     }

   if (!eeze_init())
     {
        EINA_LOG_ERR("Could not initialize Eeze library");
        goto eeze_err;
     }

   if (!elput_init())
     {
        EINA_LOG_ERR("Could not initialize Elput library");
        goto elput_err;
     }

   _ecore_drm2_log_dom =
     eina_log_domain_register("ecore_drm2", ECORE_DRM2_DEFAULT_LOG_COLOR);
   if (!_ecore_drm2_log_dom)
     {
        EINA_LOG_ERR("Could not create logging domain for Ecore_Drm2");
        goto log_err;
     }

   ECORE_DRM2_EVENT_OUTPUT_CHANGED = ecore_event_type_new();
   ECORE_DRM2_EVENT_ACTIVATE = ecore_event_type_new();

   if (!_ecore_drm2_link()) goto link_err;

   return _ecore_drm2_init_count;

link_err:
   eina_log_domain_unregister(_ecore_drm2_log_dom);
   _ecore_drm2_log_dom = -1;
log_err:
   elput_shutdown();
elput_err:
   eeze_shutdown();
eeze_err:
   ecore_shutdown();
ecore_err:
   eina_shutdown();
eina_err:
   return --_ecore_drm2_init_count;
}
示例#13
0
文件: log.c 项目: jeanguyomarch/Email
int
log_init(void)
{
   __log_dom = eina_log_domain_register(PACKAGE, EINA_COLOR_YELLOW);
   if (EINA_UNLIKELY(__log_dom < 0))
     {
        EINA_LOG_CRIT("Failed to register log domain");
        return 0;
     }
   return 1;
}
示例#14
0
/**
 * @internal
 * @brief Initialize the simple xml parser module.
 *
 * @return #EINA_TRUE on success, #EINA_FALSE on failure.
 *
 * This function sets up the simple xml parser module of Eina. It is called by
 * eina_init().
 *
 * @see eina_init()
 */
Eina_Bool
eina_simple_xml_init(void)
{
   const char *choice, *tmp;

   _eina_simple_xml_log_dom = eina_log_domain_register("eina_simple_xml",
                                                       EINA_LOG_COLOR_DEFAULT);
   if (_eina_simple_xml_log_dom < 0)
     {
        EINA_LOG_ERR("Could not register log domain: eina_simple_xml");
        return EINA_FALSE;
     }

#ifdef EINA_DEFAULT_MEMPOOL
   choice = "pass_through";
#else
   choice = "chained_mempool";
#endif
   tmp = getenv("EINA_MEMPOOL");
   if (tmp && tmp[0])
      choice = tmp;

   _eina_simple_xml_tag_mp = eina_mempool_add
         (choice, "simple_xml_tag", NULL,
          sizeof(Eina_Simple_XML_Node_Tag), 32);
   if (!_eina_simple_xml_tag_mp)
     {
        ERR("Mempool for simple_xml_tag cannot be allocated in init.");
        goto on_init_fail;
     }

   _eina_simple_xml_attribute_mp = eina_mempool_add
         (choice, "simple_xml_attribute", NULL,
          sizeof(Eina_Simple_XML_Attribute), 8);
   if (!_eina_simple_xml_attribute_mp)
     {
        ERR("Mempool for simple_xml_attribute cannot be allocated in init.");
        eina_mempool_del(_eina_simple_xml_tag_mp);
        goto on_init_fail;
     }

#define EMS(n) eina_magic_string_static_set(n, n ## _STR)
   EMS(EINA_MAGIC_SIMPLE_XML_TAG);
   EMS(EINA_MAGIC_SIMPLE_XML_DATA);
   EMS(EINA_MAGIC_SIMPLE_XML_ATTRIBUTE);
#undef EMS

   return EINA_TRUE;

on_init_fail:
   eina_log_domain_unregister(_eina_simple_xml_log_dom);
   _eina_simple_xml_log_dom = -1;
   return EINA_FALSE;
}
示例#15
0
/**
 * @brief Initialize the store library and all it's required submodules.
 * @return 1 or greater on success, 0 otherwise.
 */
int
store_init(void)
{
   if (++_store_init_count != 1)
     return _store_init_count;

   if (!eina_init())
     {
        fprintf(stderr, "Store can not initialize Eina\n");
        return --_store_init_count;
     }

   _store_log_dom_global = eina_log_domain_register("store", EINA_COLOR_RED);
   if (_store_log_dom_global < 0)
     {
        EINA_LOG_ERR("Store can not create a general log domain");
        goto shutdown_eina;
     }

   if (!ecore_init())
     {
        ERR("Can not initialize Ecore");
        goto unregister_log_domain;
     }

   if (!ecore_con_init())
     {
        ERR("Can not initialize Ecore_Con");
        goto shutdown_ecore;
     }

   if (!ecore_con_url_init())
     {
        ERR("Can not initialize Ecore_Con_Url");
        goto shutdown_ecore_con;
     }

   if (!ecore_con_url_pipeline_get())
     ecore_con_url_pipeline_set(EINA_TRUE);

   return _store_init_count;

shutdown_ecore_con:
   ecore_con_shutdown();
shutdown_ecore:
   ecore_shutdown();
unregister_log_domain:
   eina_log_domain_unregister(_store_log_dom_global);
   _store_log_dom_global = -1;
shutdown_eina:
   eina_shutdown();
   return --_store_init_count;
}
示例#16
0
EAPI void
elm_ext_init()
{

   Elm_Theme *th = elm_theme_default_get();

   elm_theme_extension_add(th, THEME_PATH"/elm_ext.edc.edj");

   elm_theme_flush(th);

   log_domain = eina_log_domain_register("elm_ext", NULL);
}
示例#17
0
/**
 * @internal
 * @brief Initialize the convert module.
 *
 * @return #EINA_TRUE on success, #EINA_FALSE on failure.
 *
 * This function sets up the convert module of Eina. It is called by
 * eina_init().
 *
 * @see eina_init()
 */
Eina_Bool
eina_convert_init(void)
{
   _eina_convert_log_dom = eina_log_domain_register("eina_convert",
                                                    EINA_LOG_COLOR_DEFAULT);
   if (_eina_convert_log_dom < 0)
     {
        EINA_LOG_ERR("Could not register log domain: eina_convert");
        return EINA_FALSE;
     }
   return EINA_TRUE;
}
示例#18
0
文件: efreet_ini.c 项目: jgfenix/efl
/**
 * @internal
 * @return Returns > 0 on success or 0 on failure
 * @brief Initialize the Ini parser subsystem
 */
int
efreet_ini_init(void)
{
    _efreet_ini_log_dom = eina_log_domain_register
                          ("efreet_ini", EFREET_DEFAULT_LOG_COLOR);
    if (_efreet_ini_log_dom < 0)
    {
        EINA_LOG_ERR("Efreet: Could not create a log domain for efreet_ini");
        return 0;
    }
    return 1;
}
示例#19
0
static void
_colourablesquare_size_constructor(Eo *obj, ColourableSquare_Data *self, int size)
{
   if(!_colourablesquare_impl_logdomain)
     {
        _colourablesquare_impl_logdomain
          = eina_log_domain_register
          ("colourablesquare", EINA_COLOR_LIGHTBLUE);
     }
   self->size = size;
   DBG("_colourablesquare_constructor(%d)\n", size);
   eo_do_super(obj, MY_CLASS, eo_constructor());
}
示例#20
0
/**
 * @brief Initialize Azy
 *
 * This function initializes error handlers, events, and
 * logging functions for Azy and must be called prior to making any
 * calls.
 * @return The number of times the function has been called, or -1 on failure
 */
int
azy_init(void)
{
   if (++azy_init_count_ != 1)
     return azy_init_count_;
   if (!eina_init()) return 0;
   azy_log_dom = eina_log_domain_register("azy", EINA_COLOR_BLUE);
   if (azy_log_dom < 0)
     {
        ERR("Could not register 'azy' log domain!");
        goto eina_fail;
     }
   if (!ecore_init()) goto fail;
   if (!ecore_con_init()) goto ecore_fail;

   azy_lib_register_errors_();

   AZY_CLIENT_DISCONNECTED = ecore_event_type_new();
   AZY_CLIENT_UPGRADE = ecore_event_type_new();
   AZY_CLIENT_CONNECTED = ecore_event_type_new();
   AZY_CLIENT_RETURN = ecore_event_type_new();
   AZY_CLIENT_RESULT = ecore_event_type_new();
   AZY_CLIENT_ERROR = ecore_event_type_new();

   AZY_SERVER_CLIENT_ADD = ecore_event_type_new();
   AZY_SERVER_CLIENT_UPGRADE = ecore_event_type_new();
   AZY_SERVER_CLIENT_DEL = ecore_event_type_new();

   AZY_EVENT_DOWNLOAD_STATUS = ecore_event_type_new();

   eina_magic_string_set(AZY_MAGIC_SERVER, "Azy_Server");
   eina_magic_string_set(AZY_MAGIC_SERVER_CLIENT, "Azy_Server_Client");
   eina_magic_string_set(AZY_MAGIC_SERVER_MODULE, "Azy_Server_Module");
   eina_magic_string_set(AZY_MAGIC_SERVER_MODULE_DEF, "Azy_Server_Module_Def");
   eina_magic_string_set(AZY_MAGIC_SERVER_MODULE_METHOD, "Azy_Server_Module_Method");
   eina_magic_string_set(AZY_MAGIC_CLIENT, "Azy_Client");
   eina_magic_string_set(AZY_MAGIC_CLIENT_DATA_HANDLER, "Azy_Client_Handler_Data");
   eina_magic_string_set(AZY_MAGIC_NET, "Azy_Net");
   eina_magic_string_set(AZY_MAGIC_VALUE, "Azy_Value");
   eina_magic_string_set(AZY_MAGIC_CONTENT, "Azy_Content");
   return azy_init_count_;

ecore_fail:
   ecore_shutdown();
fail:
   eina_log_domain_unregister(azy_log_dom);
   azy_log_dom = -1;
eina_fail:
   eina_shutdown();
   return 0;
}
示例#21
0
int
elm_main(int argc, char **argv)
{
   unsigned char exit_option = 0;
   char *library_path = NULL;

   enlil_init();
   APP_LOG_DOMAIN = eina_log_domain_register("Enki-Slideshow", "\033[34;1m");

   //ecore_getopt
   Ecore_Getopt_Value values[] =
      { ECORE_GETOPT_VALUE_BOOL(exit_option),
        ECORE_GETOPT_VALUE_BOOL(exit_option),
        ECORE_GETOPT_VALUE_BOOL(exit_option),
        ECORE_GETOPT_VALUE_STR(library_path),
        ECORE_GETOPT_VALUE_BOOL(exit_option), };
   ecore_app_args_set(argc, (const char **) argv);
   int nonargs = ecore_getopt_parse(&options, values, argc, argv);
   if (nonargs < 0)
      return 1;
   else if (nonargs != argc || !library_path)
   {
      fputs("Invalid non-option argument", stderr);
      ecore_getopt_help(stderr, &options);
      return 1;
   }

   if (exit_option) return 0;
   //

   elm_config_finger_size_set(1);

   //
   library = enlil_library_new(NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
                               NULL, NULL, NULL, NULL, NULL, NULL, NULL);

   enlil_library_path_set(library, library_path);

   Enlil_Load *load = enlil_load_new(library, _load_album_done_cb,
                                     _load_done_cb, _load_error_cb, library);

   enlil_load_run(load);
   //

   elm_run();
   enlil_shutdown();

   elm_shutdown();

   return 0;
}
示例#22
0
Eina_Bool one_big_init(void)
{
#ifdef DEBUG
   _eina_one_big_mp_log_dom = eina_log_domain_register("eina_one_big_mempool",
                                                       EINA_LOG_COLOR_DEFAULT);
   if (_eina_one_big_mp_log_dom < 0)
     {
        EINA_LOG_ERR("Could not register log domain: eina_one_big_mempool");
        return EINA_FALSE;
     }

#endif
   return eina_mempool_register(&_eina_one_big_mp_backend);
}
示例#23
0
Eina_Bool
log_init(void)
{
   _war2edit_log_dom = eina_log_domain_register("war2edit", EINA_COLOR_GREEN);
   if (EINA_UNLIKELY(_war2edit_log_dom < 0))
     {
        EINA_LOG_CRIT("Failed to create log domain");
        goto fail;
     }

   return EINA_TRUE;
fail:
   return EINA_FALSE;
}
示例#24
0
文件: emusic.c 项目: mink365/e_music
	int
main(int argc, char **argv)
{
	em = E_MUSIC_NEW(Em_Smart_Data);


	/*     Init  Local     */
	char *curlocale=setlocale(LC_ALL, "");
	curlocale=curlocale?curlocale:setlocale(LC_ALL, "C");
	//    mylocale = curlocale?strdup(curlocale):NULL;
	bindtextdomain("e_music", LOCALEDIR);
	textdomain("e_music");

	/*      have to init it    */
	if (!eina_init())
	{
		fprintf(stderr, "ERROR: failed to init eina.");
		exit(-1);
	}
	_log_dom = eina_log_domain_register("E-music", EINA_COLOR_CYAN);
	if (_log_dom < 0)
	{
		EINA_LOG_ERR("could not register E-music log domain.");
		_log_dom = EINA_LOG_DOMAIN_GLOBAL;
	}
	eina_log_domain_level_set("E-music", 3);

	eet_init();
	emusic_config_init(NULL);
	emusic_config_load_theme();
	eina_log_domain_level_set("E-music", emusic_config->log_level);

	if (!emusic_playback_init(em))
	{
		ERR("could not init playback.\n");
		return 0;
	}

	elm_init(argc, argv);
	elm_main();

	/*  Main Loop*/
	elm_run();

	emusic_config_shutdown();
	eina_log_domain_unregister(_log_dom);	
	elm_shutdown();
	
	return 0;
}
示例#25
0
static Ekeko_Type * _document_type_get(void)
{
	static Ekeko_Type *type = NULL;

	if (!type)
	{
		_dom = eina_log_domain_register("eon:document", NULL);
		type = ekeko_type_new(EON_TYPE_DOCUMENT, sizeof(Eon_Document),
				sizeof(Eon_Document_Private), ekeko_object_type_get(),
				_ctor, _dtor, _appendable);
	}

	return type;
}
示例#26
0
/**
 * Initializes the service info module.
 *
 * @return On error, returns 0. Otherwise, returns the number of times it's been
 * called.
 */
Eina_Bool
eupnp_service_info_init(void)
{
   if ((_log_dom =
	eina_log_domain_register("Eupnp.ServiceInfo", EINA_COLOR_BLUE)) < 0)
     {
	EINA_LOG_DOM_ERR
	  (EUPNP_LOGGING_DOM_GLOBAL,
	   "Failed to create logging domain for service info module.");
	return EINA_FALSE;
     }

   INF("Initializing service info module.");
   return EINA_TRUE;
}
示例#27
0
/**
 * @internal
 * @brief Initialize the module loader module.
 *
 * @return #EINA_TRUE on success, #EINA_FALSE on failure.
 *
 * This function sets up the module loader module of Eina. It is
 * called by eina_init().
 *
 * This function sets up the module module of Eina. It also registers
 * the errors #EINA_ERROR_WRONG_MODULE and
 * #EINA_ERROR_MODULE_INIT_FAILED.
 *
 * @see eina_init()
 */
Eina_Bool eina_module_init(void)
{
	EINA_MODULE_LOG_DOM = eina_log_domain_register
	    ("eina_module", EINA_LOG_COLOR_DEFAULT);
	if (EINA_MODULE_LOG_DOM < 0) {
		EINA_LOG_ERR("Could not register log domain: eina_module");
		return EINA_FALSE;
	}
#define EEMR(n) n = eina_error_msg_static_register(n ## _STR)
	EEMR(EINA_ERROR_WRONG_MODULE);
	EEMR(EINA_ERROR_MODULE_INIT_FAILED);
#undef EEMR

	return EINA_TRUE;
}
示例#28
0
文件: eina_magic.c 项目: Limsik/e17
/**
 * @internal
 * @brief Initialize the magic string module.
 *
 * @return #EINA_TRUE on success, #EINA_FALSE on failure.
 *
 * This function sets up the magic string module of Eina. It is called by
 * eina_init().
 *
 * @see eina_init()
 */
Eina_Bool
eina_magic_string_init(void)
{
   _eina_magic_string_log_dom = eina_log_domain_register
         ("eina_magic_string", EINA_LOG_COLOR_DEFAULT);
   if (_eina_magic_string_log_dom < 0)
     {
        EINA_LOG_ERR("Could not register log domain: eina_magic_string");
        return EINA_FALSE;
     }
   EINA_ERROR_MAGIC_FAILED = eina_error_msg_static_register(
         EINA_ERROR_MAGIC_FAILED_STR);

   return EINA_TRUE;
}
示例#29
0
文件: efx.c 项目: tasn/enlightenment
EAPI int
e_efx_init(void)
{
   if (++_e_efx_init_count > 1) return _e_efx_init_count;

   if (eina_init() < 1) goto err;

   _e_efx_log_dom = eina_log_domain_register("e_efx", EINA_COLOR_GREEN);
   if (_e_efx_log_dom < 0) goto lgerr;
   return _e_efx_init_count;
lgerr:
   eina_shutdown();
err:
   return --_e_efx_init_count;
   (void)e_efx_speed_str;
}
示例#30
0
int
efreet_util_init(void)
{
    if (init++) return init;
    _efreet_utils_log_dom = eina_log_domain_register
      ("efreet_util", EFREET_DEFAULT_LOG_COLOR);
    if (_efreet_utils_log_dom < 0)
    {
        ERROR("Efreet: Could not create a log domain for efreet_util");
        return 0;
    }

    file_id_by_desktop_path = eina_hash_string_superfast_new(EINA_FREE_CB(eina_stringshare_del));

    return init;
}