Commit graph libervia-backend/frontends/src/quick_frontend
Author SHA1 Message Date
Goffi
a9fb2e568e core: moved CHAT_* constants from frontends to core constants + uses constants for MESS_TYPE_* in sendMessage 2018-01-03 00:13:48 +01:00
Goffi
f5f25e8ab5 misc: date update (yes it's a bit late :p ) 2017-11-03 14:31:42 +01:00
Goffi
697da436af plugin XEP-0060: node create/delete improvments:
- use client instead of profile for createNode and deleteNode
    - new bridge method psCreateNode
    - renamed psDeleteNode to psNodeDelete
2017-04-03 00:22:58 +02:00
Goffi
6378718ddc primitivus: fixed profileCreate bridge call 2017-03-08 20:44:28 +01:00
Goffi
085ed041e7 core, bridge: renamed getProfileName to profileNameGet according to new conventions 2017-03-05 21:36:01 +01:00
Goffi
9b0542fb46 core, frontends: various fixes for Libervia:
- quick_app: don't fail when we can't get autodisconnect parameter
    - bridge: removed useless BridgeFrontend parent class
    - use of TypeError, unicode and list to workaround Pyjamas incompatibilities
2017-02-26 18:23:01 +01:00
Goffi
85f3bd5988 core, frontends: getProfilesList renamed to profilesGetList + behaviour change:
- profilesGetList now handles clients and components boolean arguments, to filter profiles
    - jp: added --clients and --components options to profile/list
    - profilesGetList now returns sorted profiles
2017-02-12 19:08:52 +01:00
Goffi
97337202cb core, jp: component handling + client handling refactoring:
- SàT can now handle components
    - plugin have now a "modes" key in PLUGIN_INFO where they declare if they can be used with clients and or components. They default to be client only.
    - components are really similar to clients, but with some changes in behaviour:
        * component has "entry point", which is a special plugin with a componentStart method, which is called just after component is connected
        * trigger end with a different suffixes (e.g. profileConnected vs profileConnectedComponent), so a plugin which manage both clients and components can have different workflow
        * for clients, only triggers of plugins handling client mode are launched
        * for components, only triggers of plugins needed in dependencies are launched. They all must handle component mode.
        * component have a sendHistory attribute (False by default) which can be set to True to allow saving sent messages into history
        * for convenience, "client" is still used in method even if it can now be a component
        * a new "component" boolean attribute tells if we have a component or a client
        * components have to add themselve Message protocol
        * roster and presence protocols are not added for components
        * component default port is 5347 (which is Prosody's default port)
    - asyncCreateProfile has been renamed for profileCreate, both to follow new naming convention and to prepare the transition to fully asynchronous bridge
    - createProfile has a new "component" attribute. When used to create a component, it must be set to a component entry point
    - jp: added --component argument to profile/create
    - disconnect bridge method is now asynchronous, this way frontends can know when disconnection is finished
    - new PI_* constants for PLUGIN_INFO values (not used everywhere yet)
    - client/component connection workflow has been moved to their classes instead of being a host methods
    - host.messageSend is now client.sendMessage, and former client.sendMessage is now client.sendMessageData.
    - identities are now handled in client.identities list, so it can be updated dynamically by plugins (in the future, frontends should be able to update them too through bridge)
    - profileConnecting* profileConnected* profileDisconnected* and getHandler now all use client instead of profile
2017-02-12 17:55:43 +01:00
Goffi
b5f1e45d4e core, bridge, frontends: renamed asyncConnect to connect, and added options parameters (not used yet) 2017-02-06 22:54:43 +01:00
Goffi
2455e35c28 quick app: check type in notify 2017-02-05 14:55:21 +01:00
Goffi
115f5ae0e1 plugin otr: various improvments:
- messageSend trigger now use pre_xml_treatments so it doesn't block other triggers of higher priority
    - text commands now use a very high priority, as it is local command and should not be blocked in most of cases
    - new otrState signal, to send state change to frontends
    - history is not skipped anymore, a future option may change this behaviour
    - OTR trigger are skipped on groupchat messages
    - context_manager is now in client instead of being global to plugin
    - removed fixPotr as it is fixed upstream

note triggers should be improved for encryption methods, as skipping an encrypter may break security, but putting it in top priority may break nice features.

fix bug 170
2017-02-01 21:44:24 +01:00
Goffi
d8b9c85cc0 core (menus): improvments:
- use the new convention for bridge names (getMenus ==> menusGet, etc.)
    - menu now use canonical path, which is the untranslated path with each element stripped and lowercase, it must be unique by menu type
    - added menuLaunch method to manually launch a menu like an action, canonical path is used instead of id
    - added SECURITY_LIMIT_MAX constant
2017-01-26 20:29:48 +01:00
Goffi
dc4e3c9d8c quick frontend(contact list): added all_iter property to get all cached entities 2017-01-15 22:41:22 +01:00
Goffi
4eaf5d626f plugin XEP-0054, quick frontend(app): various improvments:
- memory.cache is now used
    - getAvatar and setAvatar has been renamed to avatarGet and avatarSet to follow new convention
    - getAvatar now return (optionally) full path, and may request vCard or only return avatar in cache
    - getAvatarFile has been removed as it is not needed anymore (avatarGet can return full path)
    - getCard has been removed from bridge as it was only used to request avatar
    - new internal method getBareOfFull return jid to use depending of the jid being part of a MUC or not
    - cache is now set per profile in client, instead of a general one for all profiles
    - thanks to the use of memory.cache, correct extension is now used in saved file, according to MIME type
    - fixed and better cache handling
    - a warning message is shown if given avatar hash differs from computed one
    - empty hash value is now in a constant, and ignored if received
    - QuickApp has been updated to follow new behaviour
    - Primitivus has been fixed (it was not declaring not using avatars correclty)
    - jp has been updated to follow new methods name
2017-01-15 17:51:37 +01:00
Goffi
1a33c3389f quick frontend (contact list): bare_default in getCache now default to True, plus added None:
if None is used, bare_default will be used only if the entity is not in a room
2017-01-15 16:00:41 +01:00
Goffi
41373f893c quick frontend (contact list): added isSpecial and isRoom to quickly now if an entity is specific 2017-01-15 16:00:41 +01:00
Goffi
450c9c0a15 quick frontend (contact list): fixed cached key removal 2017-01-15 16:00:40 +01:00
Goffi
42f5bb6192 quick frontends (chat): send actual value instead of None on status and state updates 2017-01-09 23:10:16 +01:00
Goffi
6307c89618 quick frontend (quick app): added progressFinished and progressError listeners 2016-12-22 18:10:36 +01:00
Goffi
9fff6e1343 quick frontend (quick app): fixed use of profile_manager.connected 2016-12-20 21:07:22 +01:00
Goffi
be8d681be7 quick_frontend(QuickApp): added onBridgeConnected method 2016-12-18 16:28:46 +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
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
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
95f77b1df1 quick frontend(contact_list): avoid crash when resource in cache has not priority 2016-10-02 13:46:29 +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
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
bd47ab8d3d quick frontend (menus): minor docstring fixes 2016-09-11 11:03:25 +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
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
1b01409238 quick app(app): call entityDataUpdateHandler on profile plug instead of setCache directly 2016-09-09 23:54:33 +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
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
Goffi
ddcb938332 quick frontend (chat): fixed getWidgetHash 2016-08-28 18:23:55 +02:00
Goffi
4785af58c6 quick_frontend(quick_widgets): deleteWidget can use additional arguments which will be passed to onDelete 2016-08-28 18:22:46 +02:00
Goffi
5347f89dd4 quick frontend (widgets): a deletion with onDelete can now be cancelled if onDelete return False 2016-08-22 20:56:51 +02:00
Goffi
c9c15849d7 quick frontend (quick_app): fixed user_action from action coming from backend 2016-08-21 20:39:43 +02:00
Goffi
caaa753d80 quick frontend (chat): fixed messageNew signal dispatching when several widgets are handling the target 2016-08-21 17:04:33 +02:00
Goffi
8a7029b549 quick frontend (quick_widget): getWidgets can now filter on hash (using target), handling recreated widgets too 2016-08-21 17:03:18 +02:00
Goffi
0c83d13b7c frontends (xmlui): added a user_action attribute:
this attribute indicate if the data is a result of a user interaction or an event from the backend (in the later case, the frontend can choose to avoid interrupting the user).
Internally (in XMLUI), "FROM_BACKEND" is added to XMLUI.flags if the UI result from a backend event.
2016-08-21 12:07:31 +02:00
Goffi
4518afa0fb quick frontend (app): fixed regression in groups handling 2016-08-10 23:23:48 +02:00