NMA.MobileProvidersDatabase¶
- Subclasses:
None
Methods¶
- Inherited:
GObject.Object (37), Gio.AsyncInitable (4), Gio.Initable (2)
- Structs:
class |
|
class |
|
class |
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w/co |
Path to the country codes file |
||
r/w/co |
Path to the service providers file |
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent |
r |
Class Details¶
- class NMA.MobileProvidersDatabase(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- classmethod new(country_codes, service_providers, cancellable, callback, *user_data)¶
- Parameters:
country_codes (
str
orNone
) – Path to the country codes file.service_providers (
str
orNone
) – Path to the service providers file.cancellable (
Gio.Cancellable
orNone
) – AGio.Cancellable
orNone
.callback (
Gio.AsyncReadyCallback
orNone
) – AGio.AsyncReadyCallback
to call when the request is satisfied.
- classmethod new_finish(res)¶
- Parameters:
res (
Gio.AsyncResult
) – TheGio.AsyncResult
obtained from theGio.AsyncReadyCallback
passed toNMA.MobileProvidersDatabase.new
().- Raises:
- Returns:
The constructed object or
None
if error is set.- Return type:
- classmethod new_sync(country_codes, service_providers, cancellable)¶
- Parameters:
country_codes (
str
orNone
) – Path to the country codes file.service_providers (
str
orNone
) – Path to the service providers file.cancellable (
Gio.Cancellable
orNone
) – AGio.Cancellable
orNone
.
- Raises:
- Returns:
The constructed object or
None
if error is set.- Return type:
- dump()¶
- get_countries()¶
- Returns:
a hash table where keys are country names
str
and values areNMA.CountryInfo
.- Return type:
- lookup_3gpp_mcc_mnc(mccmnc)¶
- Parameters:
mccmnc (
str
) – the MCC/MNC string to look for.- Returns:
a
NMA.MobileProvider
orNone
if not found.- Return type:
- lookup_cdma_sid(sid)¶
- Parameters:
sid (
int
) – the SID to look for.- Returns:
a
NMA.MobileProvider
, orNone
if not found.- Return type:
- lookup_country(country_code)¶
- Parameters:
country_code (
str
) – the country code string to look for.- Returns:
a
NMA.CountryInfo
orNone
if not found.- Return type:
Property Details¶
- NMA.MobileProvidersDatabase.props.country_codes¶
- Name:
country-codes
- Type:
- Default Value:
- Flags:
Path to the country codes file