## NMAMobileProvidersDatabase NMAMobileProvidersDatabase |

## Functions

NMAMobileAccessMethod * | nma_mobile_access_method_ref ()
void | nma_mobile_access_method_unref ()
const gchar * | nma_mobile_access_method_get_name ()
const gchar * | nma_mobile_access_method_get_username ()
const gchar * | nma_mobile_access_method_get_password ()
const gchar * | nma_mobile_access_method_get_gateway ()
const gchar ** | nma_mobile_access_method_get_dns ()
const gchar * | nma_mobile_access_method_get_3gpp_apn ()
NMAMobileFamily | nma_mobile_access_method_get_family ()
NMAMobileProvider * | nma_mobile_provider_ref ()
void | nma_mobile_provider_unref ()
const gchar * | nma_mobile_provider_get_name ()
GSList * | nma_mobile_provider_get_methods ()
const gchar ** | nma_mobile_provider_get_3gpp_mcc_mnc ()
const guint32 * | nma_mobile_provider_get_cdma_sid ()
NMACountryInfo * | nma_country_info_ref ()
void | nma_country_info_unref ()
const gchar * | nma_country_info_get_country_code ()
const gchar * | nma_country_info_get_country_name ()
GSList * | nma_country_info_get_providers ()
void | nma_mobile_providers_database_new ()
NMAMobileProvidersDatabase * | nma_mobile_providers_database_new_finish ()
NMAMobileProvidersDatabase * | nma_mobile_providers_database_new_sync ()
GHashTable * | nma_mobile_providers_database_get_countries ()
void | nma_mobile_providers_database_dump ()
NMACountryInfo * | nma_mobile_providers_database_lookup_country ()
NMAMobileProvider * | nma_mobile_providers_database_lookup_3gpp_mcc_mnc ()
NMAMobileProvider * | nma_mobile_providers_database_lookup_cdma_sid ()
gboolean | nma_mobile_providers_split_3gpp_mcc_mnc ()

## Properties

gchar * | country-codes | Read / Write / Construct Only
gchar * | service-providers | Read / Write / Construct Only

## Types and Values

enum | NMAMobileFamily

## Object Hierarchy

        GBoxed
        ├── NMACountryInfo
        ├── NMAMobileAccessMethod
        ╰── NMAMobileProvider
        GObject
        ╰── NMAMobileProvidersDatabase

## Description

## Functions

### nma_mobile_access_method_ref ()

    NMAMobileAccessMethod *
    nma_mobile_access_method_ref (NMAMobileAccessMethod *method);

### nma_mobile_access_method_unref ()

    void
    nma_mobile_access_method_unref (NMAMobileAccessMethod *method);

### nma_mobile_access_method_get_name ()

    const gchar *
    nma_mobile_access_method_get_name (NMAMobileAccessMethod *method);

#### Parameters

method | a NMAMobileAccessMethod |

#### Returns

the name of the method.

[transfer none]

### nma_mobile_access_method_get_username ()

    const gchar *
    nma_mobile_access_method_get_username (NMAMobileAccessMethod *method);

#### Parameters

method | a NMAMobileAccessMethod |

#### Returns

the username.

[transfer none]

### nma_mobile_access_method_get_password ()

    const gchar *
    nma_mobile_access_method_get_password (NMAMobileAccessMethod *method);

#### Parameters

method | a NMAMobileAccessMethod |

#### Returns

the password.

[transfer none]

### nma_mobile_access_method_get_gateway ()

    const gchar *
    nma_mobile_access_method_get_gateway (NMAMobileAccessMethod *method);

#### Parameters

method | a NMAMobileAccessMethod |

#### Returns

the gateway.

[transfer none]

### nma_mobile_access_method_get_dns ()

    const gchar **
    nma_mobile_access_method_get_dns (NMAMobileAccessMethod *method);

#### Parameters

method | a NMAMobileAccessMethod |

#### Returns

the list of DNS.

[transfer none][array zero-terminated=1][element-type utf8]

### nma_mobile_access_method_get_3gpp_apn ()

    const gchar *
    nma_mobile_access_method_get_3gpp_apn (NMAMobileAccessMethod *method);

#### Parameters

method | a NMAMobileAccessMethod |

#### Returns

the 3GPP APN.

[transfer none]

### nma_mobile_access_method_get_family ()

    NMAMobileFamily
    nma_mobile_access_method_get_family (NMAMobileAccessMethod *method);

#### Parameters

method | a NMAMobileAccessMethod |

#### Returns

a NMAMobileFamily.

### nma_mobile_provider_ref ()

    NMAMobileProvider *
    nma_mobile_provider_ref (NMAMobileProvider *provider);

### nma_mobile_provider_unref ()

    void
    nma_mobile_provider_unref (NMAMobileProvider *provider);

### nma_mobile_provider_get_name ()

    const gchar *
    nma_mobile_provider_get_name (NMAMobileProvider *provider);

#### Parameters

provider | a NMAMobileProvider |

#### Returns

the name of the provider.

[transfer none]

### nma_mobile_provider_get_methods ()

    GSList *
    nma_mobile_provider_get_methods (NMAMobileProvider *provider);

#### Parameters

provider | a NMAMobileProvider |

#### Returns

the list of NMAMobileAccessMethod this provider exposes.

[element-type NMAMobileAccessMethod][transfer none]

### nma_mobile_provider_get_3gpp_mcc_mnc ()

    const gchar **
    nma_mobile_provider_get_3gpp_mcc_mnc (NMAMobileProvider *provider);

#### Parameters

provider | a NMAMobileProvider |

#### Returns

a list of strings with the MCC and MNC codes this provider exposes.

[transfer none][array zero-terminated=1][element-type utf8]

### nma_mobile_provider_get_cdma_sid ()

    const guint32 *
    nma_mobile_provider_get_cdma_sid (NMAMobileProvider *provider);

#### Parameters

provider | a NMAMobileProvider |

#### Returns

the list of CDMA SIDs this provider exposes.

[transfer none][array zero-terminated=1][element-type guint32]

### nma_country_info_ref ()

    NMACountryInfo *
    nma_country_info_ref (NMACountryInfo *country_info);

### nma_country_info_unref ()

    void
    nma_country_info_unref (NMACountryInfo *country_info);

### nma_country_info_get_country_code ()

    const gchar *
    nma_country_info_get_country_code (NMACountryInfo *country_info);

#### Parameters

country_info | a NMACountryInfo |

#### Returns

the code of the country.

[transfer none]

### nma_country_info_get_country_name ()

    const gchar *
    nma_country_info_get_country_name (NMACountryInfo *country_info);

#### Parameters

country_info | a NMACountryInfo |

#### Returns

the name of the country.

[transfer none]

### nma_country_info_get_providers ()

    GSList *
    nma_country_info_get_providers (NMACountryInfo *country_info);

#### Parameters

country_info | a NMACountryInfo |

#### Returns

the list of NMAMobileProvider this country exposes.

[element-type NMAMobileProvider][transfer none]

### nma_mobile_providers_database_new ()

    void
    nma_mobile_providers_database_new (const gchar *country_codes,
                                       const gchar *service_providers,
                                       GCancellable *cancellable,
                                       GAsyncReadyCallback callback,
                                       gpointer user_data);

#### Parameters

country_codes | Path to the country codes file. | [allow-none]
service_providers | Path to the service providers file. | [allow-none]
cancellable | A GCancellable or `NULL`. | [allow-none]
callback | A GAsyncReadyCallback to call when the request is satisfied. |
user_data | User data to pass to `callback` . |

### nma_mobile_providers_database_new_finish ()

    NMAMobileProvidersDatabase *
    nma_mobile_providers_database_new_finish
                                   (GAsyncResult *res,
                                    GError **error);

#### Parameters

res | The GAsyncResult obtained from the GAsyncReadyCallback passed to `nma_mobile_providers_database_new()`. |
error | Return location for error or `NULL`. |

#### Returns

The constructed object or `NULL` if `error` is set.

[transfer full][type NMAMobileProvidersDatabase]

### nma_mobile_providers_database_new_sync ()

    NMAMobileProvidersDatabase *
    nma_mobile_providers_database_new_sync
                                   (const gchar *country_codes,
                                    const gchar *service_providers,
                                    GCancellable *cancellable,
                                    GError **error);

#### Parameters

country_codes | Path to the country codes file. | [allow-none]
service_providers | Path to the service providers file. | [allow-none]
cancellable | A GCancellable or `NULL`. | [allow-none]
error | Return location for error or `NULL`. |

#### Returns

The constructed object or `NULL` if `error` is set.

[transfer full][type NMAMobileProvidersDatabase]

### nma_mobile_providers_database_get_countries ()

    GHashTable *
    nma_mobile_providers_database_get_countries
                                   (NMAMobileProvidersDatabase *self);

#### Parameters

self | a NMAMobileProvidersDatabase. |

#### Returns

a hash table where keys are country names gchar and values are NMACountryInfo.

[element-type utf8 NMACountryInfo][transfer none]

### nma_mobile_providers_database_dump ()

    void
    nma_mobile_providers_database_dump (NMAMobileProvidersDatabase *self);

#### Parameters

self | a NMAMobileProvidersDatabase. |

### nma_mobile_providers_database_lookup_country ()

    NMACountryInfo *
    nma_mobile_providers_database_lookup_country
                                   (NMAMobileProvidersDatabase *self,
                                    const gchar *country_code);

#### Parameters

self | a NMAMobileProvidersDatabase. |
country_code | the country code string to look for. |

#### Returns

a NMACountryInfo or `NULL` if not found.

[transfer none]

### nma_mobile_providers_database_lookup_3gpp_mcc_mnc ()

    NMAMobileProvider *
    nma_mobile_providers_database_lookup_3gpp_mcc_mnc
                                   (NMAMobileProvidersDatabase *self,
                                    const gchar *mccmnc);

#### Parameters

self | a NMAMobileProvidersDatabase. |
mccmnc | the MCC/MNC string to look for. |

#### Returns

a NMAMobileProvider or `NULL` if not found.

[transfer none]

### nma_mobile_providers_database_lookup_cdma_sid ()

    NMAMobileProvider *
    nma_mobile_providers_database_lookup_cdma_sid
                                   (NMAMobileProvidersDatabase *self,
                                    guint32 sid);

#### Parameters

self | a NMAMobileProvidersDatabase. |
sid | the SID to look for. |

#### Returns

a NMAMobileProvider, or `NULL` if not found.

[transfer none]

### nma_mobile_providers_split_3gpp_mcc_mnc ()

    gboolean
    nma_mobile_providers_split_3gpp_mcc_mnc
                                   (const gchar *mccmnc,
                                    gchar **mcc,
                                    gchar **mnc);

Splits the input MCCMNC string into separate MCC and MNC strings.

#### Parameters

mccmnc | input MCCMNC string. |
mcc | the MCC. | [out][transfer full]
mnc | the MNC. | [out][transfer full]

#### Returns

`TRUE` if correctly split and `mcc` and `mnc` are set; `FALSE` otherwise.

## Types and Values

### enum NMAMobileFamily

#### Members

NMA_MOBILE_FAMILY_UNKNOWN | Unknown or invalid network access method |
NMA_MOBILE_FAMILY_3GPP | 3rd Generation Partnership Project (3GPP) network |
NMA_MOBILE_FAMILY_CDMA | A CDMA network |

## Property Details

### The `“country-codes”` property

      “country-codes”            gchar *

Path to the country codes file.

Flags: Read / Write / Construct Only

Default value: NULL

### The `“service-providers”` property

      “service-providers”        gchar *

Path to the service providers file.

Flags: Read / Write / Construct Only

Default value: NULL