summaryrefslogtreecommitdiffstats
path: root/messageengine.cpp
AgeCommit message (Collapse)AuthorFilesLines
2020-05-04share MessageEngine instanceRaquel Medina1-2/+4
Share MessageEngine instance among clients in the same process using a common socket (same url). - add MessageEngineFactory class; - extend std::unordered_map<> to use QString as key; - use std::shared_ptr<MessageEngine> to share ownership among MessageEngineFactory and the engine clients; - force MessagEngine parent object null to avoid life cycle dependency on a parent; - protect insertions & deletions in m_calls map; Also, not directly related but as part of testing these changes: cleanup on voice to remove superflous model sorting (there's just one voice model for alexa voice agent). Bug-AGL: SPEC-3112 Signed-off-by: Raquel Medina <raquel.medina@konsulko.com> Change-Id: Ie2304453dc37723dac13d256286eeb85f84ca2ab
2020-03-23rework message hierarchyRaquel Medina1-109/+21
Rework message hierarchy with the final objective of splitting libqtappfw into several libraries. This commit carries the following changes: - Simplify message hierarchy, keeping abstract Message class, adding specialization for call and event messages, keeping ResponseMessage, and removing all module specific specializations. - Add MessageFactory class to create message objects. - Change messages life cycle: using smart pointers and removing QObject from message hierarchy (a Message is not a QObject anymore and thus 'deleteLater()' is not available). - Adapt all modules to use new message hierarchy. - Keep ResponseMessage original constructor to avoid breaking TaskManager. - Message constructors have been kept public, but will go private on a follow-up patch (once TaskManager class has been modified to use new MessageFactory). Bug-AGL: SPEC-3112 Signed-off-by: Raquel Medina <raquel.medina@konsulko.com> Change-Id: I3a7a6325209ddeca2293f1ac745371861a947bfb
2020-03-09eliminate unneeded dependencies on public headersRaquel Medina1-16/+16
- Remove unneeded dependencies from libqtappfw public headers, specifically MessageEngine and Message hierarchy header files, in preparation for refactoring work on these areas. This change helps shield client apps from the upcoming changes in the library, and highlight the separation between the library's core and the various modules providing public interfaces to those apps. - Make MessageType an scoped enum to fwd declare it. - Update Copyright statement on files updated by this patch. Bug-AGL: SPEC-3112 Signed-off-by: Raquel Medina <raquel.medina@konsulko.com> Change-Id: I12fd9cdc034aa1166f6448c07befadd9d2042b05
2020-01-17libqtappfw: add initial HVAC supporticefish_8.99.5icefish/8.99.58.99.5Matt Ranostay1-0/+4
To remove QML handling of websockets this patchset is required to move it to libqtappfw access. Bug-AGL: SPEC-2984 Change-Id: Ieef6174d2ae7adec2fcaadf44fcb22cf86c7138d Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
2020-01-16Add initial voice-capabilities binding supportScott Murray1-1/+8
Add support for subscribing to and using the guimetadata events from the vshl-capabilities binding. A GuiMetadata class is used to wrap things as it is likely that users of the other voice capabilities would not overlap if e.g. navigation event support is later added. At the moment, only the BodyTemplate1, BodyTemplate2, and WeatherTemplate guimetadata types are handled, and there is room for significant improvement in the Qt model exposed, which is somewhat crude with respect to image URL handling. As well, the weather template handling does not expose the full forecast, a full implementation of that would require adding an actual model that maps to a list view rather than a simple QObject. Bug-AGL: SPEC-3110 Signed-off-by: Scott Murray <scott.murray@konsulko.com> Change-Id: I33fc2440ebdc2a4a2de79ff0a49acbc422c47da2
2019-12-13fix parsing event payload in presence of '\n' chars,icefish_8.99.3icefish/8.99.38.99.3Raquel Medina1-0/+1
and include signal emit for voice status and cbl changes. - fix parsing event payload in presence of whitespaces; - fix parsing voice events payload in presence of '\n' chars; - add missing model updates when status or cbl data changes; - fix authorization status enum value typo; Bug-AGL: SPEC-2981 Signed-off-by: Raquel Medina <raquel.medina@konsulko.com> Change-Id: I718bdfea1221211ed4c62ce1b695eabe83ab9590
2019-12-12voice: remove vshl-capabilities dependenciesRaquel Medina1-7/+1
Various fixes for voice component: - fix incorrect check on vap (voice agent profile) pointers; - remove dependencies on vshl-capabilities: this module will communicate via vshl-core api; - remove dependencis on alexa-voiceagent; - use a more generic name for cbl related operations. CBL in this environment is understood as code based login (for voice agent authorization via user login to a cloud service), however, in the case of alexa it is known as code based linking; - add check for voice_xxx_event eventdata which in ocasions is an empty object, i.e., the payload is missing. Bug-AGL: SPEC-2981 Signed-off-by: Raquel Medina <raquel.medina@konsulko.com> Change-Id: Icaab7a21bedb3e2696d541567162ec46b047a305
2019-12-05Add initial signal-composer supporticefish_8.99.2icefish/8.99.28.99.2Matt Ranostay1-0/+4
Add support for new abstract event.vehicle.speed and event.engine.speed events from the signal-composer binding. This should help avoid code duplication in the Qt apps needing events from signal-composer. Bug-AGL: SPEC-3023 Change-Id: I877f8c1cc057d0d491318ef5ad6a943119ffc8b8 Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com> Signed-off-by: Scott Murray <scott.murray@konsulko.com>
2019-11-29voice: add initial support for voice agents configurationRaquel Medina1-0/+10
Bug-AGL: SPEC-2981 Signed-off-by: Raquel Medina <raquel.medina@konsulko.com> Change-Id: I0195d914dc10f4fcdea1cb6df0e6a5859ad8269d
2019-10-31libqtappfw: add initial navigation supportMatt Ranostay1-0/+4
Add initial navigation service support in qtappfw for new agl-service-navigation rewrite. Bug-AGL: SPEC-2880 Change-Id: I276de006af3c1e19e669ae3b9d05c92360893467 Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
2019-06-28libqtappfw: bluetooth-map: add initial map supporthalibut_7.99.3halibut/7.99.37.99.3Matt Ranostay1-0/+4
Add bluetooth-map service support for notifications and message composition. Bug-AGL: SPEC-2561 Change-Id: I956150b9db05334eb02640657c1fc7e03258ab41 Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
2019-01-03libqtappfw: Add radio binding supportScott Murray1-0/+4
Add initial support for the radio binding. At the moment, everything required for the current demo radio application is in place. Further development will be required to fill in support for changing bands and the stereo mode. Change-Id: I1b1866856ce8388b34624c14c692102c344a7a62 Signed-off-by: Scott Murray <scott.murray@konsulko.com> (cherry picked from commit 8053629c99f157e716a4560ef8d1e194d569d960)
2018-11-01libqtappfw: make check for event message case insensitiveMatt Ranostay1-2/+2
Change-Id: I04f54d19ecddcc6ed87de8f360dd61710ec28b34 Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
2018-09-12libqtappfw: remove deleteLater instances that aren't usedguppy_6.90.0guppy/6.90.06.90.0Matt Ranostay1-1/+0
Remove several deleteLater calls that should have been delete's. This should solve race conditions that an object calls deleteLater(), and leaves scope before the QT main loop is called. Outcome of the race condition is that sometimes the memory allocator reallocates it to another message and causes a crash. Bug-AGL: SPEC-1680 Change-Id: Ic83d8c6c204c6e3248bbe9a9def1842e1e384b2b Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
2018-07-10add base network module supportflounder_5.99.2flounder/5.99.25.99.2Matt Porter1-0/+4
Add support for new network binding messages. This is a prerequisite for the new network services list model. Bug-AGL: SPEC-1541 Change-Id: I204914b991016145958114b1e0e914eaf5b599fa Signed-off-by: Matt Porter <mporter@konsulko.com>
2018-06-14Add core Bluetooth PBAP supportMatt Porter1-0/+4
Adds minimal Bluetooth PBAP message and models. Implements search invokable to support phone number to name lookup of incoming and originated calls. Bug-AGL: SPEC-1438 Change-Id: Ic5a68d933b5d6b4f4da3e4c8c5c5a0f59a93f34c Signed-off-by: Matt Porter <mporter@konsulko.com>
2018-05-13message: add response message supportMatt Ranostay1-20/+57
Add support for callid sequencing, and request data being included with the response message. Bug-AGL: SPEC-1404 Change-Id: I259ae3da68e55de17eafe9db534258db5fbc3ef8 Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
2018-04-19libqtappfw: bluetooth: add initial agl-service-bluetooth supportMatt Ranostay1-1/+5
Add initial support for libqtappfw of the agl-service-bluetooth binding to allow removal of QML logic from the Settings application Bug-AGL: SPEC-1385 Change-Id: Iea909af113590667d619afcf09c50523c1c34035 Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
2018-04-06libqtappfw: mediaplayer: initial agl-service-mediaplayer binding supportMatt Ranostay1-0/+4
Add initial support interface between agl-service-mediaplayer and libqtappfw Bug-AGL: SPEC-1375 Change-Id: I740d8cddfd73198b7a3246cb46c941da9f3175d1 Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
2018-02-09Add weather binding supportMatt Ranostay1-0/+4
Allow subscription of weather data for libqtappfw consumers Bug-AGL: SPEC-1273 Change-Id: If794481e09084f9632387c64882861faefe4f62c Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
2017-11-09Add base AGL libqtappfw and Telephony supporteel_4.99.3eel/4.99.34.99.3Matt Porter1-0/+88
Implements several QtObject subclasses that wrap functionality provided by the AGL Application Framework. * Message provides facilities to create new AppFW requests and parse AppFw replies/events from a JSON buffer. * MessageEngine provides a websocket message processing client that can send or receive Messages on a given websocket address. * TelephonyMessage subclasses Message to provide accessors and methods specific to the AGL Telephony API. * Telephony provides a complete set of Qt properties/signals/methods that expose the AGL Telephony functionality to Qt/QML applications. An application normally instantiates only this class and has no need to handle low-level AppFW messages. Bug-AGL: SPEC-1064 Change-Id: I2e41fb866bb4f867c81ccaf9bf33d627893879c8 Signed-off-by: Matt Porter <mporter@konsulko.com>