Network priority assignment
[ICd internal functions]


Defines

#define ICD_NW_PRIO_SRV_PREF   500
#define PREFERRED_SERVICE_ID
#define PREFERRED_SERVICE_TYPE
#define ICD_NW_TYPE_WLAN   "WLAN_"
#define ICD_NW_PRIO_WLAN   60
#define ICD_NW_TYPE_WIMAX   "WIMAX"
#define ICD_NW_PRIO_WIMAX   50
#define ICD_NW_TYPE_GPRS   "GPRS"
#define ICD_NW_PRIO_GPRS   45
#define ICD_NW_TYPE_DUN_GSM_PS   "DUN_GSM_PS"
#define ICD_NW_TYPE_DUN_CDMA_PSD   "DUN_CDMA_PSD"
#define ICD_NW_PRIO_DUN_PS   40
#define ICD_NW_TYPE_DUN_GSM_CS   "DUN_GSM_CS"
#define ICD_NW_TYPE_DUN_CDMA_CSD   "DUN_CDMA_CSD"
#define ICD_NW_TYPE_DUN_CDMA_QNC   "DUN_CDMA_QNC"
#define ICD_NW_PRIO_DUN_CS   30
#define ICD_NW_PRIO_HIGHEST   ICD_NW_PRIO_WLAN
#define ICD_NW_PRIO_SAVED_BOOSTER_VALUE   100

Functions

void icd_network_priority_pref_init (void)
gint icd_network_priority_get (const gchar *srv_type, const gchar *srv_id, const gchar *network_type, const guint network_attrs)
gboolean icd_network_priority (const gchar *srv_type, const gchar *srv_id, const gchar *network_type, const guint network_attrs, gint *network_priority)

Variables

static gchar * preferred_id = NULL
static gchar * preferred_type = NULL

Define Documentation

#define ICD_NW_PRIO_DUN_CS   30

GSM/CDMA circuit switched priority

Referenced by icd_network_priority_get().

#define ICD_NW_PRIO_DUN_PS   40

GSM/CDMA packet data priority

Referenced by icd_network_priority_get().

#define ICD_NW_PRIO_GPRS   45

WiMax priority

#define ICD_NW_PRIO_HIGHEST   ICD_NW_PRIO_WLAN

What is the highest normal (not preferred) priority

Referenced by icd_network_priority().

#define ICD_NW_PRIO_SAVED_BOOSTER_VALUE   100

The saved IAP priority is made higher

Referenced by icd_network_priority(), and icd_network_priority_get().

#define ICD_NW_PRIO_SRV_PREF   500

preferred service network priority

Referenced by icd_network_priority_get().

#define ICD_NW_PRIO_WIMAX   50

WiMax priority

Referenced by icd_network_priority_get().

#define ICD_NW_PRIO_WLAN   60

WLAN priority

Referenced by icd_network_priority_get().

#define ICD_NW_TYPE_DUN_CDMA_CSD   "DUN_CDMA_CSD"

CDMA circuit switched network

Referenced by icd_network_priority_get().

#define ICD_NW_TYPE_DUN_CDMA_PSD   "DUN_CDMA_PSD"

CDMA packet data network

Referenced by icd_network_priority_get().

#define ICD_NW_TYPE_DUN_CDMA_QNC   "DUN_CDMA_QNC"

CDMA Quick Net connect network

Referenced by icd_network_priority_get().

#define ICD_NW_TYPE_DUN_GSM_CS   "DUN_GSM_CS"

GSM circuit switched network

Referenced by icd_network_priority_get().

#define ICD_NW_TYPE_DUN_GSM_PS   "DUN_GSM_PS"

GSM GPRS network

Referenced by icd_network_priority_get().

#define ICD_NW_TYPE_GPRS   "GPRS"

GPRS network

#define ICD_NW_TYPE_WIMAX   "WIMAX"

WiMAX network

Referenced by icd_network_priority_get().

#define ICD_NW_TYPE_WLAN   "WLAN_"

WLAN network prefix

Referenced by icd_network_priority_get().

#define PREFERRED_SERVICE_ID

Value:

ICD_GCONF_SETTINGS \
                                 "/srv_provider/preferred_id"
preferred service id

Referenced by icd_network_priority_pref_init().

#define PREFERRED_SERVICE_TYPE

Value:

ICD_GCONF_SETTINGS \
                                 "/srv_provider/preferred_type"
preferred service type

Referenced by icd_network_priority_pref_init().


Function Documentation

gboolean icd_network_priority ( const gchar *  srv_type,
const gchar *  srv_id,
const gchar *  network_type,
const guint  network_attrs,
gint *  network_priority 
)

Check if there are more higher priority networks available. Return also the priority if the return pointer is set. This function can be called by policy module like policy_always_online.so

Parameters:
srv_type service type or NULL if none
srv_id service id or NULL if none
network_type network type
network_attrs network attrs
the network priority (returned to caller)
Returns:
TRUE if found higher priority network types, FALSE if not found
Check if there are more higher priority networks available. Return also the priority if the return pointer is set. This function can be called from policy modules (like policy_always_online.so calls this func)
Parameters:
srv_type service type or NULL if none
srv_id service id or NULL if none
network_type network type
network_attrs network attrs
the network priority (returned to caller)
Returns:
TRUE if found higher priority network types, FALSE if not found

References icd_network_priority_get(), ICD_NW_ATTR_IAPNAME, ICD_NW_PRIO_HIGHEST, ICD_NW_PRIO_SAVED_BOOSTER_VALUE, preferred_id, and preferred_type.

Referenced by icd_policy_api_init_cb().

gint icd_network_priority_get ( const gchar *  srv_type,
const gchar *  srv_id,
const gchar *  network_type,
const guint  network_attrs 
)

Set static network priority for the cahce entry

Parameters:
srv_type service type or NULL if none
srv_id service id or NULL if none
network_type network type
network_attrs network attrs
Returns:
the network priority

References ICD_NW_ATTR_IAPNAME, ICD_NW_PRIO_DUN_CS, ICD_NW_PRIO_DUN_PS, ICD_NW_PRIO_SAVED_BOOSTER_VALUE, ICD_NW_PRIO_SRV_PREF, ICD_NW_PRIO_WIMAX, ICD_NW_PRIO_WLAN, ICD_NW_TYPE_DUN_CDMA_CSD, ICD_NW_TYPE_DUN_CDMA_PSD, ICD_NW_TYPE_DUN_CDMA_QNC, ICD_NW_TYPE_DUN_GSM_CS, ICD_NW_TYPE_DUN_GSM_PS, ICD_NW_TYPE_WIMAX, ICD_NW_TYPE_WLAN, preferred_id, and preferred_type.

Referenced by icd_network_priority(), icd_request_add_iap(), icd_scan_cb(), and icd_srv_provider_identify_cb().

void icd_network_priority_pref_init ( void   ) 

(Re)set preferred service type and id

References ILOG_DEBUG, preferred_id, PREFERRED_SERVICE_ID, PREFERRED_SERVICE_TYPE, and preferred_type.

Referenced by main().


Variable Documentation

gchar* preferred_id = NULL [static]

gchar* preferred_type = NULL [static]


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