sdbus-modemmanager 1.0.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of sdbus-modemmanager might be problematic. Click here for more details.
- sdbus_async/modemmanager/__init__.py +49 -0
- sdbus_async/modemmanager/enums.py +247 -0
- sdbus_async/modemmanager/interfaces_bearer.py +125 -0
- sdbus_async/modemmanager/interfaces_call.py +95 -0
- sdbus_async/modemmanager/interfaces_modem.py +552 -0
- sdbus_async/modemmanager/interfaces_root.py +39 -0
- sdbus_async/modemmanager/interfaces_sim.py +130 -0
- sdbus_async/modemmanager/interfaces_sms.py +97 -0
- sdbus_async/modemmanager/objects.py +204 -0
- sdbus_async/modemmanager/py.typed +0 -0
- sdbus_block/modemmanager/__init__.py +49 -0
- sdbus_block/modemmanager/enums.py +247 -0
- sdbus_block/modemmanager/interfaces_bearer.py +93 -0
- sdbus_block/modemmanager/interfaces_call.py +88 -0
- sdbus_block/modemmanager/interfaces_modem.py +418 -0
- sdbus_block/modemmanager/interfaces_root.py +39 -0
- sdbus_block/modemmanager/interfaces_sim.py +130 -0
- sdbus_block/modemmanager/interfaces_sms.py +97 -0
- sdbus_block/modemmanager/objects.py +193 -0
- sdbus_block/modemmanager/py.typed +0 -0
- sdbus_modemmanager-1.0.2.dist-info/COPYING.LESSER +502 -0
- sdbus_modemmanager-1.0.2.dist-info/METADATA +48 -0
- sdbus_modemmanager-1.0.2.dist-info/RECORD +25 -0
- sdbus_modemmanager-1.0.2.dist-info/WHEEL +5 -0
- sdbus_modemmanager-1.0.2.dist-info/top_level.txt +2 -0
|
@@ -0,0 +1,552 @@
|
|
|
1
|
+
from typing import Any, Dict, List, Tuple
|
|
2
|
+
|
|
3
|
+
from sdbus import DbusInterfaceCommonAsync, DbusObjectManagerInterfaceAsync, dbus_method_async, dbus_property_async, dbus_signal_async
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class MMModemsInterfaceAsync(DbusObjectManagerInterfaceAsync):
|
|
7
|
+
"""
|
|
8
|
+
Modem objects are exported in DBus with the following path base: /org/freedesktop/ModemManager1/Modems/#, where #
|
|
9
|
+
indicates a unique unsigned integer which identifies the object.
|
|
10
|
+
|
|
11
|
+
The Modem objects will export a generic Modem interface which includes common features and actions applicable to
|
|
12
|
+
most modem types. This interface, among other actions, allows the management (creation, listing, deletion) of B
|
|
13
|
+
earer objects which can then be used to request the modem to get in connected state.
|
|
14
|
+
|
|
15
|
+
Modem objects will also export the generic Simple interface. This interface provides an easy access to the most
|
|
16
|
+
simple and common operations that may be performed with the modem, including connection and disconnection. Users
|
|
17
|
+
of the Simple interface do not need to take care of getting the modem registered, and they also don't need to manage
|
|
18
|
+
the creation of bearers themselves. All the logic required to get the modem connected or disconnected is handled
|
|
19
|
+
by the Simple interface.
|
|
20
|
+
|
|
21
|
+
Modems with specific 3GPP and/or CDMA capabilities will export modem type specific interfaces, like the 3GPP
|
|
22
|
+
interface or the CDMA interface.
|
|
23
|
+
"""
|
|
24
|
+
pass
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class MMModemInterfaceAsync(DbusInterfaceCommonAsync, interface_name='org.freedesktop.ModemManager1.Modem'):
|
|
28
|
+
"""Main modem manager interface"""
|
|
29
|
+
|
|
30
|
+
@dbus_method_async(input_signature='b')
|
|
31
|
+
async def enable(self, enable: bool) -> None:
|
|
32
|
+
"""
|
|
33
|
+
Enable or disable the modem.
|
|
34
|
+
|
|
35
|
+
When enabled, the modem's radio is powered on and data sessions, voice calls, location services, and Short Message Service may be available.
|
|
36
|
+
When disabled, the modem enters low-power state and no network-related operations are available.
|
|
37
|
+
|
|
38
|
+
:param enable: True to enable the modem and False to disable it.
|
|
39
|
+
"""
|
|
40
|
+
raise NotImplementedError
|
|
41
|
+
|
|
42
|
+
@dbus_method_async(result_signature='ao')
|
|
43
|
+
async def list_bearers(self) -> List[str]:
|
|
44
|
+
raise NotImplementedError
|
|
45
|
+
|
|
46
|
+
@dbus_method_async(input_signature='a{sv}', result_signature='o')
|
|
47
|
+
async def create_bearer(self, properties: Dict[str, Tuple[str, Any]]) -> str:
|
|
48
|
+
raise NotImplementedError
|
|
49
|
+
|
|
50
|
+
@dbus_method_async(input_signature='o')
|
|
51
|
+
async def delete_bearer(self, bearer: str) -> None:
|
|
52
|
+
raise NotImplementedError
|
|
53
|
+
|
|
54
|
+
@dbus_method_async()
|
|
55
|
+
async def reset(self) -> None:
|
|
56
|
+
raise NotImplementedError
|
|
57
|
+
|
|
58
|
+
@dbus_method_async(input_signature='s')
|
|
59
|
+
async def factory_reset(self, code: str) -> None:
|
|
60
|
+
raise NotImplementedError
|
|
61
|
+
|
|
62
|
+
@dbus_method_async(input_signature='u')
|
|
63
|
+
async def set_power_state(self, state: int) -> None:
|
|
64
|
+
raise NotImplementedError
|
|
65
|
+
|
|
66
|
+
@dbus_method_async(input_signature='u')
|
|
67
|
+
async def set_current_capabilities(self, capabilities: int) -> None:
|
|
68
|
+
raise NotImplementedError
|
|
69
|
+
|
|
70
|
+
@dbus_method_async(input_signature='(uu)')
|
|
71
|
+
async def set_current_modes(self, modes: Tuple[int, int]) -> None:
|
|
72
|
+
raise NotImplementedError
|
|
73
|
+
|
|
74
|
+
@dbus_method_async(input_signature='au')
|
|
75
|
+
async def set_current_bands(self, bands: List[int]) -> None:
|
|
76
|
+
raise NotImplementedError
|
|
77
|
+
|
|
78
|
+
@dbus_method_async(input_signature='u')
|
|
79
|
+
async def set_primary_sim_slot(self, sim_slot: int) -> None:
|
|
80
|
+
raise NotImplementedError
|
|
81
|
+
|
|
82
|
+
@dbus_method_async(result_signature='aa{sv}')
|
|
83
|
+
async def get_cell_info(self) -> List[Dict[str, Tuple[str, Any]]]:
|
|
84
|
+
raise NotImplementedError
|
|
85
|
+
|
|
86
|
+
@dbus_method_async(input_signature='su', result_signature='s')
|
|
87
|
+
async def command(self, cmd: str, timeout: int) -> str:
|
|
88
|
+
raise NotImplementedError
|
|
89
|
+
|
|
90
|
+
@dbus_property_async(property_signature='o', property_name='Sim')
|
|
91
|
+
def sim_object_path(self) -> str:
|
|
92
|
+
"""The path of the SIM object available in this device, if any."""
|
|
93
|
+
raise NotImplementedError
|
|
94
|
+
|
|
95
|
+
@dbus_property_async(property_signature='ao')
|
|
96
|
+
def sim_slots(self) -> List[str]:
|
|
97
|
+
raise NotImplementedError
|
|
98
|
+
|
|
99
|
+
@dbus_property_async(property_signature='u')
|
|
100
|
+
def primary_sim_slot(self) -> int:
|
|
101
|
+
raise NotImplementedError
|
|
102
|
+
|
|
103
|
+
@dbus_property_async(property_signature='ao', property_name='Bearers')
|
|
104
|
+
def bearer_object_paths(self) -> List[str]:
|
|
105
|
+
"""
|
|
106
|
+
The list of bearer object paths (EPS Bearers, PDP Contexts, or CDMA2000 Packet Data Sessions) as requested by
|
|
107
|
+
the user.
|
|
108
|
+
This list does not include the initial EPS bearer details (see "InitialEpsBearer").
|
|
109
|
+
"""
|
|
110
|
+
raise NotImplementedError
|
|
111
|
+
|
|
112
|
+
@dbus_property_async(property_signature='au')
|
|
113
|
+
def supported_capabilities(self) -> List[int]:
|
|
114
|
+
raise NotImplementedError
|
|
115
|
+
|
|
116
|
+
@dbus_property_async(property_signature='u')
|
|
117
|
+
def current_capabilities(self) -> int:
|
|
118
|
+
raise NotImplementedError
|
|
119
|
+
|
|
120
|
+
@dbus_property_async(property_signature='u')
|
|
121
|
+
def max_bearers(self) -> int:
|
|
122
|
+
raise NotImplementedError
|
|
123
|
+
|
|
124
|
+
@dbus_property_async(property_signature='u')
|
|
125
|
+
def max_active_bearers(self) -> int:
|
|
126
|
+
raise NotImplementedError
|
|
127
|
+
|
|
128
|
+
@dbus_property_async(property_signature='u')
|
|
129
|
+
def max_active_multiplexed_bearers(self) -> int:
|
|
130
|
+
raise NotImplementedError
|
|
131
|
+
|
|
132
|
+
@dbus_property_async(property_signature='s')
|
|
133
|
+
def manufacturer(self) -> str:
|
|
134
|
+
"""The equipment manufacturer, as reported by the modem."""
|
|
135
|
+
raise NotImplementedError
|
|
136
|
+
|
|
137
|
+
@dbus_property_async(property_signature='s')
|
|
138
|
+
def model(self) -> str:
|
|
139
|
+
"""The equipment model, as reported by the modem."""
|
|
140
|
+
raise NotImplementedError
|
|
141
|
+
|
|
142
|
+
@dbus_property_async(property_signature='s')
|
|
143
|
+
def revision(self) -> str:
|
|
144
|
+
"""The revision identification of the software, as reported by the modem."""
|
|
145
|
+
raise NotImplementedError
|
|
146
|
+
|
|
147
|
+
@dbus_property_async(property_signature='s')
|
|
148
|
+
def carrier_configuration(self) -> str:
|
|
149
|
+
raise NotImplementedError
|
|
150
|
+
|
|
151
|
+
@dbus_property_async(property_signature='s')
|
|
152
|
+
def carrier_configuration_revision(self) -> str:
|
|
153
|
+
raise NotImplementedError
|
|
154
|
+
|
|
155
|
+
@dbus_property_async(property_signature='s')
|
|
156
|
+
def hardware_revision(self) -> str:
|
|
157
|
+
"""The revision identification of the hardware, as reported by the modem."""
|
|
158
|
+
raise NotImplementedError
|
|
159
|
+
|
|
160
|
+
@dbus_property_async(property_signature='s')
|
|
161
|
+
def device_identifier(self) -> str:
|
|
162
|
+
"""
|
|
163
|
+
A best-effort device identifier based on various device information like model name, firmware revision,
|
|
164
|
+
USB/PCI/PCMCIA IDs, and other properties.
|
|
165
|
+
This ID is not guaranteed to be unique and may be shared between identical devices with the same firmware, but
|
|
166
|
+
is intended to be "unique enough" for use as a casual device identifier for various user experience operations.
|
|
167
|
+
This is not the device's IMEI or ESN since those may not be available before unlocking the device via a PIN.
|
|
168
|
+
"""
|
|
169
|
+
raise NotImplementedError
|
|
170
|
+
|
|
171
|
+
@dbus_property_async(property_signature='s')
|
|
172
|
+
def device(self) -> str:
|
|
173
|
+
raise NotImplementedError
|
|
174
|
+
|
|
175
|
+
@dbus_property_async(property_signature='as')
|
|
176
|
+
def drivers(self) -> List[str]:
|
|
177
|
+
raise NotImplementedError
|
|
178
|
+
|
|
179
|
+
@dbus_property_async(property_signature='s')
|
|
180
|
+
def plugin(self) -> str:
|
|
181
|
+
raise NotImplementedError
|
|
182
|
+
|
|
183
|
+
@dbus_property_async(property_signature='s')
|
|
184
|
+
def primary_port(self) -> str:
|
|
185
|
+
"""The name of the primary port using to control the modem."""
|
|
186
|
+
raise NotImplementedError
|
|
187
|
+
|
|
188
|
+
@dbus_property_async(property_signature='a(su)')
|
|
189
|
+
def ports(self) -> List[Tuple[str, int]]:
|
|
190
|
+
raise NotImplementedError
|
|
191
|
+
|
|
192
|
+
@dbus_property_async(property_signature='s')
|
|
193
|
+
def equipment_identifier(self) -> str:
|
|
194
|
+
"""
|
|
195
|
+
The identity of the device.
|
|
196
|
+
This will be the IMEI number for GSM devices and the hex-format ESN/MEID for CDMA devices.
|
|
197
|
+
"""
|
|
198
|
+
raise NotImplementedError
|
|
199
|
+
|
|
200
|
+
@property
|
|
201
|
+
def imei(self):
|
|
202
|
+
return self.equipment_identifier
|
|
203
|
+
|
|
204
|
+
@dbus_property_async(property_signature='u')
|
|
205
|
+
def unlock_required(self) -> int:
|
|
206
|
+
raise NotImplementedError
|
|
207
|
+
|
|
208
|
+
@dbus_property_async(property_signature='a{uu}')
|
|
209
|
+
def unlock_retries(self) -> Dict[int, int]:
|
|
210
|
+
raise NotImplementedError
|
|
211
|
+
|
|
212
|
+
@dbus_property_async(property_signature='i')
|
|
213
|
+
def state(self) -> int:
|
|
214
|
+
"""
|
|
215
|
+
Overall state of the modem, given as a MMModemState value.
|
|
216
|
+
If the device's state cannot be determined, MM_MODEM_STATE_UNKNOWN will be reported.
|
|
217
|
+
"""
|
|
218
|
+
raise NotImplementedError
|
|
219
|
+
|
|
220
|
+
@dbus_property_async(property_signature='u')
|
|
221
|
+
def state_failed_reason(self) -> int:
|
|
222
|
+
"""
|
|
223
|
+
Error specifying why the modem is in MM_MODEM_STATE_FAILED state,
|
|
224
|
+
given as a MMModemStateFailedReason value.
|
|
225
|
+
"""
|
|
226
|
+
raise NotImplementedError
|
|
227
|
+
|
|
228
|
+
@dbus_property_async(property_signature='u')
|
|
229
|
+
def access_technologies(self) -> int:
|
|
230
|
+
raise NotImplementedError
|
|
231
|
+
|
|
232
|
+
@dbus_property_async(property_signature='(ub)')
|
|
233
|
+
def signal_quality(self) -> Tuple[int, bool]:
|
|
234
|
+
"""
|
|
235
|
+
Signal quality in percent (0 - 100) of the dominant access technology the device is using to communicate with the network. Always 0 for POTS devices.
|
|
236
|
+
The additional boolean value indicates if the quality value given was recently taken.
|
|
237
|
+
"""
|
|
238
|
+
raise NotImplementedError
|
|
239
|
+
|
|
240
|
+
@dbus_property_async(property_signature='as')
|
|
241
|
+
def own_numbers(self) -> List[str]:
|
|
242
|
+
"""List of numbers (e.g. MSISDN in 3GPP) being currently handled by this modem."""
|
|
243
|
+
raise NotImplementedError
|
|
244
|
+
|
|
245
|
+
@dbus_property_async(property_signature='u')
|
|
246
|
+
def power_state(self) -> int:
|
|
247
|
+
"""A MMModemPowerState value specifying the current power state of the modem."""
|
|
248
|
+
raise NotImplementedError
|
|
249
|
+
|
|
250
|
+
@dbus_property_async(property_signature='a(uu)')
|
|
251
|
+
def supported_modes(self) -> List[Tuple[int, int]]:
|
|
252
|
+
raise NotImplementedError
|
|
253
|
+
|
|
254
|
+
@dbus_property_async(property_signature='(uu)')
|
|
255
|
+
def current_modes(self) -> Tuple[int, int]:
|
|
256
|
+
raise NotImplementedError
|
|
257
|
+
|
|
258
|
+
@dbus_property_async(property_signature='au')
|
|
259
|
+
def supported_bands(self) -> List[int]:
|
|
260
|
+
raise NotImplementedError
|
|
261
|
+
|
|
262
|
+
@dbus_property_async(property_signature='au')
|
|
263
|
+
def current_bands(self) -> List[int]:
|
|
264
|
+
raise NotImplementedError
|
|
265
|
+
|
|
266
|
+
@dbus_property_async(property_signature='u')
|
|
267
|
+
def supported_ip_families(self) -> int:
|
|
268
|
+
raise NotImplementedError
|
|
269
|
+
|
|
270
|
+
@dbus_signal_async(signal_signature='iiu')
|
|
271
|
+
def state_changed(self) -> Tuple[int, int, int]:
|
|
272
|
+
raise NotImplementedError
|
|
273
|
+
|
|
274
|
+
|
|
275
|
+
class MMModemMessagingInterfaceAsync(DbusInterfaceCommonAsync, interface_name='org.freedesktop.ModemManager1.Modem.Messaging'):
|
|
276
|
+
"""The Messaging interface handles sending SMS messages and notification of new incoming messages."""
|
|
277
|
+
|
|
278
|
+
@dbus_method_async(result_signature='ao')
|
|
279
|
+
async def list(self) -> List[str]:
|
|
280
|
+
"""Retrieve all SMS messages."""
|
|
281
|
+
raise NotImplementedError
|
|
282
|
+
|
|
283
|
+
@dbus_method_async(input_signature='o')
|
|
284
|
+
async def delete(self, path: str) -> None:
|
|
285
|
+
"""Delete an SMS message."""
|
|
286
|
+
raise NotImplementedError
|
|
287
|
+
|
|
288
|
+
@dbus_method_async(input_signature='a{sv}', result_signature='o')
|
|
289
|
+
async def create(self, properties: Dict[str, Tuple[str, Any]]) -> str:
|
|
290
|
+
"""Creates a new message object."""
|
|
291
|
+
raise NotImplementedError
|
|
292
|
+
|
|
293
|
+
@dbus_property_async(property_signature='ao')
|
|
294
|
+
def messages(self) -> List[str]:
|
|
295
|
+
"""The list of SMS object paths."""
|
|
296
|
+
raise NotImplementedError
|
|
297
|
+
|
|
298
|
+
@dbus_property_async(property_signature='au')
|
|
299
|
+
def supported_storages(self) -> List[int]:
|
|
300
|
+
"""A list of MMSmsStorage values, specifying the storages supported by this modem for storing and receiving SMS."""
|
|
301
|
+
raise NotImplementedError
|
|
302
|
+
|
|
303
|
+
@dbus_property_async(property_signature='u')
|
|
304
|
+
def default_storage(self) -> int:
|
|
305
|
+
"""A MMSmsStorage value, specifying the storage to be used when receiving or storing SMS."""
|
|
306
|
+
raise NotImplementedError
|
|
307
|
+
|
|
308
|
+
@dbus_signal_async(signal_signature='ob')
|
|
309
|
+
def added(self) -> Tuple[str, bool]:
|
|
310
|
+
"""Emitted when any part of a new SMS has been received or added (but not for subsequent parts, if any)."""
|
|
311
|
+
raise NotImplementedError
|
|
312
|
+
|
|
313
|
+
@dbus_signal_async(signal_signature='o')
|
|
314
|
+
def deleted(self) -> str:
|
|
315
|
+
"""Emitted when a message has been deleted."""
|
|
316
|
+
raise NotImplementedError
|
|
317
|
+
|
|
318
|
+
|
|
319
|
+
class MMModemSimpleInterfaceAsync(DbusInterfaceCommonAsync, interface_name='org.freedesktop.ModemManager1.Modem.Simple'):
|
|
320
|
+
|
|
321
|
+
@dbus_method_async(input_signature='a{sv}', result_signature='o')
|
|
322
|
+
async def connect(self, properties: Dict[str, Tuple[str, Any]]) -> str:
|
|
323
|
+
"""
|
|
324
|
+
Allowed key/value pairs in properties are:
|
|
325
|
+
|
|
326
|
+
"pin"
|
|
327
|
+
SIM-PIN unlock code, given as a string value (signature "s").
|
|
328
|
+
"operator-id"
|
|
329
|
+
ETSI MCC-MNC of a network to force registration with, given as a string value (signature "s").
|
|
330
|
+
"apn"
|
|
331
|
+
For GSM/UMTS and LTE devices the APN to use, given as a string value (signature "s").
|
|
332
|
+
"ip-type"
|
|
333
|
+
For GSM/UMTS and LTE devices the IP addressing type to use, given as a MMBearerIpFamily value (signature "u").
|
|
334
|
+
"allowed-auth"
|
|
335
|
+
The authentication method to use, given as a MMBearerAllowedAuth value (signature "u"). Optional in 3GPP.
|
|
336
|
+
"user"
|
|
337
|
+
User name (if any) required by the network, given as a string value (signature "s"). Optional in 3GPP.
|
|
338
|
+
"password"
|
|
339
|
+
Password (if any) required by the network, given as a string value (signature "s"). Optional in 3GPP.
|
|
340
|
+
"number"
|
|
341
|
+
For POTS devices the number to dial, given as a string value (signature "s").
|
|
342
|
+
"allow-roaming"
|
|
343
|
+
False to allow only connections to home networks, given as a boolean value (signature "b").
|
|
344
|
+
"rm-protocol"
|
|
345
|
+
For CDMA devices, the protocol of the Rm interface, given as a MMModemCdmaRmProtocol value (signature "u").
|
|
346
|
+
|
|
347
|
+
:param properties: Dictionary of properties needed to get the modem connected.
|
|
348
|
+
:returns: On successful connect, returns the object path of the connected packet data bearer used for the connection attempt.
|
|
349
|
+
"""
|
|
350
|
+
raise NotImplementedError
|
|
351
|
+
|
|
352
|
+
@dbus_method_async(input_signature='o')
|
|
353
|
+
async def disconnect(self, bearer: str) -> None:
|
|
354
|
+
"""
|
|
355
|
+
data bearer, while if "/" (ie, no object given) this method will disconnect all active packet data bearers.
|
|
356
|
+
Disconnect an active packet data connection.
|
|
357
|
+
:param bearer: If given this method will disconnect the referenced packet
|
|
358
|
+
"""
|
|
359
|
+
raise NotImplementedError
|
|
360
|
+
|
|
361
|
+
@dbus_method_async(result_signature='a{sv}')
|
|
362
|
+
async def get_status(self) -> Dict[str, Tuple[str, Any]]:
|
|
363
|
+
"""
|
|
364
|
+
Get the general modem status.
|
|
365
|
+
|
|
366
|
+
The predefined common properties returned are:
|
|
367
|
+
|
|
368
|
+
"state"
|
|
369
|
+
A MMModemState value specifying the overall state of the modem, given as an unsigned integer value (signature "u").
|
|
370
|
+
"signal-quality"
|
|
371
|
+
Signal quality value, given only when registered, as an unsigned integer value (signature "u").
|
|
372
|
+
"current-bands"
|
|
373
|
+
List of MMModemBand values, given only when registered, as a list of unsigned integer values (signature "au").
|
|
374
|
+
"access-technology"
|
|
375
|
+
A MMModemAccessTechnology value, given only when registered, as an unsigned integer value (signature "u").
|
|
376
|
+
"m3gpp-registration-state"
|
|
377
|
+
A MMModem3gppRegistrationState value specifying the state of the registration, given only when registered in a 3GPP network, as an unsigned integer value (signature "u").
|
|
378
|
+
"m3gpp-operator-code"
|
|
379
|
+
Operator MCC-MNC, given only when registered in a 3GPP network, as a string value (signature "s").
|
|
380
|
+
"m3gpp-operator-name"
|
|
381
|
+
Operator name, given only when registered in a 3GPP network, as a string value (signature "s").
|
|
382
|
+
"cdma-cdma1x-registration-state"
|
|
383
|
+
A MMModemCdmaRegistrationState value specifying the state of the registration, given only when registered in a CDMA1x network, as an unsigned integer value (signature "u").
|
|
384
|
+
"cdma-evdo-registration-state"
|
|
385
|
+
A MMModemCdmaRegistrationState value specifying the state of the registration, given only when registered in a EV-DO network, as an unsigned integer value (signature "u").
|
|
386
|
+
"cdma-sid"
|
|
387
|
+
The System Identifier of the serving network, if registered in a CDMA1x network and if known. Given as an unsigned integer value (signature "u").
|
|
388
|
+
"cdma-nid"
|
|
389
|
+
The Network Identifier of the serving network, if registered in a CDMA1x network and if known. Given as an unsigned integer value (signature "u").
|
|
390
|
+
|
|
391
|
+
:returns: Dictionary of properties.
|
|
392
|
+
"""
|
|
393
|
+
raise NotImplementedError
|
|
394
|
+
|
|
395
|
+
|
|
396
|
+
class MMModemSignalInterfaceAsync(DbusInterfaceCommonAsync, interface_name='org.freedesktop.ModemManager1.Modem.Signal'):
|
|
397
|
+
|
|
398
|
+
@dbus_method_async(input_signature='u')
|
|
399
|
+
async def setup(self, rate: int) -> None:
|
|
400
|
+
"""Setup extended signal quality information retrieval.
|
|
401
|
+
|
|
402
|
+
:param rate: Refresh rate to set, in seconds. 0 to disable retrieval.
|
|
403
|
+
"""
|
|
404
|
+
raise NotImplementedError
|
|
405
|
+
|
|
406
|
+
@dbus_method_async(input_signature='a{sv}')
|
|
407
|
+
async def setup_thresholds(self, settings: Dict[str, Tuple[str, Any]]) -> None:
|
|
408
|
+
raise NotImplementedError
|
|
409
|
+
|
|
410
|
+
@dbus_property_async(property_signature='u')
|
|
411
|
+
def rate(self) -> int:
|
|
412
|
+
"""
|
|
413
|
+
Refresh rate for the extended signal quality information updates, in seconds.
|
|
414
|
+
A value of 0 disables the retrieval of the values.
|
|
415
|
+
"""
|
|
416
|
+
raise NotImplementedError
|
|
417
|
+
|
|
418
|
+
@dbus_property_async(property_signature='u')
|
|
419
|
+
def rssi_threshold(self) -> int:
|
|
420
|
+
raise NotImplementedError
|
|
421
|
+
|
|
422
|
+
@dbus_property_async(property_signature='b')
|
|
423
|
+
def error_rate_threshold(self) -> bool:
|
|
424
|
+
raise NotImplementedError
|
|
425
|
+
|
|
426
|
+
@dbus_property_async(property_signature='a{sv}')
|
|
427
|
+
def cdma(self) -> Dict[str, Tuple[str, Any]]:
|
|
428
|
+
"""
|
|
429
|
+
Dictionary of available signal information for the CDMA1x access technology.
|
|
430
|
+
"""
|
|
431
|
+
raise NotImplementedError
|
|
432
|
+
|
|
433
|
+
@dbus_property_async(property_signature='a{sv}')
|
|
434
|
+
def evdo(self) -> Dict[str, Tuple[str, Any]]:
|
|
435
|
+
"""
|
|
436
|
+
Dictionary of available signal information for the CDMA EV-DO access technology.
|
|
437
|
+
"""
|
|
438
|
+
raise NotImplementedError
|
|
439
|
+
|
|
440
|
+
@dbus_property_async(property_signature='a{sv}')
|
|
441
|
+
def gsm(self) -> Dict[str, Tuple[str, Any]]:
|
|
442
|
+
"""
|
|
443
|
+
Dictionary of available signal information for the GSM/GPRS access technology.
|
|
444
|
+
"""
|
|
445
|
+
raise NotImplementedError
|
|
446
|
+
|
|
447
|
+
@dbus_property_async(property_signature='a{sv}')
|
|
448
|
+
def umts(self) -> Dict[str, Tuple[str, Any]]:
|
|
449
|
+
"""
|
|
450
|
+
Dictionary of available signal information for the UMTS (WCDMA) access technology.
|
|
451
|
+
"""
|
|
452
|
+
raise NotImplementedError
|
|
453
|
+
|
|
454
|
+
@dbus_property_async(property_signature='a{sv}')
|
|
455
|
+
def lte(self) -> Dict[str, Tuple[str, Any]]:
|
|
456
|
+
"""
|
|
457
|
+
Dictionary of available signal information for the LTE access technology.
|
|
458
|
+
"""
|
|
459
|
+
raise NotImplementedError
|
|
460
|
+
|
|
461
|
+
@dbus_property_async(property_signature='a{sv}')
|
|
462
|
+
def nr5g(self) -> Dict[str, Tuple[str, Any]]:
|
|
463
|
+
"""
|
|
464
|
+
Dictionary of available signal information for the 5G access technology.
|
|
465
|
+
"""
|
|
466
|
+
raise NotImplementedError
|
|
467
|
+
|
|
468
|
+
|
|
469
|
+
class MMModemVoiceInterfaceAsync(DbusInterfaceCommonAsync, interface_name='org.freedesktop.ModemManager1.Modem.Voice'):
|
|
470
|
+
|
|
471
|
+
@dbus_method_async(result_signature='ao')
|
|
472
|
+
async def list_calls(self) -> List[str]:
|
|
473
|
+
"""
|
|
474
|
+
Retrieve all Calls.
|
|
475
|
+
|
|
476
|
+
:returns: The list of call object paths.
|
|
477
|
+
"""
|
|
478
|
+
raise NotImplementedError
|
|
479
|
+
|
|
480
|
+
@dbus_method_async(input_signature='o')
|
|
481
|
+
async def delete_call(self, path: str) -> None:
|
|
482
|
+
"""
|
|
483
|
+
Delete a Call from the list of calls.
|
|
484
|
+
The call will be hangup if it is still active.
|
|
485
|
+
|
|
486
|
+
:param path: The object path of the Call to delete.
|
|
487
|
+
"""
|
|
488
|
+
raise NotImplementedError
|
|
489
|
+
|
|
490
|
+
@dbus_method_async(input_signature='a{sv}', result_signature='o')
|
|
491
|
+
async def create_call(self, properties: Dict[str, Tuple[str, Any]]) -> str:
|
|
492
|
+
"""
|
|
493
|
+
Creates a new call object for a new outgoing call.
|
|
494
|
+
The 'Number' is the only expected property to set by the user.
|
|
495
|
+
|
|
496
|
+
:param properties: Call properties from the Call D-Bus interface.
|
|
497
|
+
:returns: The object path of the new call object.
|
|
498
|
+
"""
|
|
499
|
+
raise NotImplementedError
|
|
500
|
+
|
|
501
|
+
@dbus_method_async()
|
|
502
|
+
async def hold_and_accept(self) -> None:
|
|
503
|
+
"""Place all active calls on hold, if any, and accept the next call."""
|
|
504
|
+
raise NotImplementedError
|
|
505
|
+
|
|
506
|
+
@dbus_method_async()
|
|
507
|
+
async def hangup_and_accept(self) -> None:
|
|
508
|
+
"""Hangup all active calls, if any, and accept the next call."""
|
|
509
|
+
raise NotImplementedError
|
|
510
|
+
|
|
511
|
+
@dbus_method_async()
|
|
512
|
+
async def hangup_all(self) -> None:
|
|
513
|
+
"""Hangup all active calls."""
|
|
514
|
+
raise NotImplementedError
|
|
515
|
+
|
|
516
|
+
@dbus_method_async()
|
|
517
|
+
async def transfer(self) -> None:
|
|
518
|
+
"""
|
|
519
|
+
Join the currently active and held calls together into a single multiparty call,
|
|
520
|
+
but disconnects from them.
|
|
521
|
+
"""
|
|
522
|
+
raise NotImplementedError
|
|
523
|
+
|
|
524
|
+
@dbus_method_async(input_signature='b')
|
|
525
|
+
async def call_waiting_setup(self, enable: bool) -> None:
|
|
526
|
+
"""Activates or deactivates the call waiting network service, as per 3GPP TS 22.083."""
|
|
527
|
+
raise NotImplementedError
|
|
528
|
+
|
|
529
|
+
@dbus_method_async(result_signature='b')
|
|
530
|
+
async def call_waiting_query(self) -> bool:
|
|
531
|
+
"""Queries the status of the call waiting network service, as per 3GPP TS 22.083."""
|
|
532
|
+
raise NotImplementedError
|
|
533
|
+
|
|
534
|
+
@dbus_property_async(property_signature='ao', property_name='Calls')
|
|
535
|
+
def call_object_paths(self) -> List[str]:
|
|
536
|
+
"""The list of calls object paths."""
|
|
537
|
+
raise NotImplementedError
|
|
538
|
+
|
|
539
|
+
@dbus_property_async(property_signature='b')
|
|
540
|
+
def emergency_only(self) -> bool:
|
|
541
|
+
"""A flag indicating whether emergency calls are the only allowed ones."""
|
|
542
|
+
raise NotImplementedError
|
|
543
|
+
|
|
544
|
+
@dbus_signal_async(signal_signature='o')
|
|
545
|
+
def call_added(self) -> str:
|
|
546
|
+
"""Emitted when a call has been added."""
|
|
547
|
+
raise NotImplementedError
|
|
548
|
+
|
|
549
|
+
@dbus_signal_async(signal_signature='o')
|
|
550
|
+
def call_deleted(self) -> str:
|
|
551
|
+
"""Emitted when a call has been deleted."""
|
|
552
|
+
raise NotImplementedError
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
from typing import Any, Dict, List, Tuple
|
|
2
|
+
|
|
3
|
+
from sdbus import DbusInterfaceCommonAsync, dbus_method_async, dbus_property_async
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class MMInterfaceAsync(DbusInterfaceCommonAsync, interface_name='org.freedesktop.ModemManager1'):
|
|
7
|
+
"""Main modem manager interface"""
|
|
8
|
+
|
|
9
|
+
@dbus_method_async()
|
|
10
|
+
async def scan_devices(self) -> None:
|
|
11
|
+
"""Start a new scan for connected modem devices."""
|
|
12
|
+
raise NotImplementedError
|
|
13
|
+
|
|
14
|
+
@dbus_method_async(input_signature='s')
|
|
15
|
+
async def set_logging(self, level: str) -> None:
|
|
16
|
+
"""Set logging verbosity.
|
|
17
|
+
|
|
18
|
+
:param level: One of "ERR", "WARN", "INFO", "DEBUG".
|
|
19
|
+
"""
|
|
20
|
+
raise NotImplementedError
|
|
21
|
+
|
|
22
|
+
@dbus_method_async(input_signature='a{sv}')
|
|
23
|
+
async def report_kernel_event(self, properties: Dict[str, Tuple[str, Any]]) -> None:
|
|
24
|
+
"""Reports a kernel event to ModemManager."""
|
|
25
|
+
raise NotImplementedError
|
|
26
|
+
|
|
27
|
+
@dbus_method_async(input_signature='sb')
|
|
28
|
+
async def inhibit_device(self, uid: str, inhibit: bool) -> None:
|
|
29
|
+
"""Inhibit or uninhibit the device.
|
|
30
|
+
|
|
31
|
+
:param uid: The unique ID of the physical device
|
|
32
|
+
:param inhibit: True to inhibit the modem and False to uninhibit it
|
|
33
|
+
"""
|
|
34
|
+
raise NotImplementedError
|
|
35
|
+
|
|
36
|
+
@dbus_property_async(property_signature='s')
|
|
37
|
+
def version(self) -> str:
|
|
38
|
+
"""NetworkManager version"""
|
|
39
|
+
raise NotImplementedError
|