Typedefs | Functions
Ecore Connection Library Functions

Utility functions that set up and shut down the Ecore Connection library. More...

Typedefs

typedef void(* Ecore_Con_Dns_Cb) (const char *canonname, const char *ip, struct sockaddr *addr, int addrlen, void *data)
 A callback type for use with ecore_con_lookup.
 

Functions

ECORE_CON_API int ecore_con_init (void)
 Initializes the Ecore_Con library. More...
 
ECORE_CON_API int ecore_con_shutdown (void)
 Shuts down the Ecore_Con library. More...
 
ECORE_CON_API Eina_Bool ecore_con_lookup (const char *name, Ecore_Con_Dns_Cb done_cb, const void *data)
 Do an asynchronous DNS lookup. More...
 

Detailed Description

Utility functions that set up and shut down the Ecore Connection library.

There's also ecore_con_lookup() that can be used to make simple asynchronous DNS lookups.

A simple example of how to use these functions:

Function Documentation

◆ ecore_con_init()

ECORE_CON_API int ecore_con_init ( void  )

Initializes the Ecore_Con library.

Returns
Number of times the library has been initialised without being shut down.
Note
This function already calls ecore_init() internally, so you don't need to call it explicitly.

References ecore_init(), ecore_shutdown(), eina_init(), eina_log_domain_register(), EINA_LOG_ERR, EINA_LOG_STATE_INIT, EINA_LOG_STATE_STOP, eina_log_timing(), eina_shutdown(), evil_init(), and evil_shutdown().

Referenced by ecore_con_url_init(), ecore_ipc_init(), and elm_quicklaunch_sub_init().

◆ ecore_con_shutdown()

ECORE_CON_API int ecore_con_shutdown ( void  )

Shuts down the Ecore_Con library.

Returns
Number of times the library has been initialised without being shut down.
Note
This function already calls ecore_shutdown() internally, so you don't need to call it explicitly unless you called ecore_init() explicitly too.

References ecore_shutdown(), eina_log_domain_unregister(), EINA_LOG_STATE_SHUTDOWN, EINA_LOG_STATE_START, eina_log_timing(), eina_shutdown(), ERR, and evil_shutdown().

Referenced by ecore_con_url_init(), ecore_con_url_shutdown(), elm_quicklaunch_sub_init(), and elm_quicklaunch_sub_shutdown().

◆ ecore_con_lookup()

ECORE_CON_API Eina_Bool ecore_con_lookup ( const char *  name,
Ecore_Con_Dns_Cb  done_cb,
const void *  data 
)

Do an asynchronous DNS lookup.

This function performs a DNS lookup on the hostname specified by name, then calls done_cb with the result and the data given as parameter. The result will be given to the done_cb as follows:

canonname - the canonical name of the address, ip - the resolved ip address, addr - a pointer to the socket address, addrlen - the length of the socket address, in bytes, data - the data pointer given as parameter.

Parameters
[in]nameIP address or server name to translate.
[in]done_cbCallback to notify when done.
[in]dataUser data to be given to done_cb.
Returns
true if the request did not fail to be set up, false otherwise.
Examples
ecore_con_lookup_example.c.

References EINA_FALSE, eina_list_append(), EINA_SAFETY_ON_NULL_GOTO, EINA_SAFETY_ON_NULL_RETURN_VAL, EINA_SAFETY_ON_TRUE_RETURN_VAL, and EINA_TRUE.