comparison libervia/backend/bridge/dbus_bridge.py @ 4284:3a550e9a2b55

black reformatting
author Goffi <goffi@goffi.org>
date Sun, 14 Jul 2024 16:47:45 +0200
parents 4cf98f506269
children
comparison
equal deleted inserted replaced
4283:23842a63ea00 4284:3a550e9a2b55
84 84
85 class DBusObject(objects.DBusObject): 85 class DBusObject(objects.DBusObject):
86 86
87 core_iface = DBusInterface( 87 core_iface = DBusInterface(
88 const_INT_PREFIX + const_CORE_SUFFIX, 88 const_INT_PREFIX + const_CORE_SUFFIX,
89 Method('action_launch', arguments='sss', returns='s'), 89 Method("action_launch", arguments="sss", returns="s"),
90 Method('actions_get', arguments='s', returns='a(ssi)'), 90 Method("actions_get", arguments="s", returns="a(ssi)"),
91 Method('config_get', arguments='ss', returns='s'), 91 Method("config_get", arguments="ss", returns="s"),
92 Method('connect', arguments='ssa{ss}', returns='b'), 92 Method("connect", arguments="ssa{ss}", returns="b"),
93 Method('contact_add', arguments='ss', returns=''), 93 Method("contact_add", arguments="ss", returns=""),
94 Method('contact_del', arguments='ss', returns=''), 94 Method("contact_del", arguments="ss", returns=""),
95 Method('contact_get', arguments='ss', returns='(a{ss}as)'), 95 Method("contact_get", arguments="ss", returns="(a{ss}as)"),
96 Method('contact_update', arguments='ssass', returns=''), 96 Method("contact_update", arguments="ssass", returns=""),
97 Method('contacts_get', arguments='s', returns='a(sa{ss}as)'), 97 Method("contacts_get", arguments="s", returns="a(sa{ss}as)"),
98 Method('contacts_get_from_group', arguments='ss', returns='as'), 98 Method("contacts_get_from_group", arguments="ss", returns="as"),
99 Method('devices_infos_get', arguments='ss', returns='s'), 99 Method("devices_infos_get", arguments="ss", returns="s"),
100 Method('disco_find_by_features', arguments='asa(ss)bbbbbs', returns='(a{sa(sss)}a{sa(sss)}a{sa(sss)})'), 100 Method(
101 Method('disco_infos', arguments='ssbs', returns='(asa(sss)a{sa(a{ss}as)})'), 101 "disco_find_by_features",
102 Method('disco_items', arguments='ssbs', returns='a(sss)'), 102 arguments="asa(ss)bbbbbs",
103 Method('disconnect', arguments='s', returns=''), 103 returns="(a{sa(sss)}a{sa(sss)}a{sa(sss)})",
104 Method('encryption_namespace_get', arguments='s', returns='s'), 104 ),
105 Method('encryption_plugins_get', arguments='', returns='s'), 105 Method("disco_infos", arguments="ssbs", returns="(asa(sss)a{sa(a{ss}as)})"),
106 Method('encryption_trust_ui_get', arguments='sss', returns='s'), 106 Method("disco_items", arguments="ssbs", returns="a(sss)"),
107 Method('entities_data_get', arguments='asass', returns='a{sa{ss}}'), 107 Method("disconnect", arguments="s", returns=""),
108 Method('entity_data_get', arguments='sass', returns='a{ss}'), 108 Method("encryption_namespace_get", arguments="s", returns="s"),
109 Method('features_get', arguments='s', returns='a{sa{ss}}'), 109 Method("encryption_plugins_get", arguments="", returns="s"),
110 Method('history_get', arguments='ssiba{ss}s', returns='a(sdssa{ss}a{ss}ss)'), 110 Method("encryption_trust_ui_get", arguments="sss", returns="s"),
111 Method('image_check', arguments='s', returns='s'), 111 Method("entities_data_get", arguments="asass", returns="a{sa{ss}}"),
112 Method('image_convert', arguments='ssss', returns='s'), 112 Method("entity_data_get", arguments="sass", returns="a{ss}"),
113 Method('image_generate_preview', arguments='ss', returns='s'), 113 Method("features_get", arguments="s", returns="a{sa{ss}}"),
114 Method('image_resize', arguments='sii', returns='s'), 114 Method("history_get", arguments="ssiba{ss}s", returns="a(sdssa{ss}a{ss}ss)"),
115 Method('init_pre_script', arguments='', returns=''), 115 Method("image_check", arguments="s", returns="s"),
116 Method('is_connected', arguments='s', returns='b'), 116 Method("image_convert", arguments="ssss", returns="s"),
117 Method('main_resource_get', arguments='ss', returns='s'), 117 Method("image_generate_preview", arguments="ss", returns="s"),
118 Method('menu_help_get', arguments='ss', returns='s'), 118 Method("image_resize", arguments="sii", returns="s"),
119 Method('menu_launch', arguments='sasa{ss}is', returns='a{ss}'), 119 Method("init_pre_script", arguments="", returns=""),
120 Method('menus_get', arguments='si', returns='a(ssasasa{ss})'), 120 Method("is_connected", arguments="s", returns="b"),
121 Method('message_encryption_get', arguments='ss', returns='s'), 121 Method("main_resource_get", arguments="ss", returns="s"),
122 Method('message_encryption_start', arguments='ssbs', returns=''), 122 Method("menu_help_get", arguments="ss", returns="s"),
123 Method('message_encryption_stop', arguments='ss', returns=''), 123 Method("menu_launch", arguments="sasa{ss}is", returns="a{ss}"),
124 Method('message_send', arguments='sa{ss}a{ss}sss', returns=''), 124 Method("menus_get", arguments="si", returns="a(ssasasa{ss})"),
125 Method('namespaces_get', arguments='', returns='a{ss}'), 125 Method("message_encryption_get", arguments="ss", returns="s"),
126 Method('notification_add', arguments='ssssbbsdss', returns=''), 126 Method("message_encryption_start", arguments="ssbs", returns=""),
127 Method('notification_delete', arguments='sbs', returns=''), 127 Method("message_encryption_stop", arguments="ss", returns=""),
128 Method('notifications_expired_clean', arguments='ds', returns=''), 128 Method("message_send", arguments="sa{ss}a{ss}sss", returns=""),
129 Method('notifications_get', arguments='ss', returns='s'), 129 Method("namespaces_get", arguments="", returns="a{ss}"),
130 Method('param_get_a', arguments='ssss', returns='s'), 130 Method("notification_add", arguments="ssssbbsdss", returns=""),
131 Method('param_get_a_async', arguments='sssis', returns='s'), 131 Method("notification_delete", arguments="sbs", returns=""),
132 Method('param_set', arguments='sssis', returns=''), 132 Method("notifications_expired_clean", arguments="ds", returns=""),
133 Method('param_ui_get', arguments='isss', returns='s'), 133 Method("notifications_get", arguments="ss", returns="s"),
134 Method('params_categories_get', arguments='', returns='as'), 134 Method("param_get_a", arguments="ssss", returns="s"),
135 Method('params_register_app', arguments='sis', returns=''), 135 Method("param_get_a_async", arguments="sssis", returns="s"),
136 Method('params_template_load', arguments='s', returns='b'), 136 Method("param_set", arguments="sssis", returns=""),
137 Method('params_template_save', arguments='s', returns='b'), 137 Method("param_ui_get", arguments="isss", returns="s"),
138 Method('params_values_from_category_get_async', arguments='sisss', returns='a{ss}'), 138 Method("params_categories_get", arguments="", returns="as"),
139 Method('presence_set', arguments='ssa{ss}s', returns=''), 139 Method("params_register_app", arguments="sis", returns=""),
140 Method('presence_statuses_get', arguments='s', returns='a{sa{s(sia{ss})}}'), 140 Method("params_template_load", arguments="s", returns="b"),
141 Method('private_data_delete', arguments='sss', returns=''), 141 Method("params_template_save", arguments="s", returns="b"),
142 Method('private_data_get', arguments='sss', returns='s'), 142 Method(
143 Method('private_data_set', arguments='ssss', returns=''), 143 "params_values_from_category_get_async", arguments="sisss", returns="a{ss}"
144 Method('profile_create', arguments='sss', returns=''), 144 ),
145 Method('profile_delete_async', arguments='s', returns=''), 145 Method("presence_set", arguments="ssa{ss}s", returns=""),
146 Method('profile_is_session_started', arguments='s', returns='b'), 146 Method("presence_statuses_get", arguments="s", returns="a{sa{s(sia{ss})}}"),
147 Method('profile_name_get', arguments='s', returns='s'), 147 Method("private_data_delete", arguments="sss", returns=""),
148 Method('profile_set_default', arguments='s', returns=''), 148 Method("private_data_get", arguments="sss", returns="s"),
149 Method('profile_start_session', arguments='ss', returns='b'), 149 Method("private_data_set", arguments="ssss", returns=""),
150 Method('profiles_list_get', arguments='bb', returns='as'), 150 Method("profile_create", arguments="sss", returns=""),
151 Method('progress_get', arguments='ss', returns='a{ss}'), 151 Method("profile_delete_async", arguments="s", returns=""),
152 Method('progress_get_all', arguments='s', returns='a{sa{sa{ss}}}'), 152 Method("profile_is_session_started", arguments="s", returns="b"),
153 Method('progress_get_all_metadata', arguments='s', returns='a{sa{sa{ss}}}'), 153 Method("profile_name_get", arguments="s", returns="s"),
154 Method('ready_get', arguments='', returns=''), 154 Method("profile_set_default", arguments="s", returns=""),
155 Method('roster_resync', arguments='s', returns=''), 155 Method("profile_start_session", arguments="ss", returns="b"),
156 Method('session_infos_get', arguments='s', returns='a{ss}'), 156 Method("profiles_list_get", arguments="bb", returns="as"),
157 Method('sub_waiting_get', arguments='s', returns='a{ss}'), 157 Method("progress_get", arguments="ss", returns="a{ss}"),
158 Method('subscription', arguments='sss', returns=''), 158 Method("progress_get_all", arguments="s", returns="a{sa{sa{ss}}}"),
159 Method('version_get', arguments='', returns='s'), 159 Method("progress_get_all_metadata", arguments="s", returns="a{sa{sa{ss}}}"),
160 Signal('_debug', 'sa{ss}s'), 160 Method("ready_get", arguments="", returns=""),
161 Signal('action_new', 'ssis'), 161 Method("roster_resync", arguments="s", returns=""),
162 Signal('connected', 'ss'), 162 Method("session_infos_get", arguments="s", returns="a{ss}"),
163 Signal('contact_deleted', 'ss'), 163 Method("sub_waiting_get", arguments="s", returns="a{ss}"),
164 Signal('contact_new', 'sa{ss}ass'), 164 Method("subscription", arguments="sss", returns=""),
165 Signal('disconnected', 's'), 165 Method("version_get", arguments="", returns="s"),
166 Signal('entity_data_updated', 'ssss'), 166 Signal("_debug", "sa{ss}s"),
167 Signal('message_encryption_started', 'sss'), 167 Signal("action_new", "ssis"),
168 Signal('message_encryption_stopped', 'sa{ss}s'), 168 Signal("connected", "ss"),
169 Signal('message_new', 'sdssa{ss}a{ss}sss'), 169 Signal("contact_deleted", "ss"),
170 Signal('message_update', 'ssss'), 170 Signal("contact_new", "sa{ss}ass"),
171 Signal('notification_deleted', 'ss'), 171 Signal("disconnected", "s"),
172 Signal('notification_new', 'sdssssbidss'), 172 Signal("entity_data_updated", "ssss"),
173 Signal('param_update', 'ssss'), 173 Signal("message_encryption_started", "sss"),
174 Signal('presence_update', 'ssia{ss}s'), 174 Signal("message_encryption_stopped", "sa{ss}s"),
175 Signal('progress_error', 'sss'), 175 Signal("message_new", "sdssa{ss}a{ss}sss"),
176 Signal('progress_finished', 'sa{ss}s'), 176 Signal("message_update", "ssss"),
177 Signal('progress_started', 'sa{ss}s'), 177 Signal("notification_deleted", "ss"),
178 Signal('subscribe', 'sss'), 178 Signal("notification_new", "sdssssbidss"),
179 Signal("param_update", "ssss"),
180 Signal("presence_update", "ssia{ss}s"),
181 Signal("progress_error", "sss"),
182 Signal("progress_finished", "sa{ss}s"),
183 Signal("progress_started", "sa{ss}s"),
184 Signal("subscribe", "sss"),
179 ) 185 )
180 plugin_iface = DBusInterface(const_INT_PREFIX + const_PLUGIN_SUFFIX) 186 plugin_iface = DBusInterface(const_INT_PREFIX + const_PLUGIN_SUFFIX)
181 187
182 dbusInterfaces = [core_iface, plugin_iface] 188 dbusInterfaces = [core_iface, plugin_iface]
183 189
198 else: 204 else:
199 d = defer.maybeDeferred(cb, *args, **kwargs) 205 d = defer.maybeDeferred(cb, *args, **kwargs)
200 d.addErrback(GenericException.create_and_raise) 206 d.addErrback(GenericException.create_and_raise)
201 return d 207 return d
202 208
203
204 def dbus_action_launch(self, callback_id, data, profile_key="@DEFAULT@"): 209 def dbus_action_launch(self, callback_id, data, profile_key="@DEFAULT@"):
205 return self._callback("action_launch", callback_id, data, profile_key) 210 return self._callback("action_launch", callback_id, data, profile_key)
206 211
207 def dbus_actions_get(self, profile_key="@DEFAULT@"): 212 def dbus_actions_get(self, profile_key="@DEFAULT@"):
208 return self._callback("actions_get", profile_key) 213 return self._callback("actions_get", profile_key)
209 214
210 def dbus_config_get(self, section, name): 215 def dbus_config_get(self, section, name):
211 return self._callback("config_get", section, name) 216 return self._callback("config_get", section, name)
212 217
213 def dbus_connect(self, profile_key="@DEFAULT@", password='', options={}): 218 def dbus_connect(self, profile_key="@DEFAULT@", password="", options={}):
214 return self._callback("connect", profile_key, password, options) 219 return self._callback("connect", profile_key, password, options)
215 220
216 def dbus_contact_add(self, entity_jid, profile_key="@DEFAULT@"): 221 def dbus_contact_add(self, entity_jid, profile_key="@DEFAULT@"):
217 return self._callback("contact_add", entity_jid, profile_key) 222 return self._callback("contact_add", entity_jid, profile_key)
218 223
232 return self._callback("contacts_get_from_group", group, profile_key) 237 return self._callback("contacts_get_from_group", group, profile_key)
233 238
234 def dbus_devices_infos_get(self, bare_jid, profile_key): 239 def dbus_devices_infos_get(self, bare_jid, profile_key):
235 return self._callback("devices_infos_get", bare_jid, profile_key) 240 return self._callback("devices_infos_get", bare_jid, profile_key)
236 241
237 def dbus_disco_find_by_features(self, namespaces, identities, bare_jid=False, service=True, roster=True, own_jid=True, local_device=False, profile_key="@DEFAULT@"): 242 def dbus_disco_find_by_features(
238 return self._callback("disco_find_by_features", namespaces, identities, bare_jid, service, roster, own_jid, local_device, profile_key) 243 self,
239 244 namespaces,
240 def dbus_disco_infos(self, entity_jid, node=u'', use_cache=True, profile_key="@DEFAULT@"): 245 identities,
246 bare_jid=False,
247 service=True,
248 roster=True,
249 own_jid=True,
250 local_device=False,
251 profile_key="@DEFAULT@",
252 ):
253 return self._callback(
254 "disco_find_by_features",
255 namespaces,
256 identities,
257 bare_jid,
258 service,
259 roster,
260 own_jid,
261 local_device,
262 profile_key,
263 )
264
265 def dbus_disco_infos(
266 self, entity_jid, node="", use_cache=True, profile_key="@DEFAULT@"
267 ):
241 return self._callback("disco_infos", entity_jid, node, use_cache, profile_key) 268 return self._callback("disco_infos", entity_jid, node, use_cache, profile_key)
242 269
243 def dbus_disco_items(self, entity_jid, node=u'', use_cache=True, profile_key="@DEFAULT@"): 270 def dbus_disco_items(
271 self, entity_jid, node="", use_cache=True, profile_key="@DEFAULT@"
272 ):
244 return self._callback("disco_items", entity_jid, node, use_cache, profile_key) 273 return self._callback("disco_items", entity_jid, node, use_cache, profile_key)
245 274
246 def dbus_disconnect(self, profile_key="@DEFAULT@"): 275 def dbus_disconnect(self, profile_key="@DEFAULT@"):
247 return self._callback("disconnect", profile_key) 276 return self._callback("disconnect", profile_key)
248 277
249 def dbus_encryption_namespace_get(self, arg_0): 278 def dbus_encryption_namespace_get(self, arg_0):
250 return self._callback("encryption_namespace_get", arg_0) 279 return self._callback("encryption_namespace_get", arg_0)
251 280
252 def dbus_encryption_plugins_get(self, ): 281 def dbus_encryption_plugins_get(
253 return self._callback("encryption_plugins_get", ) 282 self,
283 ):
284 return self._callback(
285 "encryption_plugins_get",
286 )
254 287
255 def dbus_encryption_trust_ui_get(self, to_jid, namespace, profile_key): 288 def dbus_encryption_trust_ui_get(self, to_jid, namespace, profile_key):
256 return self._callback("encryption_trust_ui_get", to_jid, namespace, profile_key) 289 return self._callback("encryption_trust_ui_get", to_jid, namespace, profile_key)
257 290
258 def dbus_entities_data_get(self, jids, keys, profile): 291 def dbus_entities_data_get(self, jids, keys, profile):
262 return self._callback("entity_data_get", jid, keys, profile) 295 return self._callback("entity_data_get", jid, keys, profile)
263 296
264 def dbus_features_get(self, profile_key): 297 def dbus_features_get(self, profile_key):
265 return self._callback("features_get", profile_key) 298 return self._callback("features_get", profile_key)
266 299
267 def dbus_history_get(self, from_jid, to_jid, limit, between=True, filters='', profile="@NONE@"): 300 def dbus_history_get(
268 return self._callback("history_get", from_jid, to_jid, limit, between, filters, profile) 301 self, from_jid, to_jid, limit, between=True, filters="", profile="@NONE@"
302 ):
303 return self._callback(
304 "history_get", from_jid, to_jid, limit, between, filters, profile
305 )
269 306
270 def dbus_image_check(self, arg_0): 307 def dbus_image_check(self, arg_0):
271 return self._callback("image_check", arg_0) 308 return self._callback("image_check", arg_0)
272 309
273 def dbus_image_convert(self, source, dest, arg_2, extra): 310 def dbus_image_convert(self, source, dest, arg_2, extra):
277 return self._callback("image_generate_preview", image_path, profile_key) 314 return self._callback("image_generate_preview", image_path, profile_key)
278 315
279 def dbus_image_resize(self, image_path, width, height): 316 def dbus_image_resize(self, image_path, width, height):
280 return self._callback("image_resize", image_path, width, height) 317 return self._callback("image_resize", image_path, width, height)
281 318
282 def dbus_init_pre_script(self, ): 319 def dbus_init_pre_script(
283 return self._callback("init_pre_script", ) 320 self,
321 ):
322 return self._callback(
323 "init_pre_script",
324 )
284 325
285 def dbus_is_connected(self, profile_key="@DEFAULT@"): 326 def dbus_is_connected(self, profile_key="@DEFAULT@"):
286 return self._callback("is_connected", profile_key) 327 return self._callback("is_connected", profile_key)
287 328
288 def dbus_main_resource_get(self, contact_jid, profile_key="@DEFAULT@"): 329 def dbus_main_resource_get(self, contact_jid, profile_key="@DEFAULT@"):
290 331
291 def dbus_menu_help_get(self, menu_id, language): 332 def dbus_menu_help_get(self, menu_id, language):
292 return self._callback("menu_help_get", menu_id, language) 333 return self._callback("menu_help_get", menu_id, language)
293 334
294 def dbus_menu_launch(self, menu_type, path, data, security_limit, profile_key): 335 def dbus_menu_launch(self, menu_type, path, data, security_limit, profile_key):
295 return self._callback("menu_launch", menu_type, path, data, security_limit, profile_key) 336 return self._callback(
337 "menu_launch", menu_type, path, data, security_limit, profile_key
338 )
296 339
297 def dbus_menus_get(self, language, security_limit): 340 def dbus_menus_get(self, language, security_limit):
298 return self._callback("menus_get", language, security_limit) 341 return self._callback("menus_get", language, security_limit)
299 342
300 def dbus_message_encryption_get(self, to_jid, profile_key): 343 def dbus_message_encryption_get(self, to_jid, profile_key):
301 return self._callback("message_encryption_get", to_jid, profile_key) 344 return self._callback("message_encryption_get", to_jid, profile_key)
302 345
303 def dbus_message_encryption_start(self, to_jid, namespace='', replace=False, profile_key="@NONE@"): 346 def dbus_message_encryption_start(
304 return self._callback("message_encryption_start", to_jid, namespace, replace, profile_key) 347 self, to_jid, namespace="", replace=False, profile_key="@NONE@"
348 ):
349 return self._callback(
350 "message_encryption_start", to_jid, namespace, replace, profile_key
351 )
305 352
306 def dbus_message_encryption_stop(self, to_jid, profile_key): 353 def dbus_message_encryption_stop(self, to_jid, profile_key):
307 return self._callback("message_encryption_stop", to_jid, profile_key) 354 return self._callback("message_encryption_stop", to_jid, profile_key)
308 355
309 def dbus_message_send(self, to_jid, message, subject={}, mess_type="auto", extra={}, profile_key="@NONE@"): 356 def dbus_message_send(
310 return self._callback("message_send", to_jid, message, subject, mess_type, extra, profile_key) 357 self,
311 358 to_jid,
312 def dbus_namespaces_get(self, ): 359 message,
313 return self._callback("namespaces_get", ) 360 subject={},
314 361 mess_type="auto",
315 def dbus_notification_add(self, type_, body_plain, body_rich, title, is_global, requires_action, arg_6, priority, expire_at, extra): 362 extra={},
316 return self._callback("notification_add", type_, body_plain, body_rich, title, is_global, requires_action, arg_6, priority, expire_at, extra) 363 profile_key="@NONE@",
364 ):
365 return self._callback(
366 "message_send", to_jid, message, subject, mess_type, extra, profile_key
367 )
368
369 def dbus_namespaces_get(
370 self,
371 ):
372 return self._callback(
373 "namespaces_get",
374 )
375
376 def dbus_notification_add(
377 self,
378 type_,
379 body_plain,
380 body_rich,
381 title,
382 is_global,
383 requires_action,
384 arg_6,
385 priority,
386 expire_at,
387 extra,
388 ):
389 return self._callback(
390 "notification_add",
391 type_,
392 body_plain,
393 body_rich,
394 title,
395 is_global,
396 requires_action,
397 arg_6,
398 priority,
399 expire_at,
400 extra,
401 )
317 402
318 def dbus_notification_delete(self, id_, is_global, profile_key): 403 def dbus_notification_delete(self, id_, is_global, profile_key):
319 return self._callback("notification_delete", id_, is_global, profile_key) 404 return self._callback("notification_delete", id_, is_global, profile_key)
320 405
321 def dbus_notifications_expired_clean(self, limit_timestamp, profile_key): 406 def dbus_notifications_expired_clean(self, limit_timestamp, profile_key):
322 return self._callback("notifications_expired_clean", limit_timestamp, profile_key) 407 return self._callback("notifications_expired_clean", limit_timestamp, profile_key)
323 408
324 def dbus_notifications_get(self, filters, profile_key): 409 def dbus_notifications_get(self, filters, profile_key):
325 return self._callback("notifications_get", filters, profile_key) 410 return self._callback("notifications_get", filters, profile_key)
326 411
327 def dbus_param_get_a(self, name, category, attribute="value", profile_key="@DEFAULT@"): 412 def dbus_param_get_a(
413 self, name, category, attribute="value", profile_key="@DEFAULT@"
414 ):
328 return self._callback("param_get_a", name, category, attribute, profile_key) 415 return self._callback("param_get_a", name, category, attribute, profile_key)
329 416
330 def dbus_param_get_a_async(self, name, category, attribute="value", security_limit=-1, profile_key="@DEFAULT@"): 417 def dbus_param_get_a_async(
331 return self._callback("param_get_a_async", name, category, attribute, security_limit, profile_key) 418 self,
332 419 name,
333 def dbus_param_set(self, name, value, category, security_limit=-1, profile_key="@DEFAULT@"): 420 category,
334 return self._callback("param_set", name, value, category, security_limit, profile_key) 421 attribute="value",
335 422 security_limit=-1,
336 def dbus_param_ui_get(self, security_limit=-1, app='', extra='', profile_key="@DEFAULT@"): 423 profile_key="@DEFAULT@",
424 ):
425 return self._callback(
426 "param_get_a_async", name, category, attribute, security_limit, profile_key
427 )
428
429 def dbus_param_set(
430 self, name, value, category, security_limit=-1, profile_key="@DEFAULT@"
431 ):
432 return self._callback(
433 "param_set", name, value, category, security_limit, profile_key
434 )
435
436 def dbus_param_ui_get(
437 self, security_limit=-1, app="", extra="", profile_key="@DEFAULT@"
438 ):
337 return self._callback("param_ui_get", security_limit, app, extra, profile_key) 439 return self._callback("param_ui_get", security_limit, app, extra, profile_key)
338 440
339 def dbus_params_categories_get(self, ): 441 def dbus_params_categories_get(
340 return self._callback("params_categories_get", ) 442 self,
341 443 ):
342 def dbus_params_register_app(self, xml, security_limit=-1, app=''): 444 return self._callback(
445 "params_categories_get",
446 )
447
448 def dbus_params_register_app(self, xml, security_limit=-1, app=""):
343 return self._callback("params_register_app", xml, security_limit, app) 449 return self._callback("params_register_app", xml, security_limit, app)
344 450
345 def dbus_params_template_load(self, filename): 451 def dbus_params_template_load(self, filename):
346 return self._callback("params_template_load", filename) 452 return self._callback("params_template_load", filename)
347 453
348 def dbus_params_template_save(self, filename): 454 def dbus_params_template_save(self, filename):
349 return self._callback("params_template_save", filename) 455 return self._callback("params_template_save", filename)
350 456
351 def dbus_params_values_from_category_get_async(self, category, security_limit=-1, app="", extra="", profile_key="@DEFAULT@"): 457 def dbus_params_values_from_category_get_async(
352 return self._callback("params_values_from_category_get_async", category, security_limit, app, extra, profile_key) 458 self, category, security_limit=-1, app="", extra="", profile_key="@DEFAULT@"
353 459 ):
354 def dbus_presence_set(self, to_jid='', show='', statuses={}, profile_key="@DEFAULT@"): 460 return self._callback(
461 "params_values_from_category_get_async",
462 category,
463 security_limit,
464 app,
465 extra,
466 profile_key,
467 )
468
469 def dbus_presence_set(self, to_jid="", show="", statuses={}, profile_key="@DEFAULT@"):
355 return self._callback("presence_set", to_jid, show, statuses, profile_key) 470 return self._callback("presence_set", to_jid, show, statuses, profile_key)
356 471
357 def dbus_presence_statuses_get(self, profile_key="@DEFAULT@"): 472 def dbus_presence_statuses_get(self, profile_key="@DEFAULT@"):
358 return self._callback("presence_statuses_get", profile_key) 473 return self._callback("presence_statuses_get", profile_key)
359 474
364 return self._callback("private_data_get", namespace, key, profile_key) 479 return self._callback("private_data_get", namespace, key, profile_key)
365 480
366 def dbus_private_data_set(self, namespace, key, data, profile_key): 481 def dbus_private_data_set(self, namespace, key, data, profile_key):
367 return self._callback("private_data_set", namespace, key, data, profile_key) 482 return self._callback("private_data_set", namespace, key, data, profile_key)
368 483
369 def dbus_profile_create(self, profile, password='', component=''): 484 def dbus_profile_create(self, profile, password="", component=""):
370 return self._callback("profile_create", profile, password, component) 485 return self._callback("profile_create", profile, password, component)
371 486
372 def dbus_profile_delete_async(self, profile): 487 def dbus_profile_delete_async(self, profile):
373 return self._callback("profile_delete_async", profile) 488 return self._callback("profile_delete_async", profile)
374 489
379 return self._callback("profile_name_get", profile_key) 494 return self._callback("profile_name_get", profile_key)
380 495
381 def dbus_profile_set_default(self, profile): 496 def dbus_profile_set_default(self, profile):
382 return self._callback("profile_set_default", profile) 497 return self._callback("profile_set_default", profile)
383 498
384 def dbus_profile_start_session(self, password='', profile_key="@DEFAULT@"): 499 def dbus_profile_start_session(self, password="", profile_key="@DEFAULT@"):
385 return self._callback("profile_start_session", password, profile_key) 500 return self._callback("profile_start_session", password, profile_key)
386 501
387 def dbus_profiles_list_get(self, clients=True, components=False): 502 def dbus_profiles_list_get(self, clients=True, components=False):
388 return self._callback("profiles_list_get", clients, components) 503 return self._callback("profiles_list_get", clients, components)
389 504
394 return self._callback("progress_get_all", profile) 509 return self._callback("progress_get_all", profile)
395 510
396 def dbus_progress_get_all_metadata(self, profile): 511 def dbus_progress_get_all_metadata(self, profile):
397 return self._callback("progress_get_all_metadata", profile) 512 return self._callback("progress_get_all_metadata", profile)
398 513
399 def dbus_ready_get(self, ): 514 def dbus_ready_get(
400 return self._callback("ready_get", ) 515 self,
516 ):
517 return self._callback(
518 "ready_get",
519 )
401 520
402 def dbus_roster_resync(self, profile_key="@DEFAULT@"): 521 def dbus_roster_resync(self, profile_key="@DEFAULT@"):
403 return self._callback("roster_resync", profile_key) 522 return self._callback("roster_resync", profile_key)
404 523
405 def dbus_session_infos_get(self, profile_key): 524 def dbus_session_infos_get(self, profile_key):
409 return self._callback("sub_waiting_get", profile_key) 528 return self._callback("sub_waiting_get", profile_key)
410 529
411 def dbus_subscription(self, sub_type, entity, profile_key="@DEFAULT@"): 530 def dbus_subscription(self, sub_type, entity, profile_key="@DEFAULT@"):
412 return self._callback("subscription", sub_type, entity, profile_key) 531 return self._callback("subscription", sub_type, entity, profile_key)
413 532
414 def dbus_version_get(self, ): 533 def dbus_version_get(
415 return self._callback("version_get", ) 534 self,
416 535 ):
536 return self._callback(
537 "version_get",
538 )
417 539
418 540
419 class bridge: 541 class bridge:
420 542
421 def __init__(self): 543 def __init__(self):
458 580
459 def entity_data_updated(self, jid, name, value, profile): 581 def entity_data_updated(self, jid, name, value, profile):
460 self._obj.emitSignal("entity_data_updated", jid, name, value, profile) 582 self._obj.emitSignal("entity_data_updated", jid, name, value, profile)
461 583
462 def message_encryption_started(self, to_jid, encryption_data, profile_key): 584 def message_encryption_started(self, to_jid, encryption_data, profile_key):
463 self._obj.emitSignal("message_encryption_started", to_jid, encryption_data, profile_key) 585 self._obj.emitSignal(
586 "message_encryption_started", to_jid, encryption_data, profile_key
587 )
464 588
465 def message_encryption_stopped(self, to_jid, encryption_data, profile_key): 589 def message_encryption_stopped(self, to_jid, encryption_data, profile_key):
466 self._obj.emitSignal("message_encryption_stopped", to_jid, encryption_data, profile_key) 590 self._obj.emitSignal(
467 591 "message_encryption_stopped", to_jid, encryption_data, profile_key
468 def message_new(self, uid, timestamp, from_jid, to_jid, message, subject, mess_type, extra, profile): 592 )
469 self._obj.emitSignal("message_new", uid, timestamp, from_jid, to_jid, message, subject, mess_type, extra, profile) 593
594 def message_new(
595 self,
596 uid,
597 timestamp,
598 from_jid,
599 to_jid,
600 message,
601 subject,
602 mess_type,
603 extra,
604 profile,
605 ):
606 self._obj.emitSignal(
607 "message_new",
608 uid,
609 timestamp,
610 from_jid,
611 to_jid,
612 message,
613 subject,
614 mess_type,
615 extra,
616 profile,
617 )
470 618
471 def message_update(self, uid, message_type, message_data, profile): 619 def message_update(self, uid, message_type, message_data, profile):
472 self._obj.emitSignal("message_update", uid, message_type, message_data, profile) 620 self._obj.emitSignal("message_update", uid, message_type, message_data, profile)
473 621
474 def notification_deleted(self, id, profile): 622 def notification_deleted(self, id, profile):
475 self._obj.emitSignal("notification_deleted", id, profile) 623 self._obj.emitSignal("notification_deleted", id, profile)
476 624
477 def notification_new(self, id, timestamp, type, body_plain, body_rich, title, requires_action, priority, expire_at, extra, profile): 625 def notification_new(
478 self._obj.emitSignal("notification_new", id, timestamp, type, body_plain, body_rich, title, requires_action, priority, expire_at, extra, profile) 626 self,
627 id,
628 timestamp,
629 type,
630 body_plain,
631 body_rich,
632 title,
633 requires_action,
634 priority,
635 expire_at,
636 extra,
637 profile,
638 ):
639 self._obj.emitSignal(
640 "notification_new",
641 id,
642 timestamp,
643 type,
644 body_plain,
645 body_rich,
646 title,
647 requires_action,
648 priority,
649 expire_at,
650 extra,
651 profile,
652 )
479 653
480 def param_update(self, name, value, category, profile): 654 def param_update(self, name, value, category, profile):
481 self._obj.emitSignal("param_update", name, value, category, profile) 655 self._obj.emitSignal("param_update", name, value, category, profile)
482 656
483 def presence_update(self, entity_jid, show, priority, statuses, profile): 657 def presence_update(self, entity_jid, show, priority, statuses, profile):
484 self._obj.emitSignal("presence_update", entity_jid, show, priority, statuses, profile) 658 self._obj.emitSignal(
659 "presence_update", entity_jid, show, priority, statuses, profile
660 )
485 661
486 def progress_error(self, id, error, profile): 662 def progress_error(self, id, error, profile):
487 self._obj.emitSignal("progress_error", id, error, profile) 663 self._obj.emitSignal("progress_error", id, error, profile)
488 664
489 def progress_finished(self, id, metadata, profile): 665 def progress_finished(self, id, metadata, profile):