shell-mobile-providers

## shell-mobile-providers shell-mobile-providers |

## Synopsis

                        ShellGsmMccMnc;
                        ShellMobileAccessMethod;
    enum                ShellMobileAccessMethodType;
                        ShellMobileProvider;
    ShellMobileAccessMethod * shell_mobile_access_method_ref
                                                            (ShellMobileAccessMethod *method);
    void                shell_mobile_access_method_unref    (ShellMobileAccessMethod *method);
    GSList *            shell_mobile_provider_get_cdma_sid  (ShellMobileProvider *provider);
    GSList *            shell_mobile_provider_get_gsm_mcc_mnc
                                                            (ShellMobileProvider *provider);
    ShellMobileProvider * shell_mobile_provider_ref         (ShellMobileProvider *provider);
    void                shell_mobile_provider_unref         (ShellMobileProvider *provider);
    void                shell_mobile_providers_dump         (GHashTable *providers);
    GHashTable *        shell_mobile_providers_parse        (GHashTable **out_ccs);

## Object Hierarchy

      GBoxed
       +----ShellGsmMccMnc

      GBoxed
       +----ShellMobileAccessMethod

      GEnum
       +----ShellMobileAccessMethodType

      GBoxed
       +----ShellMobileProvider

## Description

## Details

### 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;

### enum ShellMobileAccessMethodType

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

### 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;

### 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_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_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_ref ()

    ShellMobileProvider * shell_mobile_provider_ref         (ShellMobileProvider *provider);

### shell_mobile_provider_unref ()

    void                shell_mobile_provider_unref         (ShellMobileProvider *provider);

### shell_mobile_providers_dump ()

    void                shell_mobile_providers_dump         (GHashTable *providers);

### shell_mobile_providers_parse ()

    GHashTable *        shell_mobile_providers_parse        (GHashTable **out_ccs);

`out_ccs` : | (element-type utf8 utf8): a GHashTable containing country codes. [out][allow-none]
Returns : | a hash table where keys are country names gchar, values are a GSList of ShellMobileProvider. Everything is destroyed with `g_hash_table_destroy()`. [element-type utf8 GList][transfer container]