diff options
author | Raquel Medina <raquel.medina@konsulko.com> | 2019-12-04 03:57:14 +0100 |
---|---|---|
committer | Raquel Medina <raquel.medina@konsulko.com> | 2019-12-04 10:39:10 +0100 |
commit | 16c4429c177a4eb9943e5b9e3c945be76a4fee70 (patch) | |
tree | 069f6b8eb95b588a852090d0f60384d10f8ad519 /voice/voicemessage.h | |
parent | da091649e775b23a35eb88df1c2cf9ce3fb350f7 (diff) |
voice: add status events to VshlCoreVoiceMessages.
- Add connection, auth and dialog status events
to VshlCoreVoiceMessage private events list.
- Fix logic error in AlexaVoiceMessage's auth events
processing. Error introduced by commit
'da091649e775b23a35eb88df1c2cf9ce3fb350f7'.
Bug-AGL: SPEC-2880
Signed-off-by: Raquel Medina <raquel.medina@konsulko.com>
Change-Id: Ia402c8307b16595be5a8f9a1ed79d5eeb0e08036
Diffstat (limited to 'voice/voicemessage.h')
-rw-r--r-- | voice/voicemessage.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/voice/voicemessage.h b/voice/voicemessage.h index 1de5dd2..00ed847 100644 --- a/voice/voicemessage.h +++ b/voice/voicemessage.h @@ -36,11 +36,11 @@ class VshlCoreVoiceMessage : public VoiceMessage public: virtual ~VshlCoreVoiceMessage() {}; bool isAuthStateEvent() const override { - return (this->eventName() == "voice_authstate_event"); }; + return (this->eventName().contains("voice_authstate_event")); }; bool isConnectionStateEvent() const override { - return (this->eventName() == "voice_connectionstate_event"); }; + return (this->eventName().contains("voice_connectionstate_event")); }; bool isDialogStateEvent() const override { - return (this->eventName() == "voice_dialogstate_event"); }; + return (this->eventName().contains("voice_dialogstate_event")); }; bool createRequest(QString verb, QJsonObject parameter) override; private: @@ -53,7 +53,9 @@ class VshlCoreVoiceMessage : public VoiceMessage "setDefaultVoiceAgent", }; QStringList events { - "", + "voice_authstate_event", + "voice_dialogstate_event", + "voice_connectionstate_event", }; }; @@ -94,7 +96,7 @@ class AlexaVoiceMessage : public VoiceMessage public: virtual ~AlexaVoiceMessage() {}; bool isAuthStateEvent() const override { - return (!events.contains(this->eventName())); }; + return (events.contains(this->eventName())); }; bool isConnectionStateEvent() const override { return false; }; bool isDialogStateEvent() const override { return false; }; bool createRequest(QString verb, QJsonObject parameter) override; |