Skip to content

Commit 4fd18be

Browse files
agxmartinpitt
authored andcommitted
modemmanager: Allow to set CellBroadcast channel list
Signed-off-by: Guido Günther <[email protected]>
1 parent c028bb8 commit 4fd18be

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

dbusmock/templates/modemmanager.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,17 @@ def deleteCbm(self, cbm_path):
151151
)
152152

153153

154+
def setChannels(_self, channels):
155+
modem_obj = mockobject.objects[SIMPLE_MODEM_PATH]
156+
157+
modem_obj.UpdateProperties(
158+
MODEM_CELL_BROADCAST_IFACE,
159+
{
160+
"Channels": dbus.Array(channels),
161+
},
162+
)
163+
164+
154165
@dbus.service.method(MOCK_IFACE, in_signature="", out_signature="ss")
155166
def AddSimpleModem(self):
156167
"""Convenience method to add a simple Modem object
@@ -196,11 +207,13 @@ def AddSimpleModem(self):
196207
modem.AddProperties(MODEM_3GPP_IFACE, modem_3gpp_props)
197208

198209
modem_cell_broadcast_props = {
210+
"Channels": dbus.Array([], signature="(uu)"),
199211
"CellBroadcasts": dbus.Array([], signature="o"),
200212
}
201213
modem_cell_broadcast_methods = [
202214
("List", "", "ao", listCbm),
203215
("Delete", "o", "", deleteCbm),
216+
("SetChannels", "a(uu)", "", setChannels),
204217
]
205218
modem.AddProperties(MODEM_CELL_BROADCAST_IFACE, modem_cell_broadcast_props)
206219
modem.AddMethods(MODEM_CELL_BROADCAST_IFACE, modem_cell_broadcast_methods)

0 commit comments

Comments
 (0)