NMA4.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 NMA4.MobileProvidersDatabase NMA4.MobileProvidersDatabase GObject.Object->NMA4.MobileProvidersDatabase Gio.AsyncInitable->NMA4.MobileProvidersDatabase Gio.Initable->NMA4.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 NMA4.MobileProvidersDatabase(**kwargs)
Bases:

GObject.Object, Gio.AsyncInitable, Gio.Initable

Abstract:

No

Structure:

NMA4.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 NMA4.MobileProvidersDatabase.new().

Raises:

GLib.Error

Returns:

The constructed object or None if error is set.

Return type:

NMA4.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:

NMA4.MobileProvidersDatabase

dump()
get_countries()
Returns:

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

Return type:

{str: NMA4.CountryInfo}

lookup_3gpp_mcc_mnc(mccmnc)
Parameters:

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

Returns:

a NMA4.MobileProvider or None if not found.

Return type:

NMA4.MobileProvider

lookup_cdma_sid(sid)
Parameters:

sid (int) – the SID to look for.

Returns:

a NMA4.MobileProvider, or None if not found.

Return type:

NMA4.MobileProvider

lookup_country(country_code)
Parameters:

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

Returns:

a NMA4.CountryInfo or None if not found.

Return type:

NMA4.CountryInfo

Property Details

NMA4.MobileProvidersDatabase.props.country_codes
Name:

country-codes

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Path to the country codes file

NMA4.MobileProvidersDatabase.props.service_providers
Name:

service-providers

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Path to the service providers file