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.

@@ -0,0 +1,49 @@
1
+ from __future__ import annotations
2
+
3
+ from .enums import MMModemState, MMModemMode, MMModemPowerState, MMCallDirection, MMCallState, MMCallStateReason
4
+ from .interfaces_bearer import MMBearerInterfaceAsync
5
+ from .interfaces_call import MMCallInterfaceAsync
6
+ from .interfaces_modem import MMModemInterfaceAsync, MMModemMessagingInterfaceAsync, MMModemSimpleInterfaceAsync, MMModemSignalInterfaceAsync, MMModemsInterfaceAsync, MMModemVoiceInterfaceAsync
7
+ from .interfaces_root import MMInterfaceAsync
8
+ from .interfaces_sim import MMSimInterfaceAsync
9
+ from .interfaces_sms import MMSmsInterfaceAsync
10
+ from .objects import MM, MMBearer, MMCall, MMModem, MMModems, MMModemMessaging, MMModemSignal, MMModemSimple, MMModemVoice, MMSim, MMSms
11
+
12
+ __all__ = (
13
+ # .enums
14
+ 'MMModemState',
15
+ 'MMModemMode',
16
+ 'MMModemPowerState',
17
+ 'MMCallDirection',
18
+ 'MMCallState',
19
+ 'MMCallStateReason',
20
+ # .interfaces_bearer
21
+ ' MMBearerInterfaceAsync',
22
+ # .interfaces_call
23
+ 'MMCallInterfaceAsync',
24
+ # .interfaces_modem
25
+ 'MMModemInterfaceAsync',
26
+ 'MMModemMessagingInterfaceAsync',
27
+ 'MMModemSimpleInterfaceAsync',
28
+ 'MMModemSignalInterfaceAsync',
29
+ 'MMModemsInterfaceAsync',
30
+ 'MMModemVoiceInterfaceAsync',
31
+ # .interfaces_root
32
+ 'MMInterfaceAsync',
33
+ # .interfaces_sim
34
+ 'MMSimInterfaceAsync',
35
+ # .interfaces_sms
36
+ 'MMSmsInterfaceAsync',
37
+ # .objects
38
+ 'MM',
39
+ 'MMModems',
40
+ 'MMModem',
41
+ 'MMModemMessaging',
42
+ 'MMModemSimple',
43
+ 'MMModemSignal',
44
+ 'MMModemVoice',
45
+ 'MMSim',
46
+ 'MMSms',
47
+ 'MMBearer',
48
+ 'MMCall',
49
+ )
@@ -0,0 +1,247 @@
1
+ from enum import IntEnum, IntFlag
2
+
3
+
4
+ class MMModemState(IntEnum):
5
+ """Enumeration of possible modem states.
6
+
7
+ * MM_MODEM_STATE_FAILED: The modem is unusable.
8
+ * MM_MODEM_STATE_UNKNOWN: State unknown or not reportable.
9
+ * MM_MODEM_STATE_INITIALIZING: The modem is currently being initialized.
10
+ * MM_MODEM_STATE_LOCKED: The modem needs to be unlocked.
11
+ * MM_MODEM_STATE_DISABLED: The modem is not enabled and is powered down.
12
+ * MM_MODEM_STATE_DISABLING: The modem is currently transitioning to the MM_MODEM_STATE_DISABLED state.
13
+ * MM_MODEM_STATE_ENABLING: The modem is currently transitioning to the MM_MODEM_STATE_ENABLED state.
14
+ * MM_MODEM_STATE_ENABLED: The modem is enabled and powered on but not registered with a network provider and not available for data connections.
15
+ * MM_MODEM_STATE_SEARCHING: The modem is searching for a network provider to register with.
16
+ * MM_MODEM_STATE_REGISTERED: The modem is registered with a network provider, and data connections and messaging may be available for use.
17
+ * MM_MODEM_STATE_DISCONNECTING: The modem is disconnecting and deactivating the last active packet data bearer. This state will not be entered if more than one packet data bearer is active and one of the active bearers is deactivated.
18
+ * MM_MODEM_STATE_CONNECTING: The modem is activating and connecting the first packet data bearer. Subsequent bearer activations when another bearer is already active do not cause this state to be entered.
19
+ * MM_MODEM_STATE_CONNECTED: One or more packet data bearers is active and connected.
20
+ """
21
+ MM_MODEM_STATE_FAILED = -1
22
+ MM_MODEM_STATE_UNKNOWN = 0
23
+ MM_MODEM_STATE_INITIALIZING = 1
24
+ MM_MODEM_STATE_LOCKED = 2
25
+ MM_MODEM_STATE_DISABLED = 3
26
+ MM_MODEM_STATE_DISABLING = 4
27
+ MM_MODEM_STATE_ENABLING = 5
28
+ MM_MODEM_STATE_ENABLED = 6
29
+ MM_MODEM_STATE_SEARCHING = 7
30
+ MM_MODEM_STATE_REGISTERED = 8
31
+ MM_MODEM_STATE_DISCONNECTING = 9
32
+ MM_MODEM_STATE_CONNECTING = 10
33
+ MM_MODEM_STATE_CONNECTED = 11
34
+
35
+
36
+ class MMModemStateFailedReason(IntEnum):
37
+ """
38
+ Enumeration of possible errors when the modem is in @MM_MODEM_STATE_FAILED
39
+
40
+ * @MM_MODEM_STATE_FAILED_REASON_NONE: No error.
41
+ * @MM_MODEM_STATE_FAILED_REASON_UNKNOWN: Unknown error.
42
+ * @MM_MODEM_STATE_FAILED_REASON_SIM_MISSING: SIM is required but missing.
43
+ * @MM_MODEM_STATE_FAILED_REASON_SIM_ERROR: SIM is available, but unusable (e.g. permanently locked).
44
+ * @MM_MODEM_STATE_FAILED_REASON_UNKNOWN_CAPABILITIES: Unknown modem capabilities. Since 1.20.
45
+ * @MM_MODEM_STATE_FAILED_REASON_ESIM_WITHOUT_PROFILES: eSIM is not initialized. Since 1.20.
46
+ """
47
+ MM_MODEM_STATE_FAILED_REASON_NONE = 0
48
+ MM_MODEM_STATE_FAILED_REASON_UNKNOWN = 1
49
+ MM_MODEM_STATE_FAILED_REASON_SIM_MISSING = 2
50
+ MM_MODEM_STATE_FAILED_REASON_SIM_ERROR = 3
51
+ MM_MODEM_STATE_FAILED_REASON_UNKNOWN_CAPABILITIES = 4
52
+ MM_MODEM_STATE_FAILED_REASON_ESIM_WITHOUT_PROFILES = 5
53
+
54
+
55
+ class MMModemMode(IntFlag):
56
+ """Bitfield to indicate which access modes are supported, allowed or preferred in a given device.
57
+
58
+ * MM_MODEM_MODE_NONE: None.
59
+ * MM_MODEM_MODE_CS: CSD, GSM, and other circuit-switched technologies.
60
+ * MM_MODEM_MODE_2G: GPRS, EDGE.
61
+ * MM_MODEM_MODE_3G: UMTS, HSxPA.
62
+ * MM_MODEM_MODE_4G: LTE.
63
+ * MM_MODEM_MODE_5G: 5GNR. Since 1.14.
64
+ * MM_MODEM_MODE_ANY: Any mode can be used (only this value allowed for POTS modems).
65
+ """
66
+ MM_MODEM_MODE_NONE = 0
67
+ MM_MODEM_MODE_CS = 1 << 0
68
+ MM_MODEM_MODE_2G = 1 << 1
69
+ MM_MODEM_MODE_3G = 1 << 2
70
+ MM_MODEM_MODE_4G = 1 << 3
71
+ MM_MODEM_MODE_ANY = 0xFFFFFFFF
72
+
73
+
74
+ class MMModemAccessTechnology(IntFlag):
75
+ """
76
+ Describes various access technologies that a device uses when registered with or connected to a network.
77
+
78
+ * @MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN: The access technology used is unknown.
79
+ * @MM_MODEM_ACCESS_TECHNOLOGY_POTS: Analog wireline telephone.
80
+ * @MM_MODEM_ACCESS_TECHNOLOGY_GSM: GSM.
81
+ * @MM_MODEM_ACCESS_TECHNOLOGY_GSM_COMPACT: Compact GSM.
82
+ * @MM_MODEM_ACCESS_TECHNOLOGY_GPRS: GPRS.
83
+ * @MM_MODEM_ACCESS_TECHNOLOGY_EDGE: EDGE (ETSI 27.007: "GSM w/EGPRS").
84
+ * @MM_MODEM_ACCESS_TECHNOLOGY_UMTS: UMTS (ETSI 27.007: "UTRAN").
85
+ * @MM_MODEM_ACCESS_TECHNOLOGY_HSDPA: HSDPA (ETSI 27.007: "UTRAN w/HSDPA").
86
+ * @MM_MODEM_ACCESS_TECHNOLOGY_HSUPA: HSUPA (ETSI 27.007: "UTRAN w/HSUPA").
87
+ * @MM_MODEM_ACCESS_TECHNOLOGY_HSPA: HSPA (ETSI 27.007: "UTRAN w/HSDPA and HSUPA").
88
+ * @MM_MODEM_ACCESS_TECHNOLOGY_HSPA_PLUS: HSPA+ (ETSI 27.007: "UTRAN w/HSPA+").
89
+ * @MM_MODEM_ACCESS_TECHNOLOGY_1XRTT: CDMA2000 1xRTT.
90
+ * @MM_MODEM_ACCESS_TECHNOLOGY_EVDO0: CDMA2000 EVDO revision 0.
91
+ * @MM_MODEM_ACCESS_TECHNOLOGY_EVDOA: CDMA2000 EVDO revision A.
92
+ * @MM_MODEM_ACCESS_TECHNOLOGY_EVDOB: CDMA2000 EVDO revision B.
93
+ * @MM_MODEM_ACCESS_TECHNOLOGY_LTE: LTE (ETSI 27.007: "E-UTRAN")
94
+ * @MM_MODEM_ACCESS_TECHNOLOGY_5GNR: 5GNR (ETSI 27.007: "NG-RAN"). Since 1.14.
95
+ * @MM_MODEM_ACCESS_TECHNOLOGY_LTE_CAT_M: Cat-M (ETSI 23.401: LTE Category M1/M2). Since 1.20.
96
+ * @MM_MODEM_ACCESS_TECHNOLOGY_LTE_NB_IOT: NB IoT (ETSI 23.401: LTE Category NB1/NB2). Since 1.20.
97
+ * @MM_MODEM_ACCESS_TECHNOLOGY_ANY: Mask specifying all access technologies.
98
+ """
99
+ MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN = 0
100
+ MM_MODEM_ACCESS_TECHNOLOGY_POTS = 1 << 0
101
+ MM_MODEM_ACCESS_TECHNOLOGY_GSM = 1 << 1
102
+ MM_MODEM_ACCESS_TECHNOLOGY_GSM_COMPACT = 1 << 2
103
+ MM_MODEM_ACCESS_TECHNOLOGY_GPRS = 1 << 3
104
+ MM_MODEM_ACCESS_TECHNOLOGY_EDGE = 1 << 4
105
+ MM_MODEM_ACCESS_TECHNOLOGY_UMTS = 1 << 5
106
+ MM_MODEM_ACCESS_TECHNOLOGY_HSDPA = 1 << 6
107
+ MM_MODEM_ACCESS_TECHNOLOGY_HSUPA = 1 << 7
108
+ MM_MODEM_ACCESS_TECHNOLOGY_HSPA = 1 << 8
109
+ MM_MODEM_ACCESS_TECHNOLOGY_HSPA_PLUS = 1 << 9
110
+ MM_MODEM_ACCESS_TECHNOLOGY_1XRTT = 1 << 10
111
+ MM_MODEM_ACCESS_TECHNOLOGY_EVDO0 = 1 << 11
112
+ MM_MODEM_ACCESS_TECHNOLOGY_EVDOA = 1 << 12
113
+ MM_MODEM_ACCESS_TECHNOLOGY_EVDOB = 1 << 13
114
+ MM_MODEM_ACCESS_TECHNOLOGY_LTE = 1 << 14
115
+ MM_MODEM_ACCESS_TECHNOLOGY_5GNR = 1 << 15
116
+ MM_MODEM_ACCESS_TECHNOLOGY_LTE_CAT_M = 1 << 16
117
+ MM_MODEM_ACCESS_TECHNOLOGY_LTE_NB_IOT = 1 << 17
118
+ MM_MODEM_ACCESS_TECHNOLOGY_ANY = 0xFFFFFFFF
119
+
120
+
121
+ class MMModem3gppRegistrationState(IntEnum):
122
+ """
123
+ GSM registration code as defined in 3GPP TS 27.007.
124
+
125
+ * MMModem3gppRegistrationState:
126
+ * @MM_MODEM_3GPP_REGISTRATION_STATE_IDLE: Not registered, not searching for new operator to register.
127
+ * @MM_MODEM_3GPP_REGISTRATION_STATE_HOME: Registered on home network.
128
+ * @MM_MODEM_3GPP_REGISTRATION_STATE_SEARCHING: Not registered, searching for new operator to register with.
129
+ * @MM_MODEM_3GPP_REGISTRATION_STATE_DENIED: Registration denied.
130
+ * @MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN: Unknown registration status.
131
+ * @MM_MODEM_3GPP_REGISTRATION_STATE_ROAMING: Registered on a roaming network.
132
+ * @MM_MODEM_3GPP_REGISTRATION_STATE_HOME_SMS_ONLY: Registered for "SMS only", home network (applicable only when on LTE). Since 1.8.
133
+ * @MM_MODEM_3GPP_REGISTRATION_STATE_ROAMING_SMS_ONLY: Registered for "SMS only", roaming network (applicable only when on LTE). Since 1.8.
134
+ * @MM_MODEM_3GPP_REGISTRATION_STATE_EMERGENCY_ONLY: Emergency services only. Since 1.8.
135
+ * @MM_MODEM_3GPP_REGISTRATION_STATE_HOME_CSFB_NOT_PREFERRED: Registered for "CSFB not preferred", home network (applicable only when on LTE). Since 1.8.
136
+ * @MM_MODEM_3GPP_REGISTRATION_STATE_ROAMING_CSFB_NOT_PREFERRED: Registered for "CSFB not preferred", roaming network (applicable only when on LTE). Since 1.8.
137
+ * @MM_MODEM_3GPP_REGISTRATION_STATE_ATTACHED_RLOS: Attached for access to Restricted Local Operator Services (applicable only when on LTE). Since 1.14.
138
+ """
139
+ MM_MODEM_3GPP_REGISTRATION_STATE_IDLE = 0
140
+ MM_MODEM_3GPP_REGISTRATION_STATE_HOME = 1
141
+ MM_MODEM_3GPP_REGISTRATION_STATE_SEARCHING = 2
142
+ MM_MODEM_3GPP_REGISTRATION_STATE_DENIED = 3
143
+ MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN = 4
144
+ MM_MODEM_3GPP_REGISTRATION_STATE_ROAMING = 5
145
+ MM_MODEM_3GPP_REGISTRATION_STATE_HOME_SMS_ONLY = 6
146
+ MM_MODEM_3GPP_REGISTRATION_STATE_ROAMING_SMS_ONLY = 7
147
+ MM_MODEM_3GPP_REGISTRATION_STATE_EMERGENCY_ONLY = 8
148
+ MM_MODEM_3GPP_REGISTRATION_STATE_HOME_CSFB_NOT_PREFERRED = 9
149
+ MM_MODEM_3GPP_REGISTRATION_STATE_ROAMING_CSFB_NOT_PREFERRED = 10
150
+ MM_MODEM_3GPP_REGISTRATION_STATE_ATTACHED_RLOS = 11
151
+
152
+
153
+ class MMModemPowerState(IntEnum):
154
+ """Power state of the modem.
155
+
156
+ * MM_MODEM_POWER_STATE_UNKNOWN Unknown power state.
157
+ * MM_MODEM_POWER_STATE_OFF Off.
158
+ * MM_MODEM_POWER_STATE_LOW Low-power mode.
159
+ * MM_MODEM_POWER_STATE_ON Full power mode.
160
+ """
161
+ MM_MODEM_POWER_STATE_UNKNOWN = 0
162
+ MM_MODEM_POWER_STATE_OFF = 1
163
+ MM_MODEM_POWER_STATE_LOW = 2
164
+ MM_MODEM_POWER_STATE_ON = 3
165
+
166
+
167
+ class MMCallDirection(IntEnum):
168
+ """Direction of the call.
169
+
170
+ * MM_CALL_DIRECTION_UNKNOWN Unknown.
171
+ * MM_CALL_DIRECTION_INCOMING Call from network.
172
+ * MM_CALL_DIRECTION_OUTGOING Call to network.
173
+ """
174
+ MM_CALL_DIRECTION_UNKNOWN = 0
175
+ MM_CALL_DIRECTION_INCOMING = 1
176
+ MM_CALL_DIRECTION_OUTGOING = 2
177
+
178
+
179
+ class MMCallState(IntEnum):
180
+ """State of Call.
181
+
182
+ * MM_CALL_STATE_UNKNOWN Default state for a new outgoing call.
183
+ * MM_CALL_STATE_DIALING Outgoing call started. Wait for free channel.
184
+ * MM_CALL_STATE_RINGING_OUT Outgoing call attached to GSM network, waiting for an answer.
185
+ * MM_CALL_STATE_RINGING_IN Incoming call is waiting for an answer.
186
+ * MM_CALL_STATE_ACTIVE Call is active between two peers.
187
+ * MM_CALL_STATE_HELD Held call (by +CHLD AT command).
188
+ * MM_CALL_STATE_WAITING Waiting call (by +CCWA AT command).
189
+ * MM_CALL_STATE_TERMINATED Call is terminated.
190
+ """
191
+ MM_CALL_STATE_UNKNOWN = 0
192
+ MM_CALL_STATE_DIALING = 1
193
+ MM_CALL_STATE_RINGING_OUT = 2
194
+ MM_CALL_STATE_RINGING_IN = 3
195
+ MM_CALL_STATE_ACTIVE = 4
196
+ MM_CALL_STATE_HELD = 5
197
+ MM_CALL_STATE_WAITING = 6
198
+ MM_CALL_STATE_TERMINATED = 7
199
+
200
+
201
+ class MMCallStateReason(IntEnum):
202
+ """Reason for the state change in the call.
203
+
204
+ * MM_CALL_STATE_REASON_UNKNOWN Default value for a new outgoing call.
205
+ * MM_CALL_STATE_REASON_OUTGOING_STARTED Outgoing call is started.
206
+ * MM_CALL_STATE_REASON_INCOMING_NEW Received a new incoming call.
207
+ * MM_CALL_STATE_REASON_ACCEPTED Dialing or Ringing call is accepted.
208
+ * MM_CALL_STATE_REASON_TERMINATED Call is correctly terminated.
209
+ * MM_CALL_STATE_REASON_REFUSED_OR_BUSY Remote peer is busy or refused call.
210
+ * MM_CALL_STATE_REASON_ERROR Wrong number or generic network error.
211
+ * MM_CALL_STATE_REASON_AUDIO_SETUP_FAILED Error setting up audio channel. Since 1.10.
212
+ * MM_CALL_STATE_REASON_TRANSFERRED Call has been transferred. Since 1.12.
213
+ * MM_CALL_STATE_REASON_DEFLECTED Call has been deflected to a new number. Since 1.12.
214
+ """
215
+ MM_CALL_STATE_REASON_UNKNOWN = 0
216
+ MM_CALL_STATE_REASON_OUTGOING_STARTED = 1
217
+ MM_CALL_STATE_REASON_INCOMING_NEW = 2
218
+ MM_CALL_STATE_REASON_ACCEPTED = 3
219
+ MM_CALL_STATE_REASON_TERMINATED = 4
220
+ MM_CALL_STATE_REASON_REFUSED_OR_BUSY = 5
221
+ MM_CALL_STATE_REASON_ERROR = 6
222
+ MM_CALL_STATE_REASON_AUDIO_SETUP_FAILED = 7
223
+ MM_CALL_STATE_REASON_TRANSFERRED = 8
224
+ MM_CALL_STATE_REASON_DEFLECTED = 9
225
+
226
+
227
+ class MMModemCapability(IntEnum):
228
+ MM_MODEM_CAPABILITY_NONE = 0
229
+ MM_MODEM_CAPABILITY_POTS = 1 << 0
230
+ MM_MODEM_CAPABILITY_CDMA_EVDO = 1 << 1
231
+ MM_MODEM_CAPABILITY_GSM_UMTS = 1 << 2
232
+ MM_MODEM_CAPABILITY_LTE = 1 << 3
233
+ MM_MODEM_CAPABILITY_IRIDIUM = 1 << 5
234
+ MM_MODEM_CAPABILITY_5GNR = 1 << 6
235
+ MM_MODEM_CAPABILITY_TDS = 1 << 7
236
+ MM_MODEM_CAPABILITY_ANY = 0xFFFFFFFF
237
+
238
+ @staticmethod
239
+ def names(value) -> list:
240
+ names = []
241
+ if MMModemCapability.MM_MODEM_CAPABILITY_ANY != value:
242
+ for capability in MMModemCapability:
243
+ if capability & value and capability != MMModemCapability.MM_MODEM_CAPABILITY_ANY:
244
+ names.append(capability.name)
245
+ else:
246
+ names.append(MMModemCapability.MM_MODEM_CAPABILITY_ANY.name)
247
+ return names
@@ -0,0 +1,125 @@
1
+ from typing import Any, Dict, List, Tuple
2
+
3
+ from sdbus import DbusInterfaceCommonAsync, dbus_method_async, dbus_property_async
4
+
5
+
6
+ class MMBearerInterfaceAsync(DbusInterfaceCommonAsync, interface_name='org.freedesktop.ModemManager1.Bearer'):
7
+ """This interface provides access to specific actions that may be performed on available bearers."""
8
+
9
+ @dbus_method_async()
10
+ async def connect(self) -> None:
11
+ """
12
+ Requests activation of a packet data connection with the network using this bearer's properties.
13
+ Upon successful activation, the modem can send and receive packet data and, depending on the addressing
14
+ capability of the modem, a connection manager may need to start PPP, perform DHCP, or assign the IP address
15
+ returned by the modem to the data interface. Upon successful return, the "Ip4Config" and/or "Ip6Config"
16
+ properties become valid and may contain IP configuration information for the data interface associated with
17
+ this bearer.
18
+ """
19
+ raise NotImplementedError
20
+
21
+ @dbus_method_async()
22
+ async def disconnect(self) -> None:
23
+ """
24
+ Disconnect and deactivate this packet data connection.
25
+
26
+ Any ongoing data session will be terminated and IP addresses become invalid when this method is called.
27
+ """
28
+ raise NotImplementedError
29
+
30
+ @dbus_property_async(property_signature='s')
31
+ def interface(self) -> str:
32
+ """
33
+ The operating system name for the network data interface that provides packet data using this bearer.
34
+
35
+ Connection managers must configure this interface depending on the IP "method" given by the "Ip4Config" or
36
+ "Ip6Config" properties set by bearer activation.
37
+
38
+ If MM_BEARER_IP_METHOD_STATIC or MM_BEARER_IP_METHOD_DHCP methods are given, the interface will be an
39
+ ethernet-style interface suitable for DHCP or setting static IP configuration on, while if the
40
+ MM_BEARER_IP_METHOD_PPP method is given, the interface will be a serial TTY which must then have PPP run
41
+ over it.
42
+ """
43
+ raise NotImplementedError
44
+
45
+ @dbus_property_async(property_signature='b')
46
+ def connected(self) -> bool:
47
+ """
48
+ Indicates whether or not the bearer is connected and thus whether packet data communication using this bearer
49
+ is possible.
50
+ """
51
+ raise NotImplementedError
52
+
53
+ @dbus_property_async(property_signature='(ss)')
54
+ def connection_error(self) -> Tuple[str, str]:
55
+ raise NotImplementedError
56
+
57
+ @dbus_property_async(property_signature='b')
58
+ def suspended(self) -> bool:
59
+ """
60
+ In some devices, packet data service will be suspended while the device is handling other communication, like
61
+ a voice call. If packet data service is suspended (but not deactivated) this property will be TRUE.
62
+ """
63
+ raise NotImplementedError
64
+
65
+ @dbus_property_async(property_signature='b')
66
+ def multiplexed(self) -> bool:
67
+ raise NotImplementedError
68
+
69
+ @dbus_property_async(property_signature='a{sv}')
70
+ def ip4_config(self) -> Dict[str, Tuple[str, Any]]:
71
+ """
72
+ If the bearer was configured for IPv4 addressing, upon activation this property contains the addressing details for assignment to the data interface.
73
+
74
+ Mandatory items include:
75
+
76
+ "method"
77
+ A MMBearerIpMethod, given as an unsigned integer value (signature "u").
78
+ If the bearer specifies configuration via PPP or DHCP, only the "method" item will be present.
79
+ Additional items which are only applicable when using the MM_BEARER_IP_METHOD_STATIC method are:
80
+ "address"
81
+ IP address, given as a string value (signature "s").
82
+ "prefix"
83
+ Numeric CIDR network prefix (ie, 24, 32, etc), given as an unsigned integer value (signature "u").
84
+ "dns1"
85
+ IP address of the first DNS server, given as a string value (signature "s").
86
+ "dns2"
87
+ IP address of the second DNS server, given as a string value (signature "s").
88
+ "dns3"
89
+ IP address of the third DNS server, given as a string value (signature "s").
90
+ "gateway"
91
+ IP address of the default gateway, given as a string value (signature "s").
92
+ This property may also include the following items when such information is available:
93
+ "mtu"
94
+ Maximum transmission unit (MTU), given as an unsigned integer value (signature "u").
95
+ """
96
+ raise NotImplementedError
97
+
98
+ @dbus_property_async(property_signature='a{sv}')
99
+ def ip6_config(self) -> Dict[str, Tuple[str, Any]]:
100
+ raise NotImplementedError
101
+
102
+ @dbus_property_async(property_signature='a{sv}')
103
+ def stats(self) -> Dict[str, Tuple[str, Any]]:
104
+ """If the modem supports it, this property will show statistics associated to the bearer."""
105
+ raise NotImplementedError
106
+
107
+ @dbus_property_async(property_signature='b')
108
+ def reload_stats_supported(self) -> bool:
109
+ raise NotImplementedError
110
+
111
+ @dbus_property_async(property_signature='u')
112
+ def ip_timeout(self) -> int:
113
+ raise NotImplementedError
114
+
115
+ @dbus_property_async(property_signature='u')
116
+ def bearer_type(self) -> int:
117
+ raise NotImplementedError
118
+
119
+ @dbus_property_async(property_signature='i')
120
+ def profile_id(self) -> int:
121
+ raise NotImplementedError
122
+
123
+ @dbus_property_async(property_signature='a{sv}')
124
+ def properties(self) -> Dict[str, Tuple[str, Any]]:
125
+ raise NotImplementedError
@@ -0,0 +1,95 @@
1
+ from typing import Any, Dict, Tuple
2
+
3
+ from sdbus import DbusInterfaceCommonAsync, dbus_method_async, dbus_property_async, dbus_signal_async
4
+
5
+
6
+ class MMCallInterfaceAsync(DbusInterfaceCommonAsync, interface_name='org.freedesktop.ModemManager1.Call'):
7
+
8
+ @dbus_method_async()
9
+ async def start(self) -> None:
10
+ """If the outgoing call has not yet been started, start it."""
11
+ raise NotImplementedError
12
+
13
+ @dbus_method_async()
14
+ async def accept(self) -> None:
15
+ """Accept incoming call (answer)."""
16
+ raise NotImplementedError
17
+
18
+ @dbus_method_async(input_signature='s')
19
+ async def deflect(self, number: str) -> None:
20
+ """Deflect an incoming or waiting call to a new number.
21
+
22
+ :param number: new number where the call will be deflected.
23
+ """
24
+ raise NotImplementedError
25
+
26
+ @dbus_method_async()
27
+ async def join_multiparty(self) -> None:
28
+ """
29
+ Join the currently held call into a single multiparty call with another already active call.
30
+ """
31
+ raise NotImplementedError
32
+
33
+ @dbus_method_async()
34
+ async def leave_multiparty(self) -> None:
35
+ """
36
+ If this call is part of an ongoing multiparty call, detach it from the multiparty call,
37
+ put the multiparty call on hold, and activate this one alone.
38
+ """
39
+ raise NotImplementedError
40
+
41
+ @dbus_method_async()
42
+ async def hangup(self) -> None:
43
+ """Hangup the active call."""
44
+ raise NotImplementedError
45
+
46
+ @dbus_method_async(input_signature='s')
47
+ async def send_dtmf(self, dtmf: str) -> None:
48
+ """
49
+ Send a DTMF tone (Dual Tone Multi-Frequency) (only on supported modem).
50
+
51
+ :param dtmf: DTMF tone identifier [0-9A-D*#].
52
+ """
53
+ raise NotImplementedError
54
+
55
+ @dbus_property_async(property_signature='i')
56
+ def state(self) -> int:
57
+ """A MMCallState value, describing the state of the call."""
58
+ raise NotImplementedError
59
+
60
+ @dbus_property_async(property_signature='i')
61
+ def state_reason(self) -> int:
62
+ """A MMCallStateReason value, describing why the state is changed."""
63
+ raise NotImplementedError
64
+
65
+ @dbus_property_async(property_signature='i')
66
+ def direction(self) -> int:
67
+ """A MMCallDirection value, describing the direction of the call."""
68
+ raise NotImplementedError
69
+
70
+ @dbus_property_async(property_signature='s')
71
+ def number(self) -> str:
72
+ """The remote phone number."""
73
+ raise NotImplementedError
74
+
75
+ @dbus_property_async(property_signature='b')
76
+ def multiparty(self) -> bool:
77
+ """Whether the call is currently part of a multiparty conference call."""
78
+ raise NotImplementedError
79
+
80
+ @dbus_property_async(property_signature='s')
81
+ def audio_port(self) -> str:
82
+ """Name of the kernel device that provides the audio (if call audio is routed via the host)."""
83
+ raise NotImplementedError
84
+
85
+ @dbus_property_async(property_signature='a{sv}')
86
+ def audio_format(self) -> Dict[str, Tuple[str, Any]]:
87
+ raise NotImplementedError
88
+
89
+ @dbus_signal_async(signal_signature='s')
90
+ def dtmf_received(self) -> str:
91
+ raise NotImplementedError
92
+
93
+ @dbus_signal_async(signal_signature='iiu')
94
+ def state_changed(self) -> Tuple[int, int, int]:
95
+ raise NotImplementedError