Mercurial > libervia-backend
annotate src/bridge/bridge_constructor/dbus_frontend_template.py @ 547:8b5e142354ca
installation: added wokkel to dependencies, and removed custom wokkel installation in setup.py (muc branch is now merged mainstream)
author | Goffi <goffi@goffi.org> |
---|---|
date | Wed, 14 Nov 2012 21:44:25 +0100 |
parents | 790be337cc41 |
children | 0bb2e0d1c878 |
rev | line source |
---|---|
267 | 1 #!/usr/bin/python |
2 #-*- coding: utf-8 -*- | |
3 | |
4 """ | |
5 SAT communication bridge | |
459 | 6 Copyright (C) 2009, 2010, 2011, 2012 Jérôme Poisson (goffi@goffi.org) |
267 | 7 |
8 This program is free software: you can redistribute it and/or modify | |
480
2a072735e459
Licence modification: the full project is now under AGPL v3+ instead of GPL v3+
Goffi <goffi@goffi.org>
parents:
477
diff
changeset
|
9 it under the terms of the GNU Affero General Public License as published by |
267 | 10 the Free Software Foundation, either version 3 of the License, or |
11 (at your option) any later version. | |
12 | |
13 This program is distributed in the hope that it will be useful, | |
14 but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
480
2a072735e459
Licence modification: the full project is now under AGPL v3+ instead of GPL v3+
Goffi <goffi@goffi.org>
parents:
477
diff
changeset
|
16 GNU Affero General Public License for more details. |
267 | 17 |
480
2a072735e459
Licence modification: the full project is now under AGPL v3+ instead of GPL v3+
Goffi <goffi@goffi.org>
parents:
477
diff
changeset
|
18 You should have received a copy of the GNU Affero General Public License |
267 | 19 along with this program. If not, see <http://www.gnu.org/licenses/>. |
20 """ | |
21 | |
22 from bridge_frontend import BridgeFrontend | |
535
790be337cc41
bridge: fixed D-Bus warning in frontend side of bridge
Goffi <goffi@goffi.org>
parents:
480
diff
changeset
|
23 import dbus |
371
3ea41a199b36
bridge refactoring: categories are now core and plugin instead of communication and request
Goffi <goffi@goffi.org>
parents:
363
diff
changeset
|
24 from logging import debug, error |
267 | 25 |
535
790be337cc41
bridge: fixed D-Bus warning in frontend side of bridge
Goffi <goffi@goffi.org>
parents:
480
diff
changeset
|
26 from dbus.mainloop.glib import DBusGMainLoop |
790be337cc41
bridge: fixed D-Bus warning in frontend side of bridge
Goffi <goffi@goffi.org>
parents:
480
diff
changeset
|
27 DBusGMainLoop(set_as_default=True) |
790be337cc41
bridge: fixed D-Bus warning in frontend side of bridge
Goffi <goffi@goffi.org>
parents:
480
diff
changeset
|
28 |
359
eb9d33ba4e36
bridge: templates' constants can now be overrided
Goffi <goffi@goffi.org>
parents:
337
diff
changeset
|
29 const_INT_PREFIX = "org.goffi.SAT" #Interface prefix |
419
6c167a2e04b8
bridge: added generic D-Bus exception management + asyncCreateProfile method
Goffi <goffi@goffi.org>
parents:
405
diff
changeset
|
30 const_ERROR_PREFIX = const_INT_PREFIX+".error" |
359
eb9d33ba4e36
bridge: templates' constants can now be overrided
Goffi <goffi@goffi.org>
parents:
337
diff
changeset
|
31 const_OBJ_PATH = '/org/goffi/SAT/bridge' |
371
3ea41a199b36
bridge refactoring: categories are now core and plugin instead of communication and request
Goffi <goffi@goffi.org>
parents:
363
diff
changeset
|
32 const_CORE_SUFFIX = ".core" |
3ea41a199b36
bridge refactoring: categories are now core and plugin instead of communication and request
Goffi <goffi@goffi.org>
parents:
363
diff
changeset
|
33 const_PLUGIN_SUFFIX = ".plugin" |
359
eb9d33ba4e36
bridge: templates' constants can now be overrided
Goffi <goffi@goffi.org>
parents:
337
diff
changeset
|
34 |
267 | 35 class BridgeExceptionNoService(Exception): |
36 pass | |
37 | |
38 class DBusBridgeFrontend(BridgeFrontend): | |
39 def __init__(self): | |
40 try: | |
41 self.sessions_bus = dbus.SessionBus() | |
359
eb9d33ba4e36
bridge: templates' constants can now be overrided
Goffi <goffi@goffi.org>
parents:
337
diff
changeset
|
42 self.db_object = self.sessions_bus.get_object(const_INT_PREFIX, |
eb9d33ba4e36
bridge: templates' constants can now be overrided
Goffi <goffi@goffi.org>
parents:
337
diff
changeset
|
43 const_OBJ_PATH) |
371
3ea41a199b36
bridge refactoring: categories are now core and plugin instead of communication and request
Goffi <goffi@goffi.org>
parents:
363
diff
changeset
|
44 self.db_core_iface = dbus.Interface(self.db_object, |
3ea41a199b36
bridge refactoring: categories are now core and plugin instead of communication and request
Goffi <goffi@goffi.org>
parents:
363
diff
changeset
|
45 dbus_interface=const_INT_PREFIX + const_CORE_SUFFIX) |
3ea41a199b36
bridge refactoring: categories are now core and plugin instead of communication and request
Goffi <goffi@goffi.org>
parents:
363
diff
changeset
|
46 self.db_plugin_iface = dbus.Interface(self.db_object, |
3ea41a199b36
bridge refactoring: categories are now core and plugin instead of communication and request
Goffi <goffi@goffi.org>
parents:
363
diff
changeset
|
47 dbus_interface=const_INT_PREFIX + const_PLUGIN_SUFFIX) |
267 | 48 except dbus.exceptions.DBusException,e: |
49 if e._dbus_error_name=='org.freedesktop.DBus.Error.ServiceUnknown': | |
50 raise BridgeExceptionNoService | |
51 else: | |
52 raise e | |
371
3ea41a199b36
bridge refactoring: categories are now core and plugin instead of communication and request
Goffi <goffi@goffi.org>
parents:
363
diff
changeset
|
53 #props = self.db_core_iface.getProperties() |
267 | 54 |
371
3ea41a199b36
bridge refactoring: categories are now core and plugin instead of communication and request
Goffi <goffi@goffi.org>
parents:
363
diff
changeset
|
55 def register(self, functionName, handler, iface="core"): |
3ea41a199b36
bridge refactoring: categories are now core and plugin instead of communication and request
Goffi <goffi@goffi.org>
parents:
363
diff
changeset
|
56 if iface == "core": |
3ea41a199b36
bridge refactoring: categories are now core and plugin instead of communication and request
Goffi <goffi@goffi.org>
parents:
363
diff
changeset
|
57 self.db_core_iface.connect_to_signal(functionName, handler) |
3ea41a199b36
bridge refactoring: categories are now core and plugin instead of communication and request
Goffi <goffi@goffi.org>
parents:
363
diff
changeset
|
58 elif iface == "plugin": |
3ea41a199b36
bridge refactoring: categories are now core and plugin instead of communication and request
Goffi <goffi@goffi.org>
parents:
363
diff
changeset
|
59 self.db_plugin_iface.connect_to_signal(functionName, handler) |
3ea41a199b36
bridge refactoring: categories are now core and plugin instead of communication and request
Goffi <goffi@goffi.org>
parents:
363
diff
changeset
|
60 else: |
3ea41a199b36
bridge refactoring: categories are now core and plugin instead of communication and request
Goffi <goffi@goffi.org>
parents:
363
diff
changeset
|
61 error(_('Unknown interface')) |
267 | 62 |
63 ##METHODS_PART## | |
64 | |
65 #methods from plugins | |
449
961543b20806
bridge: removed default profile_key in dbus_frontend_template to avoid difficult to find bugs
Goffi <goffi@goffi.org>
parents:
435
diff
changeset
|
66 def getRoomsJoined(self, profile_key): |
405
10b4f577d0c0
MUC update to follow wokkel's MUC branch update
Goffi <goffi@goffi.org>
parents:
401
diff
changeset
|
67 return self.db_plugin_iface.getRoomsJoined(profile_key) |
267 | 68 |
469
db4c2b82bab6
D-Bus bridge: fixed getRoomsSubjects call + fixed dynamic addition of methods + added getLastGroupBlogs method
Goffi <goffi@goffi.org>
parents:
459
diff
changeset
|
69 def getRoomsSubjects(self, profile_key): |
db4c2b82bab6
D-Bus bridge: fixed getRoomsSubjects call + fixed dynamic addition of methods + added getLastGroupBlogs method
Goffi <goffi@goffi.org>
parents:
459
diff
changeset
|
70 return self.db_plugin_iface.getRoomsSubjects(profile_key) |
267 | 71 |
449
961543b20806
bridge: removed default profile_key in dbus_frontend_template to avoid difficult to find bugs
Goffi <goffi@goffi.org>
parents:
435
diff
changeset
|
72 def joinMUC(self, room_jid, nick, options, profile_key): |
405
10b4f577d0c0
MUC update to follow wokkel's MUC branch update
Goffi <goffi@goffi.org>
parents:
401
diff
changeset
|
73 if options == None: |
10b4f577d0c0
MUC update to follow wokkel's MUC branch update
Goffi <goffi@goffi.org>
parents:
401
diff
changeset
|
74 options = [('', '')] #XXX: we have to do this awful hack because python dbus need to guess the signature |
10b4f577d0c0
MUC update to follow wokkel's MUC branch update
Goffi <goffi@goffi.org>
parents:
401
diff
changeset
|
75 return self.db_plugin_iface.joinMUC(room_jid, nick, options, profile_key) |
267 | 76 |
449
961543b20806
bridge: removed default profile_key in dbus_frontend_template to avoid difficult to find bugs
Goffi <goffi@goffi.org>
parents:
435
diff
changeset
|
77 def tarotGameLaunch(self, players, profile_key): |
371
3ea41a199b36
bridge refactoring: categories are now core and plugin instead of communication and request
Goffi <goffi@goffi.org>
parents:
363
diff
changeset
|
78 return self.db_plugin_iface.tarotGameLaunch(players, profile_key) |
320
5fc5e6a7e5c3
plugin Tarot: added a launch method to automatically create a new room, invite players and create the game
Goffi <goffi@goffi.org>
parents:
307
diff
changeset
|
79 |
449
961543b20806
bridge: removed default profile_key in dbus_frontend_template to avoid difficult to find bugs
Goffi <goffi@goffi.org>
parents:
435
diff
changeset
|
80 def tarotGameCreate(self, room_jid, players, profile_key): |
371
3ea41a199b36
bridge refactoring: categories are now core and plugin instead of communication and request
Goffi <goffi@goffi.org>
parents:
363
diff
changeset
|
81 return self.db_plugin_iface.tarotGameCreate(room_jid, players, profile_key) |
267 | 82 |
449
961543b20806
bridge: removed default profile_key in dbus_frontend_template to avoid difficult to find bugs
Goffi <goffi@goffi.org>
parents:
435
diff
changeset
|
83 def tarotGameReady(self, player, referee, profile_key): |
371
3ea41a199b36
bridge refactoring: categories are now core and plugin instead of communication and request
Goffi <goffi@goffi.org>
parents:
363
diff
changeset
|
84 return self.db_plugin_iface.tarotGameReady(player, referee, profile_key) |
267 | 85 |
449
961543b20806
bridge: removed default profile_key in dbus_frontend_template to avoid difficult to find bugs
Goffi <goffi@goffi.org>
parents:
435
diff
changeset
|
86 def tarotGameContratChoosed(self, player, referee, contrat, profile_key): |
371
3ea41a199b36
bridge refactoring: categories are now core and plugin instead of communication and request
Goffi <goffi@goffi.org>
parents:
363
diff
changeset
|
87 return self.db_plugin_iface.tarotGameContratChoosed(player, referee, contrat, profile_key) |
267 | 88 |
449
961543b20806
bridge: removed default profile_key in dbus_frontend_template to avoid difficult to find bugs
Goffi <goffi@goffi.org>
parents:
435
diff
changeset
|
89 def tarotGamePlayCards(self, player, referee, cards, profile_key): |
371
3ea41a199b36
bridge refactoring: categories are now core and plugin instead of communication and request
Goffi <goffi@goffi.org>
parents:
363
diff
changeset
|
90 return self.db_plugin_iface.tarotGamePlayCards(player, referee, cards, profile_key) |
267 | 91 |
449
961543b20806
bridge: removed default profile_key in dbus_frontend_template to avoid difficult to find bugs
Goffi <goffi@goffi.org>
parents:
435
diff
changeset
|
92 def quizGameLaunch(self, players, profile_key): |
371
3ea41a199b36
bridge refactoring: categories are now core and plugin instead of communication and request
Goffi <goffi@goffi.org>
parents:
363
diff
changeset
|
93 return self.db_plugin_iface.quizGameLaunch(players, profile_key) |
361 | 94 |
449
961543b20806
bridge: removed default profile_key in dbus_frontend_template to avoid difficult to find bugs
Goffi <goffi@goffi.org>
parents:
435
diff
changeset
|
95 def quizGameCreate(self, room_jid, players, profile_key): |
371
3ea41a199b36
bridge refactoring: categories are now core and plugin instead of communication and request
Goffi <goffi@goffi.org>
parents:
363
diff
changeset
|
96 return self.db_plugin_iface.quizGameCreate(room_jid, players, profile_key) |
361 | 97 |
449
961543b20806
bridge: removed default profile_key in dbus_frontend_template to avoid difficult to find bugs
Goffi <goffi@goffi.org>
parents:
435
diff
changeset
|
98 def quizGameReady(self, player, referee, profile_key): |
371
3ea41a199b36
bridge refactoring: categories are now core and plugin instead of communication and request
Goffi <goffi@goffi.org>
parents:
363
diff
changeset
|
99 return self.db_plugin_iface.quizGameReady(player, referee, profile_key) |
361 | 100 |
449
961543b20806
bridge: removed default profile_key in dbus_frontend_template to avoid difficult to find bugs
Goffi <goffi@goffi.org>
parents:
435
diff
changeset
|
101 def quizGameAnswer(self, player, referee, answer, profile_key): |
371
3ea41a199b36
bridge refactoring: categories are now core and plugin instead of communication and request
Goffi <goffi@goffi.org>
parents:
363
diff
changeset
|
102 return self.db_plugin_iface.quizGameAnswer(player, referee, answer, profile_key) |
363
54c77a56b22f
bridge: bridge_constuctor's frontend template update with quiz answer method
Goffi <goffi@goffi.org>
parents:
361
diff
changeset
|
103 |
450
afe9cfd2ddbb
plugins: radio collective first draft
Goffi <goffi@goffi.org>
parents:
449
diff
changeset
|
104 def radiocolLaunch(self, players, profile_key): |
afe9cfd2ddbb
plugins: radio collective first draft
Goffi <goffi@goffi.org>
parents:
449
diff
changeset
|
105 return self.db_plugin_iface.radiocolLaunch(players, profile_key) |
afe9cfd2ddbb
plugins: radio collective first draft
Goffi <goffi@goffi.org>
parents:
449
diff
changeset
|
106 |
afe9cfd2ddbb
plugins: radio collective first draft
Goffi <goffi@goffi.org>
parents:
449
diff
changeset
|
107 def radiocolCreate(self, room_jid, profile_key): |
afe9cfd2ddbb
plugins: radio collective first draft
Goffi <goffi@goffi.org>
parents:
449
diff
changeset
|
108 return self.db_plugin_iface.radiocolCreate(room_jid, profile_key) |
afe9cfd2ddbb
plugins: radio collective first draft
Goffi <goffi@goffi.org>
parents:
449
diff
changeset
|
109 |
455
72522263cbc9
plugin RadioCol: basic functionnality working approximately
Goffi <goffi@goffi.org>
parents:
450
diff
changeset
|
110 def radiocolSongAdded(self, room_jid, song_path, profile): |
72522263cbc9
plugin RadioCol: basic functionnality working approximately
Goffi <goffi@goffi.org>
parents:
450
diff
changeset
|
111 return self.db_plugin_iface.radiocolSongAdded(room_jid, song_path, profile) |
72522263cbc9
plugin RadioCol: basic functionnality working approximately
Goffi <goffi@goffi.org>
parents:
450
diff
changeset
|
112 |
449
961543b20806
bridge: removed default profile_key in dbus_frontend_template to avoid difficult to find bugs
Goffi <goffi@goffi.org>
parents:
435
diff
changeset
|
113 def sendFile(self, to, path, data, profile_key): |
387
e66d300c5d42
frontends, bridge: sendFile method signature change + jid parameters in bridge now use _jid suffix
Goffi <goffi@goffi.org>
parents:
371
diff
changeset
|
114 return self.db_plugin_iface.sendFile(to, path, data, profile_key) |
267 | 115 |
449
961543b20806
bridge: removed default profile_key in dbus_frontend_template to avoid difficult to find bugs
Goffi <goffi@goffi.org>
parents:
435
diff
changeset
|
116 def pipeOut(self, to, path, data, profile_key): |
401
b2caa2615c4c
jp roster name manegement + Pipe transfer
Goffi <goffi@goffi.org>
parents:
387
diff
changeset
|
117 return self.db_plugin_iface.pipeOut(to, path, data, profile_key) |
b2caa2615c4c
jp roster name manegement + Pipe transfer
Goffi <goffi@goffi.org>
parents:
387
diff
changeset
|
118 |
449
961543b20806
bridge: removed default profile_key in dbus_frontend_template to avoid difficult to find bugs
Goffi <goffi@goffi.org>
parents:
435
diff
changeset
|
119 def findGateways(self, target, profile_key): |
371
3ea41a199b36
bridge refactoring: categories are now core and plugin instead of communication and request
Goffi <goffi@goffi.org>
parents:
363
diff
changeset
|
120 return self.db_plugin_iface.findGateways(target, profile_key) |
267 | 121 |
449
961543b20806
bridge: removed default profile_key in dbus_frontend_template to avoid difficult to find bugs
Goffi <goffi@goffi.org>
parents:
435
diff
changeset
|
122 def getCard(self, target, profile_key): |
371
3ea41a199b36
bridge refactoring: categories are now core and plugin instead of communication and request
Goffi <goffi@goffi.org>
parents:
363
diff
changeset
|
123 return self.db_plugin_iface.getCard(target, profile_key) |
267 | 124 |
449
961543b20806
bridge: removed default profile_key in dbus_frontend_template to avoid difficult to find bugs
Goffi <goffi@goffi.org>
parents:
435
diff
changeset
|
125 def getCardCache(self, target, profile_key): |
435
c243f4cb2ad9
plugin XEP-0054: cache now use storage
Goffi <goffi@goffi.org>
parents:
419
diff
changeset
|
126 return self.db_plugin_iface.getCardCache(target, profile_key) |
267 | 127 |
128 def getAvatarFile(self, hash): | |
371
3ea41a199b36
bridge refactoring: categories are now core and plugin instead of communication and request
Goffi <goffi@goffi.org>
parents:
363
diff
changeset
|
129 return self.db_plugin_iface.getAvatarFile(hash) |
267 | 130 |
449
961543b20806
bridge: removed default profile_key in dbus_frontend_template to avoid difficult to find bugs
Goffi <goffi@goffi.org>
parents:
435
diff
changeset
|
131 def in_band_register(self, target, profile_key): |
371
3ea41a199b36
bridge refactoring: categories are now core and plugin instead of communication and request
Goffi <goffi@goffi.org>
parents:
363
diff
changeset
|
132 return self.db_plugin_iface.in_band_register(target, profile_key) |
267 | 133 |
449
961543b20806
bridge: removed default profile_key in dbus_frontend_template to avoid difficult to find bugs
Goffi <goffi@goffi.org>
parents:
435
diff
changeset
|
134 def gatewayRegister(self, action, target, data, profile_key): |
267 | 135 if data == None: |
136 data = [('', '')] #XXX: we have to do this awful hack because python dbus need to guess the signature | |
371
3ea41a199b36
bridge refactoring: categories are now core and plugin instead of communication and request
Goffi <goffi@goffi.org>
parents:
363
diff
changeset
|
137 return self.db_plugin_iface.gatewayRegister(action, target, data, profile_key) |
267 | 138 |
449
961543b20806
bridge: removed default profile_key in dbus_frontend_template to avoid difficult to find bugs
Goffi <goffi@goffi.org>
parents:
435
diff
changeset
|
139 def getLastMicroblogs(self, jid, max_items, profile_key, callback=None, errback=None): |
371
3ea41a199b36
bridge refactoring: categories are now core and plugin instead of communication and request
Goffi <goffi@goffi.org>
parents:
363
diff
changeset
|
140 return self.db_plugin_iface.getLastMicroblogs(jid, max_items, profile_key, reply_handler=callback, error_handler=errback) |
267 | 141 |
471 | 142 def sendGroupBlog(self, access_type, access_list, message, profile_key='@DEFAULT@'): |
143 return self.db_plugin_iface.sendGroupBlog(access_type, access_list, message, profile_key) | |
307 | 144 |
469
db4c2b82bab6
D-Bus bridge: fixed getRoomsSubjects call + fixed dynamic addition of methods + added getLastGroupBlogs method
Goffi <goffi@goffi.org>
parents:
459
diff
changeset
|
145 def getLastGroupBlogs(self, jid, max_items, profile_key, callback=None, errback=None): |
db4c2b82bab6
D-Bus bridge: fixed getRoomsSubjects call + fixed dynamic addition of methods + added getLastGroupBlogs method
Goffi <goffi@goffi.org>
parents:
459
diff
changeset
|
146 return self.db_plugin_iface.getLastGroupBlogs(jid, max_items, profile_key, reply_handler=callback, error_handler=errback) |
db4c2b82bab6
D-Bus bridge: fixed getRoomsSubjects call + fixed dynamic addition of methods + added getLastGroupBlogs method
Goffi <goffi@goffi.org>
parents:
459
diff
changeset
|
147 |
470
5c916b99d0f6
plugin groupblog, D-Bus frontend: added getLastGroupBlogs and getMassiveLastGroupBlogs
Goffi <goffi@goffi.org>
parents:
469
diff
changeset
|
148 def getMassiveLastGroupBlogs(self, publishers_type, publishers, max_items=10, profile_key='@DEFAULT@', callback=None, errback=None): |
5c916b99d0f6
plugin groupblog, D-Bus frontend: added getLastGroupBlogs and getMassiveLastGroupBlogs
Goffi <goffi@goffi.org>
parents:
469
diff
changeset
|
149 return self.db_plugin_iface.getMassiveLastGroupBlogs(publishers_type, publishers, max_items, profile_key, reply_handler=callback, error_handler=errback) |
5c916b99d0f6
plugin groupblog, D-Bus frontend: added getLastGroupBlogs and getMassiveLastGroupBlogs
Goffi <goffi@goffi.org>
parents:
469
diff
changeset
|
150 |
477
031b0e0aaab8
plugin groupblog: subscriptions/notifications
Goffi <goffi@goffi.org>
parents:
471
diff
changeset
|
151 def subscribeGroupBlog(self, jid, profile_key='@DEFAULT@', callback=None, errback=None): |
031b0e0aaab8
plugin groupblog: subscriptions/notifications
Goffi <goffi@goffi.org>
parents:
471
diff
changeset
|
152 return self.db_plugin_iface.subscribeGroupBlog(jid, profile_key, reply_handler=callback, error_handler=errback) |
031b0e0aaab8
plugin groupblog: subscriptions/notifications
Goffi <goffi@goffi.org>
parents:
471
diff
changeset
|
153 |
031b0e0aaab8
plugin groupblog: subscriptions/notifications
Goffi <goffi@goffi.org>
parents:
471
diff
changeset
|
154 def massiveSubscribeGroupBlogs(self, publishers_type, publishers, profile_key='@DEFAULT@', callback=None, errback=None): |
031b0e0aaab8
plugin groupblog: subscriptions/notifications
Goffi <goffi@goffi.org>
parents:
471
diff
changeset
|
155 return self.db_plugin_iface.massiveSubscribeGroupBlogs(publishers_type, publishers, profile_key, reply_handler=callback, error_handler=errback) |
031b0e0aaab8
plugin groupblog: subscriptions/notifications
Goffi <goffi@goffi.org>
parents:
471
diff
changeset
|
156 |
449
961543b20806
bridge: removed default profile_key in dbus_frontend_template to avoid difficult to find bugs
Goffi <goffi@goffi.org>
parents:
435
diff
changeset
|
157 def sendPersonalEvent(self, event_type, data, profile_key): |
371
3ea41a199b36
bridge refactoring: categories are now core and plugin instead of communication and request
Goffi <goffi@goffi.org>
parents:
363
diff
changeset
|
158 return self.db_plugin_iface.sendPersonalEvent(event_type, data, profile_key) |
337
4402ac630712
bridge: async callback managed in bridge_constructor + misc
Goffi <goffi@goffi.org>
parents:
320
diff
changeset
|
159 |
4402ac630712
bridge: async callback managed in bridge_constructor + misc
Goffi <goffi@goffi.org>
parents:
320
diff
changeset
|
160 def setMicroblogAccess(self, access="presence", profile_key='@DEFAULT@', callback=None, errback=None): |
371
3ea41a199b36
bridge refactoring: categories are now core and plugin instead of communication and request
Goffi <goffi@goffi.org>
parents:
363
diff
changeset
|
161 return self.db_plugin_iface.setMicroblogAccess(access, profile_key, reply_handler=callback, error_handler=errback) |
304 | 162 |