wloc 1.1.0
Simple Wi-Fi geolocation library and tool
wloc.fetchers.android.termux.TermuxNativeAPI Class Reference
Inheritance diagram for wloc.fetchers.android.termux.TermuxNativeAPI:
wloc.fetchers.native.NativeBackendCommon

Public Member Functions

None __init__ (self)
 

Protected Member Functions

None _fetch_json (self)
 
None _fetch_list (self)
 
None _parse_json (self)
 

Protected Attributes

str _json = subprocess.check_output('termux-wifi-scaninfo', encoding='utf8', timeout=5000)
 

Detailed Description

Class for working with Termux API.

Constructor & Destructor Documentation

◆ __init__()

None wloc.fetchers.android.termux.TermuxNativeAPI.__init__ ( self)
Main constructor of the TermuxAPI class.

Reimplemented from wloc.fetchers.native.NativeBackendCommon.

Member Function Documentation

◆ _fetch_json()

None wloc.fetchers.android.termux.TermuxNativeAPI._fetch_json ( self)
protected
Fetches JSON from stdout and stores the result in a special
private field.

◆ _fetch_list()

None wloc.fetchers.android.termux.TermuxNativeAPI._fetch_list ( self)
protected
Fetches the list of available Wi-Fi networks using public
D-Bus methods.

Reimplemented from wloc.fetchers.native.NativeBackendCommon.

◆ _parse_json()

None wloc.fetchers.android.termux.TermuxNativeAPI._parse_json ( self)
protected
Parses JSON stored in a special private field and tries to
extract the required information from it (BSSID and RSSI).
:exception FetcherError: Termux API error message.