summaryrefslogtreecommitdiffstats
path: root/src/plugins/core/include
diff options
context:
space:
mode:
authorNaveen Bobbili <nbobbili@amazon.com>2019-02-25 17:24:29 -0800
committerNaveen Bobbili <nbobbili@amazon.com>2019-02-25 20:55:05 -0800
commit9eb3a90df3681586b58146b47eea7f3848c348a0 (patch)
tree9c507e13c233fb649d04c6a45d152f7ec12185f8 /src/plugins/core/include
parent143363b9e864ea465c927057ce7214f124a984cb (diff)
Refactored VSHL into vshl-core and vshl-capabilities.
vshl-core: This API is responsible for request arbitration. Verbs exposed are 1. startListening 2. cancelListening 3. subscribe 4. enumerateVoiceAgents 5. setDefaultVoiceAgent Used by applications to subscribe to dialog, connection and auth states of underlying low level voiceagent bindings. Used by applications to trigger voice recognition routine of the underlying low level voiceagent binding. vshl-capabilities: This API exposes publish and subscribe methods for all the speech framework domains/capabilities. For eg. navigation, phonecontrol etc. This API is used by apps and low level voice agent binding to subscribe and publish these capability messages whenever applicable. The code for this is agl-service-voice-high-capabilities repository. This specific commit is for vshl-core API. Change-Id: I1101db19b57ee918482a178843641b088508ac5d Signed-off-by: Naveen Bobbili <nbobbili@amazon.com>
Diffstat (limited to 'src/plugins/core/include')
-rw-r--r--src/plugins/core/include/VRAgentsObserver.h17
-rw-r--r--src/plugins/core/include/VRRequest.h21
-rw-r--r--src/plugins/core/include/VRRequestProcessorDelegate.h23
3 files changed, 29 insertions, 32 deletions
diff --git a/src/plugins/core/include/VRAgentsObserver.h b/src/plugins/core/include/VRAgentsObserver.h
index d4c0c7b..ce1bd43 100644
--- a/src/plugins/core/include/VRAgentsObserver.h
+++ b/src/plugins/core/include/VRAgentsObserver.h
@@ -22,15 +22,14 @@
#include "utilities/logging/Logger.h"
using namespace std;
-
-namespace vshl {
+namespace vshlcore {
namespace core {
/*
* This class will observe the changes to the voiceagents data and transfers
* the actual handling responsibility to its delegate.
*/
class VRAgentsObserver
- : public vshl::common::interfaces::IVoiceAgentsChangeObserver {
+ : public vshlcore::common::interfaces::IVoiceAgentsChangeObserver {
public:
// Create a VRAgentsObserver.
static shared_ptr<VRAgentsObserver>
@@ -40,18 +39,18 @@ public:
protected:
void OnDefaultVoiceAgentChanged(
- shared_ptr<vshl::common::interfaces::IVoiceAgent> defaultVoiceAgent)
+ shared_ptr<vshlcore::common::interfaces::IVoiceAgent> defaultVoiceAgent)
override;
void OnVoiceAgentAdded(
- shared_ptr<vshl::common::interfaces::IVoiceAgent> voiceAgent) override;
+ shared_ptr<vshlcore::common::interfaces::IVoiceAgent> voiceAgent) override;
void OnVoiceAgentRemoved(
- shared_ptr<vshl::common::interfaces::IVoiceAgent> voiceAgent) override;
+ shared_ptr<vshlcore::common::interfaces::IVoiceAgent> voiceAgent) override;
void OnVoiceAgentActiveWakeWordChanged(
- shared_ptr<vshl::common::interfaces::IVoiceAgent> voiceAgent) override;
+ shared_ptr<vshlcore::common::interfaces::IVoiceAgent> voiceAgent) override;
void OnVoiceAgentActivated(
- shared_ptr<vshl::common::interfaces::IVoiceAgent> voiceAgent) override;
+ shared_ptr<vshlcore::common::interfaces::IVoiceAgent> voiceAgent) override;
void OnVoiceAgentDeactivated(
- shared_ptr<vshl::common::interfaces::IVoiceAgent> voiceAgent) override;
+ shared_ptr<vshlcore::common::interfaces::IVoiceAgent> voiceAgent) override;
private:
// Constructor
diff --git a/src/plugins/core/include/VRRequest.h b/src/plugins/core/include/VRRequest.h
index 522ec78..8b9e842 100644
--- a/src/plugins/core/include/VRRequest.h
+++ b/src/plugins/core/include/VRRequest.h
@@ -22,8 +22,7 @@
#include "interfaces/voiceagents/IVoiceAgent.h"
using namespace std;
-
-namespace vshl {
+namespace vshlcore {
namespace core {
/*
* This class implements the notion of a Voice Recognition Request.
@@ -37,10 +36,10 @@ public:
// Create a VRRequest.
static unique_ptr<VRRequest> create(
- shared_ptr<vshl::common::interfaces::ILogger> logger,
- shared_ptr<vshl::common::interfaces::IAFBApi> afbApi,
+ shared_ptr<vshlcore::common::interfaces::ILogger> logger,
+ shared_ptr<vshlcore::common::interfaces::IAFBApi> afbApi,
string requestId,
- shared_ptr<vshl::common::interfaces::IVoiceAgent> voiceAgent);
+ shared_ptr<vshlcore::common::interfaces::IVoiceAgent> voiceAgent);
// Destructor
~VRRequest();
@@ -56,22 +55,22 @@ public:
private:
// Constructor
VRRequest(
- shared_ptr<vshl::common::interfaces::ILogger> logger,
- shared_ptr<vshl::common::interfaces::IAFBApi> afbApi,
+ shared_ptr<vshlcore::common::interfaces::ILogger> logger,
+ shared_ptr<vshlcore::common::interfaces::IAFBApi> afbApi,
const string requestId,
- shared_ptr<vshl::common::interfaces::IVoiceAgent> voiceAgent);
+ shared_ptr<vshlcore::common::interfaces::IVoiceAgent> voiceAgent);
// Binding API reference.
- shared_ptr<vshl::common::interfaces::IAFBApi> mApi;
+ shared_ptr<vshlcore::common::interfaces::IAFBApi> mApi;
// Voice agent associated with this request
- shared_ptr<vshl::common::interfaces::IVoiceAgent> mVoiceAgent;
+ shared_ptr<vshlcore::common::interfaces::IVoiceAgent> mVoiceAgent;
// Request ID
string mRequestId;
// Logger
- shared_ptr<vshl::common::interfaces::ILogger> mLogger;
+ shared_ptr<vshlcore::common::interfaces::ILogger> mLogger;
};
} // namespace core
diff --git a/src/plugins/core/include/VRRequestProcessorDelegate.h b/src/plugins/core/include/VRRequestProcessorDelegate.h
index 94b7304..2c36d38 100644
--- a/src/plugins/core/include/VRRequestProcessorDelegate.h
+++ b/src/plugins/core/include/VRRequestProcessorDelegate.h
@@ -25,8 +25,7 @@
#include "utilities/uuid/UUIDGeneration.h"
using namespace std;
-
-namespace vshl {
+namespace vshlcore {
namespace core {
/*
* This is a delegate for VRRequestProcessor actions.
@@ -39,22 +38,22 @@ class VRRequestProcessorDelegate {
public:
// create method
static shared_ptr<VRRequestProcessorDelegate> create(
- shared_ptr<vshl::common::interfaces::ILogger> logger,
- shared_ptr<vshl::common::interfaces::IAFBApi> afbApi);
+ shared_ptr<vshlcore::common::interfaces::ILogger> logger,
+ shared_ptr<vshlcore::common::interfaces::IAFBApi> afbApi);
// Destructor
~VRRequestProcessorDelegate();
// Set default voiceagent
- void setDefaultVoiceAgent(shared_ptr<vshl::common::interfaces::IVoiceAgent> voiceAgent);
+ void setDefaultVoiceAgent(shared_ptr<vshlcore::common::interfaces::IVoiceAgent> voiceAgent);
// Get the default voiceagent
- shared_ptr<vshl::common::interfaces::IVoiceAgent> getDefaultVoiceAgent() const;
+ shared_ptr<vshlcore::common::interfaces::IVoiceAgent> getDefaultVoiceAgent() const;
// Add new request to the list and start processing it.
// New request is created and startListening on the
// voiceagent is called.
- string startRequestForVoiceAgent(shared_ptr<vshl::common::interfaces::IVoiceAgent> voiceAgent);
+ string startRequestForVoiceAgent(shared_ptr<vshlcore::common::interfaces::IVoiceAgent> voiceAgent);
// Cancel all requests
void cancelAllRequests();
@@ -66,20 +65,20 @@ public:
private:
// Constructor
VRRequestProcessorDelegate(
- shared_ptr<vshl::common::interfaces::ILogger> logger,
- shared_ptr<vshl::common::interfaces::IAFBApi> afbApi);
+ shared_ptr<vshlcore::common::interfaces::ILogger> logger,
+ shared_ptr<vshlcore::common::interfaces::IAFBApi> afbApi);
// Binding API reference
- shared_ptr<vshl::common::interfaces::IAFBApi> mApi;
+ shared_ptr<vshlcore::common::interfaces::IAFBApi> mApi;
// Default voiceagent
- shared_ptr<vshl::common::interfaces::IVoiceAgent> mDefaultVoiceAgent;
+ shared_ptr<vshlcore::common::interfaces::IVoiceAgent> mDefaultVoiceAgent;
// A map of voiceagent IDs and their respective VR Request objects.
unordered_map<string, shared_ptr<VRRequest>> mVRRequests;
// Logger
- shared_ptr<vshl::common::interfaces::ILogger> mLogger;
+ shared_ptr<vshlcore::common::interfaces::ILogger> mLogger;
};
} // namespace core