![]() |
AlexaClientSDK
3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
|
#include <IPCHandlerBase.h>
Public Types | |
using | IPCMessageHandler = std::function< void(const std::string &)> |
Alias for the message handler function. More... | |
Public Member Functions | |
void | invokeMethod (const std::string &methodName, const std::string &message) |
~IPCHandlerBase () | |
Protected Member Functions | |
IPCHandlerBase (const std::string &namespaceName, std::shared_ptr< alexaClientSDK::avsCommon::utils::threading::Executor > executor) | |
bool | registerIPCMessageHandlerMethod (const std::string &methodName, IPCMessageHandler handlerFunction) |
bool | deregisterIPCMessageHandlerMethod (const std::string &methodName) |
Protected Attributes | |
std::string | m_namespaceName |
Name of the namespace of the realized IPC handler class. More... | |
std::unordered_map< std::string, IPCMessageHandler > | m_messageHandlers |
Dictionary to hold the IPC message handler methods. More... | |
std::shared_ptr< alexaClientSDK::avsCommon::utils::threading::Executor > | m_executor |
Executor context to support operations asynchronously. More... | |
A Base class to assist IPC components to handle messages coming from IPC client.
using alexaClientSDK::sampleApplications::ipcServerSampleApp::ipc::IPCHandlerBase::IPCMessageHandler = std::function<void(const std::string&)> |
Alias for the message handler function.
alexaClientSDK::sampleApplications::ipcServerSampleApp::ipc::IPCHandlerBase::~IPCHandlerBase | ( | ) |
Destructor.
|
protected |
Base IPC handler constructor. Note: We do not expect this class to be instantiated on its own.
namespaceName | Namespace of the realized IPC handler class. |
executor | Executor context to support operations asynchronously. |
|
protected |
De-registers the method that handles an IPC message.
methodName | Name of the IPC method for which handler has to be registered. |
void alexaClientSDK::sampleApplications::ipcServerSampleApp::ipc::IPCHandlerBase::invokeMethod | ( | const std::string & | methodName, |
const std::string & | message | ||
) |
Invokes a method to handle an IPC message.
methodName | Name of the method to be invoked. |
message | Message to be handled by a concrete method. |
|
protected |
Registers the method that handles an IPC message.
methodName | Name of the IPC method for which handler has to be registered. |
handlerFunction | Function reference to be invoked for the said method. |
|
protected |
Executor context to support operations asynchronously.
|
protected |
Dictionary to hold the IPC message handler methods.
|
protected |
Name of the namespace of the realized IPC handler class.
AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0