Commit graph libervia-backend/src/memory
Author SHA1 Message Date
Goffi
8ce5c1862b core, frontends: refactoring to base Libervia on QuickFrontend (big mixed commit):
/!\ not finished, everything is still instable !
    - bridge: DBus bridge has been modified to allow blocking call to be called in the same way as asynchronous calls
    - bridge: calls with a callback and no errback are now possible, default errback log the error
    - constants: removed hack to manage presence without OrderedDict, as an OrderedDict like class has been implemented in Libervia
    - core: getLastResource has been removed and replaced by getMainResource (there is a global better management of resources)
    - various style improvments: use of constants when possible, fixed variable overlaps, import of module instead of direct class import
    - frontends: printInfo and printMessage methods in (Quick)Chat are more generic (use of extra instead of timestamp)
    - frontends: bridge creation and option parsing (command line arguments) are now specified by the frontend in QuickApp __init__
    - frontends: ProfileManager manage a more complete plug sequence (some stuff formerly manage in contact_list have moved to ProfileManager)
    - quick_frontend (quick_widgets): QuickWidgetsManager is now iterable (all widgets are then returned), or can return an iterator on a specific class (return all widgets of this class) with getWidgets
    - frontends: tools.jid can now be used in Pyjamas, with some care
    - frontends (XMLUI): profile is now managed
    - core (memory): big improvment on entities cache management (and specially resource management)
    - core (params/exceptions): added PermissionError
    - various fixes and improvments, check diff for more details
2015-01-24 01:00:29 +01:00
Goffi
05e5e1448b core: misc improvments:
- added some constants for message types and presence
    - removed profile authentification specific methods in favor of a more generic "validated" key
2014-12-10 18:36:11 +01:00
souliane
0da2c0228f memory: fixes issue in a test 2014-10-22 18:58:29 +02:00
souliane
92cb3c0503 memory: add method isContactConnected 2014-10-20 16:38:49 +02:00
souliane
e018212fb4 memory: temporary dirty hack to fix the personnal key issue after the auth session expired 2014-10-19 15:07:16 +02:00
souliane
2f6b8ae771 memory: don't save last resource in entity data for the MUC jids 2014-10-17 20:26:01 +02:00
souliane
1f602f33cb memory (params): set "Show empty groups" to True by default 2014-10-16 17:02:44 +02:00
Goffi
6b20989ecc core: better management of default value in getConfig 2014-10-07 17:12:41 +02:00
souliane
136395eb6d memory (params): add parameters "Show offline contacts" and "Show empty groups" 2014-10-06 11:20:43 +02:00
souliane
9378e1306a memory (params): use more generic param attribute "constraint" instead of "min" and "max" 2014-10-06 11:18:37 +02:00
souliane
767f3d50dc bridge, memory: add "search" attribute to getHistory (filter the results with a unix globbing pattern) 2014-10-04 10:25:32 +02:00
souliane
4f339272b7 memory: add Parameter "Chat history limit" 2014-09-24 13:49:43 +02:00
souliane
4c61bf8fad memory: getHistory with limit=0 now returns an empty list, use limit=None to return all messages 2014-10-03 12:43:59 +02:00
souliane
ac59d061f4 memory (params), tools (xml_tools), plugins, frontends: add "int" parameter type with "min" and "max" attributes 2014-10-03 12:27:43 +02:00
souliane
7ee4fee48c memory (disco): add nodeIdentifier parameter to getItems 2014-09-22 20:34:29 +02:00
souliane
1388ff8fac memory: session timeout won't be reset on each access if the Sessions() is called with resettable_timeout=False 2014-09-22 19:24:07 +02:00
souliane
ef7035a3ca memory: profileSessions.profileGetUnique was not resetting the timer 2014-09-22 18:42:54 +02:00
souliane
ccaa5412c5 memory: handle the case where an existing session ID is re-used for creating a new session 2014-09-22 20:26:40 +02:00
souliane
830b6d8ef6 memory: Sessions.newSession can be called with a forced session ID 2014-09-21 13:10:55 +02:00
Matteo Cypriani
71e29f5c44 misc: fixed some typos 2014-09-15 14:18:25 +02:00
Goffi
85b3c92376 core (disco): added a timeout to get items 2014-09-08 21:23:21 +02:00
souliane
bb92c9fe74 memory (sqlite): fixes upgrade Deferred issue 2014-07-06 21:54:07 +02:00
souliane
8281c77c60 memory: fixes encoding issues during encryption 2014-07-06 21:13:47 +02:00
souliane
e0f8d09bf2 memory (memory): delete profile session on profile deletion 2014-06-27 20:05:31 +02:00
souliane
94d36a7d3e memory: add helper methods encryptValue and decryptValue 2014-06-25 19:01:00 +02:00
souliane
d4eff5b99c core, memory, plugins, stdui, frontends: look for DNS SRV records when server is not specified:
- fix bug 3
    - modify "Connection" params:
          - rename "Server" to "Force server" and "Port" to "Force port"
          - set the default value to empty string for both
2014-06-23 00:44:10 +02:00
souliane
4e2366a3d5 memory (sqlite): fixes upgrade to database v2 2014-06-12 15:56:41 +02:00
souliane
76413b3679 memory, tools (config): move special config retrieval from memory to tools 2014-06-09 20:40:13 +02:00
souliane
5f2b90e163 memory (params), test: fixes updateParams bug 2014-06-03 17:10:12 +02:00
souliane
900047c921 memory (params), test: fixes bug relative to parameter filtering 2014-06-03 15:10:51 +02:00
souliane
50503332d2 memory: synchronize the upgrade to database v2 to be sure libervia's profile password is read to be written in the config file before its encryption 2014-05-23 13:00:35 +02:00
souliane
90115df6f1 tools: add missing file src/tools/config.py 2014-05-23 10:03:33 +02:00
souliane
c68b147398 memory: auto-update configuration file with libervia's passphrase when migrating the database 2014-05-23 09:59:15 +02:00
souliane
ae45889d50 plugins misc_account, misc_register_account: manually delete the sessions when not needed anymore 2014-05-21 23:17:51 +02:00
souliane
ea05b4e0d6 memory (params): fixes bugs in setParam:
- symbol 'd' was accessed without having been initialized when setting the empty value to a password which is not the profile password
    - the method was actually returning without waiting for the parameter to be set
2014-05-21 21:14:40 +02:00
souliane
8eddcc4ec9 memory (params): fix parameters of type "list" to use the default option when no individual value is set 2014-05-20 09:34:02 +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
souliane
c9f4397000 memory: add class ProfileSessions based on Sessions 2014-05-10 17:37:32 +02:00
souliane
7a29fae242 memory, test: added module crypto to hash passwords and encrypt/decrypt passwords or blocks 2014-05-07 15:46:43 +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
ba103161d5 core (log): refactoring + twisted backend:
- configuration is now done with classes, so inheritance is possible
    - twisted backend now use twisted log methods
    - log not produced by SàT directly in twisted backend are captured by an observer (twistedObserver) and sent back to SàT logging chain, with the "twisted" logger.
    - \\default output use normal twistd output, except in debug mode where it add an stdout output in addition to the log file.
    - when log_colors = True, colors are enabled only where it's possible (tty out), when log_colors=force colors are always enabled.
    - fixed some bad log.xxx calls
2014-05-05 18:58:34 +02:00
souliane
4b8ba7a6f4 memory: fixes the method fixLocalDir for pid_dir and log_dir to use local_dir as default 2014-04-30 19:54:21 +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
3fc2e256f2 core (memory): added __iter__ to PersistentDict 2014-04-07 16:22:33 +02:00
Goffi
0368522356 core (disco): findFeaturesSet and findServiceEntities don't use inlineCallbacks anymore, that allow a better error management (no more anonying debugger raise when discoInfo fails in debug mode) 2014-04-02 12:31:23 +02:00
souliane
608e2ba9fa tools, frontends, memory: param definition and XMLUI handle multi-selection for list widgets:
- we need to update urwid_satext to revision 79
                          - no more "value" attribute value in the "list" element, use
                            HTML-style "select" attribute in the "option" elements instead
                          - /!\ param saving do not handle multiple values yet!
2014-04-01 21:21:13 +02:00
Goffi
e95d04b69e core (disco): added discoInfos and discoItems bridge methods 2014-04-01 21:14:57 +02:00