NMA.MobileProvidersDatabase

g GObject.GInterface GObject.GInterface Gio.AsyncInitable Gio.AsyncInitable GObject.GInterface->Gio.AsyncInitable Gio.Initable Gio.Initable GObject.GInterface->Gio.Initable GObject.Object GObject.Object NMA.MobileProvidersDatabase NMA.MobileProvidersDatabase GObject.Object->NMA.MobileProvidersDatabase Gio.AsyncInitable->NMA.MobileProvidersDatabase Gio.Initable->NMA.MobileProvidersDatabase

Subclasses:

None

Methods

Inherited:

GObject.Object (37), Gio.AsyncInitable (4), Gio.Initable (2)

Structs:

GObject.ObjectClass (5)

class

new (country_codes, service_providers, cancellable, callback, *user_data)

class

new_finish (res)

class

new_sync (country_codes, service_providers, cancellable)

dump ()

get_countries ()

lookup_3gpp_mcc_mnc (mccmnc)

lookup_cdma_sid (sid)

lookup_country (country_code)

Virtual Methods

Inherited:

GObject.Object (7), Gio.AsyncInitable (2), Gio.Initable (1)

Properties

Name

Type

Flags

Short Description

country-codes

str

r/w/co

Path to the country codes file

service-providers

str

r/w/co

Path to the service providers file

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent

GObject.Object

r

Class Details

class NMA.MobileProvidersDatabase(**kwargs)
Bases:

GObject.Object, Gio.AsyncInitable, Gio.Initable

Abstract:

No

Structure:

NMA.MobileProvidersDatabaseClass

classmethod new(country_codes, service_providers, cancellable, callback, *user_data)
Parameters:
classmethod new_finish(res)
Parameters:

res (Gio.AsyncResult) – The Gio.AsyncResult obtained from the Gio.AsyncReadyCallback passed to NMA.MobileProvidersDatabase.new().

Raises:

GLib.Error

Returns:

The constructed object or None if error is set.

Return type:

NMA.MobileProvidersDatabase

classmethod new_sync(country_codes, service_providers, cancellable)
Parameters:
Raises:

GLib.Error

Returns:

The constructed object or None if error is set.

Return type:

NMA.MobileProvidersDatabase

dump()
get_countries()
Returns:

a hash table where keys are country names str and values are NMA.CountryInfo.

Return type:

{str: NMA.CountryInfo}

lookup_3gpp_mcc_mnc(mccmnc)
Parameters:

mccmnc (str) – the MCC/MNC string to look for.

Returns:

a NMA.MobileProvider or None if not found.

Return type:

NMA.MobileProvider

lookup_cdma_sid(sid)
Parameters:

sid (int) – the SID to look for.

Returns:

a NMA.MobileProvider, or None if not found.

Return type:

NMA.MobileProvider

lookup_country(country_code)
Parameters:

country_code (str) – the country code string to look for.

Returns:

a NMA.CountryInfo or None if not found.

Return type:

NMA.CountryInfo

Property Details

NMA.MobileProvidersDatabase.props.country_codes
Name:

country-codes

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Path to the country codes file

NMA.MobileProvidersDatabase.props.service_providers
Name:

service-providers

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Path to the service providers file