shell-mobile-providers

shell-mobile-providers

Synopsis

enum                ShellMobileAccessMethodType;
                    ShellGsmMccMnc;
                    ShellMobileAccessMethod;
                    ShellMobileProvider;
                    ShellCountryMobileProvider;
ShellMobileProvider * shell_mobile_provider_ref         (ShellMobileProvider *provider);
void                shell_mobile_provider_unref         (ShellMobileProvider *provider);
GSList *            shell_mobile_provider_get_gsm_mcc_mnc
                                                        (ShellMobileProvider *provider);
GSList *            shell_mobile_provider_get_cdma_sid  (ShellMobileProvider *provider);
ShellMobileAccessMethod * shell_mobile_access_method_ref
                                                        (ShellMobileAccessMethod *method);
void                shell_mobile_access_method_unref    (ShellMobileAccessMethod *method);
ShellCountryMobileProvider * shell_country_mobile_provider_ref
                                                        (ShellCountryMobileProvider *country_provider);
void                shell_country_mobile_provider_unref (ShellCountryMobileProvider *country_provider);
const gchar *       shell_country_mobile_provider_get_country_code
                                                        (ShellCountryMobileProvider *country_provider);
const gchar *       shell_country_mobile_provider_get_country_name
                                                        (ShellCountryMobileProvider *country_provider);
GSList *            shell_country_mobile_provider_get_providers
                                                        (ShellCountryMobileProvider *country_provider);
GHashTable *        shell_mobile_providers_parse        (const gchar *country_codes,
                                                         const gchar *service_providers);
void                shell_mobile_providers_dump         (GHashTable *country_providers);

Object Hierarchy

  GEnum
   +----ShellMobileAccessMethodType
  GBoxed
   +----ShellGsmMccMnc
  GBoxed
   +----ShellMobileAccessMethod
  GBoxed
   +----ShellMobileProvider
  GBoxed
   +----ShellCountryMobileProvider

Description

Details

enum ShellMobileAccessMethodType

typedef enum {
    SHELL_MOBILE_ACCESS_METHOD_TYPE_UNKNOWN = 0,
    SHELL_MOBILE_ACCESS_METHOD_TYPE_GSM,
    SHELL_MOBILE_ACCESS_METHOD_TYPE_CDMA
} ShellMobileAccessMethodType;

ShellGsmMccMnc

typedef struct {
    char *mcc;
    char *mnc;
} ShellGsmMccMnc;

ShellMobileAccessMethod

typedef struct {
    char *name;
    /* maps lang (char *) -> name (char *) */
    GHashTable *lcl_names;

    char *username;
    char *password;
    char *gateway;
    GSList *dns; /* GSList of 'char *' */

    /* Only used with SHELL_PROVIDER_TYPE_GSM */
    char *gsm_apn;

    ShellMobileAccessMethodType type;

    gint refs;
} ShellMobileAccessMethod;

ShellMobileProvider

typedef struct {
    char *name;
    /* maps lang (char *) -> name (char *) */
    GHashTable *lcl_names;

    GSList *methods; /* GSList of ShellMobileAccessMethod */

    GSList *gsm_mcc_mnc; /* GSList of ShellGsmMccMnc */
    GSList *cdma_sid; /* GSList of guint32 */

    gint refs;
} ShellMobileProvider;

ShellCountryMobileProvider

typedef struct {
    char *country_code;
    char *country_name;
    GSList *providers;

    gint refs;
} ShellCountryMobileProvider;

shell_mobile_provider_ref ()

ShellMobileProvider * shell_mobile_provider_ref         (ShellMobileProvider *provider);

shell_mobile_provider_unref ()

void                shell_mobile_provider_unref         (ShellMobileProvider *provider);

shell_mobile_provider_get_gsm_mcc_mnc ()

GSList *            shell_mobile_provider_get_gsm_mcc_mnc
                                                        (ShellMobileProvider *provider);

provider :

a ShellMobileProvider

Returns :

the list of ShellGsmMccMnc this provider exposes. [element-type Shell.GsmMccMnc][transfer none]

shell_mobile_provider_get_cdma_sid ()

GSList *            shell_mobile_provider_get_cdma_sid  (ShellMobileProvider *provider);

provider :

a ShellMobileProvider

Returns :

the list of CDMA sids this provider exposes. [element-type guint32][transfer none]

shell_mobile_access_method_ref ()

ShellMobileAccessMethod * shell_mobile_access_method_ref
                                                        (ShellMobileAccessMethod *method);

shell_mobile_access_method_unref ()

void                shell_mobile_access_method_unref    (ShellMobileAccessMethod *method);

shell_country_mobile_provider_ref ()

ShellCountryMobileProvider * shell_country_mobile_provider_ref
                                                        (ShellCountryMobileProvider *country_provider);

shell_country_mobile_provider_unref ()

void                shell_country_mobile_provider_unref (ShellCountryMobileProvider *country_provider);

shell_country_mobile_provider_get_country_code ()

const gchar *       shell_country_mobile_provider_get_country_code
                                                        (ShellCountryMobileProvider *country_provider);

Returns :

the code of the country. [transfer none]

shell_country_mobile_provider_get_country_name ()

const gchar *       shell_country_mobile_provider_get_country_name
                                                        (ShellCountryMobileProvider *country_provider);

Returns :

the name of the country. [transfer none]

shell_country_mobile_provider_get_providers ()

GSList *            shell_country_mobile_provider_get_providers
                                                        (ShellCountryMobileProvider *country_provider);

Returns :

the list of ShellMobileProvider this country exposes. [element-type Shell.MobileProvider][transfer none]

shell_mobile_providers_parse ()

GHashTable *        shell_mobile_providers_parse        (const gchar *country_codes,
                                                         const gchar *service_providers);

country_codes :

(allow-none) File with the list of country codes.

service_providers :

(allow-none) File with the list of service providers.

Returns :

a hash table where keys are country names gchar and values are ShellCountryMobileProvider. Everything is destroyed with g_hash_table_destroy(). [element-type utf8 Shell.CountryMobileProvider][transfer full]

shell_mobile_providers_dump ()

void                shell_mobile_providers_dump         (GHashTable *country_providers);