Commit graph libervia-backend/src/bridge
Author SHA1 Message Date
souliane
bba25dd62d bridge: DBusException also transports the twisted failure condition 2014-06-15 16:06:02 +02:00
Goffi
8867ac6c60 bridge (D-Bus): frontend side now use a 120 s timeout for async calls 2014-06-15 00:18:28 +02:00
souliane
b9106c65d6 bridge: async failures are more detailed (full class name + error message) 2014-06-07 15:20:39 +02:00
souliane
244a33d2c7 core (xmpp), stdui (profile_manager), bridge, frontends: raise an exception if the XMPP connection failed instead of sending a signal 2014-05-23 09:59:35 +02:00
souliane
f719875f0b core, frontends: remove bridge method "connect" (always use asyncConnect) 2014-05-23 10:40:54 +02:00
souliane
dd597a2ead core, memory, bridge, plugin misc_register_account: move registerNewAccount to a new plugin:
- the bridge method has been removed, now a plugin takes care of it with XMLUI callback system
    - TODO: xmpp.RegisteringAuthenticator still needs to be fixed
2014-05-16 00:58:20 +02:00
souliane
0d28c03d27 core, memory, bridge: added profile password + password encryption:
/!\ This changeset updates the database version to 2 and modify the database content!

Description:
    - new parameter General / Password to store the profile password
    - profile password is initialized with XMPP password value, it is stored hashed
    - bridge methods asyncCreateProfile/asyncConnect takes a new argument "password" (default = "")
    - bridge method asyncConnect returns a boolean (True = connection already established, False = connection initiated)
    - profile password is checked before initializing the XMPP connection

    - new private individual parameter to store the personal encryption key of each profile
    - personal key is randomly generated and encrypted with the profile password
    - personal key is decrypted after profile authentification and stored in a Sessions instance
    - personal key is used to encrypt/decrypt other passwords when they need to be retrieved/modified

    - modifying the profile password re-encrypt the personal key
    - Memory.setParam now returns a Deferred (the bridge method "setParam" is unchanged)
    - Memory.asyncGetParamA eventually decrypts the password, Memory.getParamA would fail on a password parameter

TODO:
    - if profile authentication is OK but XMPP authentication is KO, prompt the user for another XMPP password
    - fix the method "registerNewAccount" (and move it to a plugin)
    - remove bridge method "connect", sole "asyncConnect" should be used
2014-05-07 16:02:23 +02:00
Goffi
a2f1522efd bridge (constructor): fixed D-Bus frontend generator for async method without sig_in + fixed --debug option + regenerated bridge to fix bad frontend D-Bus bridge. 2014-05-15 16:35:28 +02:00
Goffi
f0b2c7dea3 core: added a getReady method which can be called by frontends to ensure that backend is fully initialised before doing anything + this ckeck is automatically done in asyncConnect 2014-05-15 16:02:16 +02:00
souliane
1eeddf5900 better PEP-8 compliance 2014-05-07 15:44:31 +02:00
souliane
2e6420fb49 memory, jp: added jp commands to load/save parameters template 2014-05-04 18:43:54 +02:00
Goffi
501bc92528 core: use of the new core.log module:
/!\ this is a massive refactoring and was largely automated, it probably did bring some bugs /!\
2014-04-19 19:19:19 +02:00
Goffi
e95d04b69e core (disco): added discoInfos and discoItems bridge methods 2014-04-01 21:14:57 +02:00
Goffi
382d49a628 core (memory): entities cache improvments:
- entities cache is no more limited to bare jid
    - resources are now automatically updated in bare jid cache
2014-03-28 18:07:17 +01:00
souliane
c5e3da853c bridge: remove unecessary signals/methods declarations 2014-03-21 09:09:51 +01:00
souliane
bc9efbda82 bridge, frontends: display presence with the highest priority + reset your own presence when you (dis)connect 2014-03-20 21:18:18 +01:00
souliane
d158589881 core, frontends: add method asyncDeleteProfile, remove synchronous methods createProfile and deleteProfile 2014-03-03 09:59:10 +01:00
Goffi
2ca6efd8cc dates update 2014-02-04 18:32:49 +01:00
souliane
409bbccebe memory: fixed wrong information in the docstrings for security_limit 2014-01-04 21:12:49 +01:00
souliane
4a0d8be8ec core, bridge: new method paramsRegisterApp to register frontend's specific parameters 2013-12-27 13:28:26 +01:00
Goffi
b7bf434cd2 core: dynamics menus refactoring:
- menu now use generic callback system, with extra data
    - asyncMenuCall is removed in favor of launchAction
    - menu_id (== callback_id) is used to identify menu instead of category/name/type tuple
    - i18n is managed throught deferred translation, and returned with _i18n suffix
        e.g.: menu (D_('File'), D_('Open')): (u'File', u'Open') is menu_path, (u'Fichier', u'Ouvrir') is french menu_path_i18n.
    - type actually can have the following values:
        - NORMAL: classical menu
        - JID_CONTEXT: contextual menu, used with any jid
        - ROSTER_JID_CONTEXT: like JID_CONTEXT, but restricted to jids in roster.
        - ROSTER_GROUP_CONTEXT: contextual menu, use with groups
    - security_limit is used, in the same way as for parameters
    - when using importMenu, callback can be an actual callback, or one already registered with registerCallback
2013-12-29 17:10:14 +01:00
Goffi
5a00dc9503 core: i18n refactoring:
- _() is no more installed in __builtin__
    - instead, there is a new sat.core.i18n module
    - added D_() method for deferred translation
    - languageSwitch method allow to dynamically change translation language
    - import gettext is tested against ImportError, and dummy methods are used when not available (mainly useful for Libervia)
2013-12-29 17:06:01 +01:00
Goffi
069a250b04 backend, frontends: callbacks refactoring:
- launchAction is now async, and return a dictionary for its result
    - no more action_id, actionResult* are deprecated
    - callback system is about to be unified
2013-12-24 15:19:08 +01:00
Goffi
71c1def32a core, frontends: callMenu is now async and don't use callback_id anymore 2013-12-24 15:18:31 +01:00
Goffi
bc776be0f2 core,bridge: sendMessage bridge method is now async 2013-12-17 01:46:45 +01:00
Goffi
b6aaecc5c2 core, bridge: better GenericException handling 2013-12-17 00:56:39 +01:00
souliane
5c39b346a8 bridge (constructor): added categories for the mediawiki export 2013-11-25 13:32:21 +01:00
Goffi
be66155439 bridge: fixed bridge_constructor 2013-12-01 17:28:30 +01:00
souliane
e10b53470d bridge: removed plugin method definitions from the old static system 2013-11-17 16:11:55 +01:00
Goffi
9d42c269db core: sendMessage's options parameter has been renamed to extra to be consistent with newMessage 2013-11-13 13:58:10 +01:00
Goffi
8624c3c547 core, bridge: extra parameter is saved in history:
- added extra data in getHistory return value
    - extra data is saved in database
    /!\ WARNING: DATABASE SCHEMA HAS CHANGED /!\
to update sqlite database: ALTER TABLE history ADD COLUMN extra BLOB;
2013-11-07 15:29:39 +01:00
souliane
6f58566118 bridge, memory: added the parameter security_limit to asyncGetParamA so it can be used from libervia. refactorization in memory.py are related to that. 2013-10-02 20:25:19 +02:00
Goffi
2fde64ea3b bridge: doc fix for newContact 2013-09-29 16:29:57 +02:00
souliane
2bf3694fd0 core: added the security_limit to setParam
- params with a security greater than security_limit can not be modified
- special value: security_limit < 0 disable the check (all params can be modified)
2013-09-07 02:03:17 +02:00
souliane
9cb7071e89 plugin XEP-0085: Chat State Notifications
- new "options" parameter to send chat states
    - plugin command export: messages without body are now delivered (since all the chat states other than "active" need them)
2013-09-05 20:48:47 +02:00
souliane
7652fd3a15 core: security attribute added to the parameters
- getParams, getParamsUI and getParamsForCategory have a security_limit parameter to filter
- parameters with security = 0 can be retrieved/modified from Libervia
2013-09-05 20:28:44 +02:00
Goffi
8e2f394b5b core, bridge, jp, quick_frontend: SàT stop more gracefully if bridge can't be initialised:
- new BridgeInitError and BridgeExceptionNoService are in core.exceptions
    - D-Bus NotSupported is catched in bridge, and launch a BridgeInitError
    - BridgeInitError stop SàT core, jp, and quick_frontends with an explanation message.
fix bug 27
2013-06-21 02:00:37 +02:00
Goffi
919ee9526d misc: fixed bridge_constructor.py typo 2013-03-24 15:41:30 +01:00
Goffi
1cd98e8dea fixed licences in docstrings (they are now in comments) 2013-03-08 00:36:22 +01:00
Emmanuel Gil Peyrot
60f648fdf4 Fix pep8 support in src/bridge. 2013-01-18 17:55:35 +01:00
Emmanuel Gil Peyrot
88074cd284 Remove every old-style class. 2013-01-18 17:55:35 +01:00
Emmanuel Gil Peyrot
27b3592e16 Remove trailing whitespaces. 2013-01-18 17:55:34 +01:00
Goffi
def79e44cd dates update 2013-01-07 23:30:13 +01:00
Goffi
d3f91b62e9 bridge: generic plugin methods handling for frontend side in D-Bus Bridge \o/ 2013-01-07 01:01:10 +01:00
Goffi
181d08f2e4 core, plugin XEP-0054: avatar upload:
- plugin XEP-0054: new setAvatar bridge method
    - new "presence_available" trigger
    - new DataError
2012-12-28 01:00:31 +01:00
Goffi
75bb00a0d4 core, bridge: waiting confirmation management (new getWaitingConf method) 2012-11-14 20:24:28 +01:00
Goffi
fa38394401 core, frontends, bridgen plugins: fixed methods which were unproperly managing multi-profiles
- added profile argument to askConfirmation, actionResult, actionResultExt, entityDataUpdated, confirmationAnswer, getProgress
    - core, frontends: fixed calls/signals according to new bridge API
    - user of proper profile namespace for progression indicators and dialogs
    - memory: getParam* now return bool when param type is bool
    - memory: added getStringParam* to return string instead of typed value
    - core, memory, storage, quick_frontend: getHistory now manage properly multi-profiles
    - plugins XEP-0047, XEP-0054, XEP-0065, XEP-0077, XEP-0096; multi-profiles proper handling
2012-11-10 16:38:16 +01:00
Goffi
20815b3ec5 bridge: fixed D-Bus warning in frontend side of bridge 2012-11-01 19:52:59 +01:00
Goffi
65103362a6 core, quick_frontend, primitivus, wixi, bridge: fixed delayed message timestamp:
- new "extra" parameter in newMessage signal
2012-10-20 17:23:56 +02:00
Goffi
fef2b1a620 core, bridge, quick_frontend: MUC private messages history management:
- history now store message type
    - sqlite3 storage: fixed resource management in getHistory
    - bridge: added message type in getHistory return value
    - quick_chats: (ugly) hacks to manage private history filtering/nickname printing
2012-10-17 00:35:48 +02:00