Compatibility functions for gconf settings
[ICd internal functions]


Defines

#define ICD_GCONF_IAP_TYPE   "type"
#define ICD_GCONF_IAP_NAME   "name"
#define ICD_GCONF_IAP_IS_TEMPORARY   "temporary"
#define ICD_GCONF_AGGRESSIVE_SCANNING   "aggressive_scanning"

Functions

static void icd_gconf_check_error (GError **error)
gchar * icd_gconf_get_iap_string (const char *iap_name, const char *key_name)
gchar * icd_gconf_get_iap_bytearray (const char *iap_name, const char *key_name)
gboolean icd_gconf_get_iap_bool (const char *iap_name, const char *key_name, gboolean def)
gint icd_gconf_get_iap_int (const char *iap_name, const char *key_name)
GSList * icd_gconf_get_iap_string_list (const char *iap_name, const char *key_name)
gboolean icd_gconf_is_temporary (const gchar *settings_name)
static gboolean icd_gconf_remove_dir (const gchar *settings_name)
gboolean icd_gconf_remove_temporary (const gchar *settings_name)
gboolean icd_gconf_rename (const gchar *settings_name, const gchar *name)
static void icd_gconf_notify (GConfClient *gconf_client, guint connection_id, GConfEntry *entry, gpointer user_data)
gboolean icd_gconf_add_notify (void)
void icd_gconf_del_notify (void)
static gboolean icd_gconf_agressive_scanning ()

Define Documentation

#define ICD_GCONF_AGGRESSIVE_SCANNING   "aggressive_scanning"

The key holding aggressive scanning setting status

Referenced by icd_gconf_agressive_scanning().

#define ICD_GCONF_IAP_IS_TEMPORARY   "temporary"

The key holding temporary connection setting status

Referenced by icd_gconf_is_temporary(), and icd_gconf_rename().

#define ICD_GCONF_IAP_NAME   "name"

The key holding IAP name

Referenced by icd_gconf_rename().

#define ICD_GCONF_IAP_TYPE   "type"

The key holding the type of an IAP

Referenced by icd_dbus_api_disconnect_req(), and icd_osso_ic_get_type().


Function Documentation

gboolean icd_gconf_add_notify ( void   ) 

Set notification func for gconf changes

Returns:
TRUE on success, FALSE on failure

References icd_context::iap_deletion_notify, icd_context_get(), icd_ctx, and icd_gconf_notify().

Referenced by main().

static gboolean icd_gconf_agressive_scanning (  )  [inline, static]

Check whether the scanning should be initiated when search dialog opens.

Returns:
TRUE if yes, FALSE if not

References ICD_GCONF_AGGRESSIVE_SCANNING, and icd_gconf_get_iap_bool().

Referenced by icd_scan_results_request().

static void icd_gconf_check_error ( GError **  error  )  [static]

void icd_gconf_del_notify ( void   ) 

Remove notification func for gconf changes

References icd_context::iap_deletion_notify, icd_context_get(), and icd_ctx.

Referenced by main().

gboolean icd_gconf_get_iap_bool ( const char *  iap_name,
const char *  key_name,
gboolean  def 
)

Get a boolean value from gconf

Parameters:
iap_name unescaped gconf IAP name
key_name key name
def the default expected value
Returns:
the value of the key

References icd_gconf_check_error().

Referenced by icd_gconf_agressive_scanning(), and icd_gconf_is_temporary().

gchar * icd_gconf_get_iap_bytearray ( const char *  iap_name,
const char *  key_name 
)

Get a byte array from gconf

Parameters:
iap_name unescaped gconf IAP name
key_name key name
Returns:
the key value which is to be freed by the caller or NULL if the value does not exist

References icd_gconf_check_error(), and ILOG_ERR.

gint icd_gconf_get_iap_int ( const char *  iap_name,
const char *  key_name 
)

Get an int from gconf

Parameters:
iap_name unescaped gconf IAP name
key_name key name
Returns:
the key value or zero if the value does not exist

References icd_gconf_check_error().

gchar * icd_gconf_get_iap_string ( const char *  iap_name,
const char *  key_name 
)

Get a string from gconf

Parameters:
iap_name unescaped gconf IAP name
key_name key name
Returns:
the key value which is to be freed by the caller or NULL if the value does not exist

References icd_gconf_check_error().

Referenced by icd_dbus_api_disconnect_req(), icd_osso_ic_get_type(), and icd_wlan_defs_get_secmode().

GSList * icd_gconf_get_iap_string_list ( const char *  iap_name,
const char *  key_name 
)

Get a string list from gconf

Parameters:
iap_name unescaped gconf IAP name
key_name key name
Returns:
a GSList with the values which are all to be freed by the caller or NULL

References icd_gconf_check_error().

gboolean icd_gconf_is_temporary ( const gchar *  settings_name  ) 

Check wheter the setting is temporary

Parameters:
settings_name name of the IAP
Returns:
TRUE if yes, FALSE if not

References icd_gconf_get_iap_bool(), ICD_GCONF_IAP_IS_TEMPORARY, and ILOG_DEBUG.

Referenced by icd_gconf_remove_dir(), and icd_iap_post_up_script_done().

static void icd_gconf_notify ( GConfClient *  gconf_client,
guint  connection_id,
GConfEntry *  entry,
gpointer  user_data 
) [static]

Notice if IAP is removed in gconf.

References icd_scan_cache_remove_iap(), and ILOG_DEBUG.

Referenced by icd_gconf_add_notify().

static gboolean icd_gconf_remove_dir ( const gchar *  settings_name  )  [static]

Remove a gconf directory if it is a temporary IAP

Parameters:
settings_name escaped IAP name
Returns:
TRUE if the gconf directory got removed, FALSE otherwise

References icd_gconf_check_error(), icd_gconf_is_temporary(), and ILOG_DEBUG.

Referenced by icd_gconf_remove_temporary().

gboolean icd_gconf_remove_temporary ( const gchar *  settings_name  ) 

Remove temporary IAPs from gconf

Parameters:
settings_name name of temporary IAP to remove or NULL for all
Returns:
TRUE if at least one IAP was removed, FALSE otherwise

References icd_gconf_check_error(), and icd_gconf_remove_dir().

Referenced by icd_iap_free(), and main().

gboolean icd_gconf_rename ( const gchar *  settings_name,
const gchar *  name 
)

Rename settings

Parameters:
settings_name current IAP settings name
name new name of the settings
Returns:
TRUE on success, FALSE on failure

References ICD_GCONF_IAP_IS_TEMPORARY, ICD_GCONF_IAP_NAME, and ILOG_ERR.

Referenced by icd_iap_rename().


Generated on Thu Mar 11 09:04:50 2010 for ICd2 by  doxygen 1.5.6