Commit graph libervia-backend/sat/core/sat_main.py
Author SHA1 Message Date
Goffi
ad40509c89 core: return full jid in bridge's getContacts:
getContacts was returning only bare jid of entities, but jids with resources may be present in roster, so this behaviour has been changed.
2019-06-30 15:43:57 +02:00
Goffi
553ebe5ab8 core: added getNamespace method to retrieve a namespace from short name. 2019-04-14 08:21:51 +02:00
Goffi
f51e924eb6 core: added a rosterResync method to bridge:
rosterResync do a full resynchronisation of roster with server. This should not be needed, but may be useful if user suspect a sync issue for whatever reason.
2019-04-07 18:49:41 +02:00
Goffi
c2c7dbddfe core (xmpp): new networkEnabled() and networkDisabled() methods:
those methods can be called by platform specific plugins when network is known to be (un)available. This way, connection attempts can be cancelled when no network is available, saving resources (notably battery on mobile devices), or attempts can be restarted immediately when network is known to be available again.
2019-04-06 19:05:57 +02:00
Goffi
1a958d8744 core: minor style improvments 2019-03-27 21:15:25 +01:00
Goffi
d8f6620d00 core: added a base menu allowing to set encryption session or show the trust management UI. 2019-02-24 14:11:08 +01:00
Goffi
51cd3ce52a core (findByFeatures): fixed services discovery 2019-01-20 18:20:55 +01:00
Goffi
8e338bf913 date update 2019-01-12 12:25:31 +01:00
Goffi
c5a17cc9ef core: findByFeatures speed improvments:
- DeferredList are used instead of waiting for each disco individually
- a Timeout of 10 s is set for jids, to avoid waiting for minutes when some entity is unreachable (which leads to terrible user experience while waiting for a discovery page)
2019-01-11 19:44:46 +01:00
Goffi
7a9ee35cfc misc: replaced all "dummy" by the more conventional and readable "__" ("_" being used for gettext) 2019-01-11 11:13:15 +01:00
Goffi
24468a9138 core (memory/encryption): new encryptionNamespaceGet and encryptionTrustUIGet methods:
- encryptionNamespaceGet retrieves algorithm namespace from its short name
- encryptionTrustUIGet retrieves trust mangement XMLUI from encryption plugin
- new markAsUntrusted internal helper method, to add untrusted flag to message data
2019-01-02 18:22:30 +01:00
Goffi
05b59775d0 plugin XEP-0198: Stream Management implementation:
- hooks can now be set in stream onElement and send methods
- xmllog refactored to use new hooks
- client.isConnected now uses transport.connected method
- fixed reconnection, SàT will now try to reconnect indefinitely until it success, unresolvable failure happen (e.g. invalid certificate), or explicit disconnection is requested (or a plugin change this behaviour)
- new triggers: "stream_hooks", "disconnecting", "disconnected", and "xml_init" (replace "XML Initialized")
2018-11-18 15:49:46 +01:00
Goffi
3a07122da9 plugin XEP-0199: implementation of XMPP Ping 2018-11-10 10:16:38 +01:00
Goffi
d590de6373 core (xmpp): added missing disco#info namespace to disco info result. 2018-11-10 10:16:38 +01:00
Goffi
1b8345f4af core (xmpp): server certificate validation:
XMPP server certificate is now checked, and connection is refused (by default) if it's not valid.
Certificate check can be disabled in the new parameter "Configuration/check_certificate".
If certificate checking is disabled, a warning note is sent on every new connection.
Twisted and Wokkel are temporarly monkey patched in sat.core.tls_patches module, until modifications are merged upstream.
2018-11-10 10:16:35 +01:00
Goffi
8792a16337 core: findByFeatures fixes 2018-08-31 15:29:25 +02:00
Goffi
e4bda681b8 core (memore/encryption): new methods and checks:
Following methods are now available though bridge:
    - messageEncryptionStop
    - messageEncryptionGet: retrieve encryption data for a message session
    - encryptionPluginsGet: retrieve all registered encryption plugin

Following methods are available for internal use:
    - getPlugins: retrieve registerd plugins
    - getNSFromName: retrieve namespace from plugin name
    - getBridgeData: serialise session data (to be used with bridge)
    - markAsEncrypted: mark message data as encrypted (to be set by encryption plugin in MessageReceived trigger)

Behaviours improvments:
    - start and stop send messageEncryptionStarted and messageEncryptionStopped signals, and a message feedback
    - new "replace" arguments in start allows to replace a plugin if one is already running (instead of raising a ConflictError)
    - plugins declare themselves as "directed" (i.e. working with only one device at a time) or not.
      This is checked while dealing with jids, an exception is raised when a full jid is received for a non directed encryption.
    - use of new data_format (de)serialise
2018-08-11 18:24:55 +02:00
Goffi
32b4db60c9 core: new EncryptionHandler class which manage encrypted session as a core feature:
Plugin handling encryption can now register using host.registerEncryptionPlugin, and an encryption session can now be started using messageEncryptionStart bridge method.

This will make encryption handling more easy, as we now know if a session is clear or e2e encrypted, and which plugin handle it.
2018-07-29 19:22:56 +02:00
Goffi
68014352a0 core: added async TriggerManager
Async trigger manager add an asyncPoint method which can be used with Deferred (or sync method).
This allow a triggers do to some long operations like doing network requests.

MessageReceived and sendMessageData now use asyncPoint.
2018-07-29 19:22:51 +02:00
Goffi
ff79fa3ce0 core: style improvments (90 chars limit) 2018-07-29 18:44:27 +02:00
Goffi
744cb0c503 code style reformatting using black 2018-06-27 20:14:46 +02:00
Goffi
4d4d594c60 core: discoFindByFeatures now return only available resources 2018-05-25 10:52:01 +02:00
Goffi
b0a63edd9c core: added local_device argument to discoFindByFeatures 2018-05-25 10:52:01 +02:00
Goffi
80ef13612b core, setup: huge cleaning:
- moved directories from src and frontends/src to sat and sat_frontends, which is the recommanded naming convention
- move twisted directory to root
- removed all hacks from setup.py, and added missing dependencies, it is now clean
- use https URL for website in setup.py
- removed "Environment :: X11 Applications :: GTK", as wix is deprecated and removed
- renamed sat.sh to sat and fixed its installation
- added python_requires to specify Python version needed
- replaced glib2reactor which use deprecated code by gtk3reactor

sat can now be installed directly from virtualenv without using --system-site-packages anymore \o/
2018-04-02 19:44:50 +02:00
Renamed from src/core/sat_main.py (Browse further)