Commit graph

2,098 commits

Author SHA1 Message Date
Goffi
0a5fd6f3f4 primitivus, jp: dynamic bridge + fixed D-Bus bridge:
Primitivus and jp can now load the bridge specified in sat.conf, but they are only working with D-Bus so far (need to change all sync calls to async).
    Exit code 3 is used for Bridge init error.
2016-12-18 16:28:51 +01:00
Goffi
be8d681be7 quick_frontend(QuickApp): added onBridgeConnected method 2016-12-18 16:28:46 +01:00
Goffi
1b7290aa70 core (memory/disco): recover getItems on bridge's discoItems method if an item is empty 2016-12-18 16:28:44 +01:00
Goffi
ced2c16721 xep-0184: delivery receipts are now activated by default 2016-12-18 10:17:32 +01:00
Goffi
9a9ac75b20 xep-0070: fixed use of byte string instead of unicode 2016-12-18 10:16:47 +01:00
Goffi
5768160d2d frontends(xmlui): better handling of missing _xmluiAppend 2016-12-18 10:15:57 +01:00
Goffi
90440303ea bridbe(pb): Perspective Broker bridge, first draft 2016-12-13 22:27:49 +01:00
Goffi
34cec8fe14 bridge, quick_frontend: preparation for async bridge
bridge can currently have sync and async methods. This commit prepare the transition to fully async bridges:
    - a new bridgeConnect method must be called to prepare the bridge
    - quick app, quick profile manager: changed sync calls to async ones
    - quick app: bridgeConnect can be called automatically or manually depending on connect_bridge parameter of QuickApp
2016-12-13 22:27:48 +01:00
Goffi
58795c675c core(stdui/profile manager): fixed authentication cancellation 2016-12-04 21:35:23 +01:00
Goffi
2618d48e7b core, quick_frontends: android compatibility hacks:
a couple of hacks have been used so backend can be launched on android using kivy
    - config file (sat.conf) is been read on a specific dir, using a detection of Cagou domains in constants.py
    - fixed crash when using sys.stdout.isatty in log_config.py
    - Q&D fix for logging encoding issue on android
    - when android is detected, the path/pattern to load plugins is modified
    - SRV is not working at the moment on android. If the platform is detected, the host is used directly with default port. A hosts_dir configuration can be used in [android] section to map a specific ip to a host
    - getRepositoryData in tools/utils return constant string on android. Proper repository data need to be copied during package building.
    - [quick app] more robust failure handling on asyncConnect error
    - [quick chat] default to utf-8 when getlocale doesn't return the actual locale.
2016-12-04 18:16:48 +01:00
Goffi
9ce91cf534 core: bridge can now be changed in conf
by default DBus bridge is used, but this can be changed in sat.conf's DEFAULT section using "bridge" option.
    bridge can be "dbus" (or equivalent "dbus_bridge") or embedded at the moment.
    Bridge name used is saved in SAT.bridge_name, and load_bridge method can be used by frontends.
2016-12-04 18:16:37 +01:00
Goffi
6ad826bb0d bridge (constructor): embedded bridge generator:
"embedded" is used to have backend and frontend together in the same process (frontend call backend as a module).
2016-10-05 22:07:51 +02:00
Goffi
372f54ec2a bridge (D-Bus): bad design fixes:
- renamed outputed module to dbus_bridge (to avoid uppercase and conflict with dbus module)
    - class name is now Bridge for both frontend and core (make discovery/import more easy)
    - register renamed to register_method in core, and register_signal in frontend
2016-10-03 21:15:39 +02:00
Goffi
fc04d33fac bridge (constructor): refactoring:
- constructors are now in separate modules
    - constructors are discovered dynamically
    - factorised generation code from D-Bus in base Constructor.
    - A generic generation method is now available in base Constructor, using python formatting.
    - removed bridge/bridge.py in core as it was useless, may come back in the future if needed
2016-10-02 22:44:33 +02:00
Goffi
df1b19bd66 bridge(constructor): constructor now uses argparse instead of optparse 2016-10-02 15:56:20 +02:00
Goffi
001834b760 bridge(D-Bus): minotr argument name fix 2016-10-02 15:51:42 +02:00
Goffi
95f77b1df1 quick frontend(contact_list): avoid crash when resource in cache has not priority 2016-10-02 13:46:29 +02:00
Goffi
61a68ca0ca jp (message/send): message/send can now send XHTML (-x) or rich (-r) messages 2016-09-25 19:18:45 +02:00
Goffi
9bb6c74771 plugin XEP-0071: fixed rich and xhtml sending + add simple text body if not present 2016-09-25 19:17:38 +02:00
Goffi
3337750def core (tools/common): added getSubDict method in data_format to get sub dictionary from serialised one 2016-09-25 19:16:25 +02:00
Goffi
63b1c9af14 quick frontend (chat): added Message.main_message_xhtml property to get XHTML content 2016-09-25 16:07:44 +02:00
Goffi
b19c00773b frontends (tools): added a module to parse CSS colors 2016-09-25 15:41:43 +02:00
Goffi
320139c34e quick frontend (chat): update use a dict 2016-09-23 22:50:13 +02:00
Goffi
bb9e22c020 quick_frontend, primitivus (chat): renamed updated to update, using a dict as argument + fixed Primitivus group chat 2016-09-15 21:58:35 +02:00
Goffi
3aee03c381 jp (avatar): avatar get/set implementations, first draft 2016-09-13 22:19:47 +02:00
Goffi
fce13b52f8 jp (core): added EXIT_NOT_FOUND constant, which return 16 as exit code 2016-09-13 22:03:45 +02:00
Goffi
6395a46e87 plugin XEP-0054(XEP-0153): added a getAvatar:
getAvatar can be used to do the whole process to get avatar file (or empty string if not avatar is found) : it first look in cache and request vCard if nothing is found.
2016-09-13 22:02:52 +02:00
Goffi
44933e1a60 core (stdui): fixed cancellation of ContactList forms 2016-09-11 23:17:31 +02:00
Goffi
bd47ab8d3d quick frontend (menus): minor docstring fixes 2016-09-11 11:03:25 +02:00
Goffi
d4d4f6534b plugin XEP-0054(XEP-0153): ignore image formats other than gif, jpeg and png, and empty BINVAL 2016-09-10 18:03:24 +02:00
Goffi
6a007eb69a jp (debug/bridge/method,signal): fixed argument parsing 2016-09-10 11:43:32 +02:00
Goffi
78750cb265 quich frontend, primivius (chat): better avatar handling:
- new getAvatar method in QuickApp which request vCard if avatar if needed and return default avatar is no avatar is found
    - frontends based on quick frontend can now specify if they handle avatar or not using AVATARS_HANDLER
    - when avatar is updated, occupant widget(s) and all message widget(s) of the concerned entity are updated
2016-09-09 23:54:33 +02:00
Goffi
42167b6ae9 plugin XEP-0045, quick frontend (app,chat): various chat improvments:
- (XEP-0045): join defered is now fired when room is full joined and history is available
    - (XEP-0045): mucJOIN signature has changed, it now returns the same arguments as mucRoomJoined and a boolean which is True if the room was alread joined
    - quick frontend (app, chat): adapted code to new changes
2016-09-09 23:54:33 +02:00
Goffi
89cfefbacf quick frontend (contact list): better handling of cache with full jid:
- get_cache has a new argument "bare_default"
    - value of resource is returned if full jid is used. None is returned if not found and bare_default is False, bare jid value is returned if not found and bare_default is True
2016-09-09 23:54:33 +02:00
Goffi
4f26367e7a plugin XEP-0054: fix use of full jid for room occupants 2016-09-09 23:54:33 +02:00
Goffi
48871f96cc quick frontend (chat): recreateArgs implementation 2016-09-09 23:54:33 +02:00
Goffi
2808312c77 quick fronten (widgets): if a widget is recreated, "recreateArgs" method can be implemented to specify arguments to clone it correctly 2016-09-09 23:54:33 +02:00
Goffi
f992739212 quick frontend (contat list/cache): workaround for avatar issue in MUC. Need to be reworked properly in the future (TODO) 2016-09-09 23:54:33 +02:00
Goffi
b97038f281 plugin XEP-0054: renamed isInRoom to isRoom as the method only tell if the entity belong to a MUC 2016-09-09 23:54:33 +02:00
Goffi
1b01409238 quick app(app): call entityDataUpdateHandler on profile plug instead of setCache directly 2016-09-09 23:54:33 +02:00
Goffi
d80d9ae0d4 plugin XEP-0045: minor docstring fix 2016-09-09 23:54:32 +02:00
Goffi
619f892de0 quick frontend (chat): added helping properties avatar and contact_list 2016-08-29 01:21:47 +02:00
Goffi
948c569dfe quick frontend(QuickApp): added getDefaultAvatar method:
this method (not implemented in quick frontend) should facilitate handling of entities without avatar
2016-08-29 01:21:45 +02:00
Goffi
eb1dd1d177 plugin XEP-0245: removed plugin XEP-0245:
at the end it adds complications to handle XEP-0245 in backend (because edge cases must be handled: info type with group chat, history when message is info but for a group chat, etc) while it's trivial to handle it in frontend.
    So /me detection is handled in QuickFrontend and cmd_me is back into plugin_misc_text_commands, it is the choice of the frontend to display or not the "/me" (for frontends based on QuickFrontend it remains automatic).
2016-08-28 21:00:53 +02:00
Goffi
f378675f78 bridge (bridge_template.ini): minor doc fix 2016-08-28 20:24:25 +02:00
Goffi
710e243d08 jp (debug): method callback now handles methods without return value 2016-08-28 20:10:04 +02:00
Goffi
7ad14f2252 core: line feed (\n) are now forbidden in profile names 2016-08-28 20:09:09 +02:00
Goffi
dcab42b1d7 quick_frontend (chat): fixed hash generation, tuple was causing trouble when used with unicode() because of dbus.String 2016-08-28 19:42:48 +02:00
Goffi
55357178ef core, bridge, frontends: removed deprecated bridge method askConfirmation, confirmationAnswer, actionResult, actionResultExt and getWaitingConf 2016-08-28 19:23:58 +02:00
Goffi
fb827ad023 quick frontend (app): avatar filename is not requested anymore if value is empty 2016-08-28 18:24:45 +02:00