8 #ifndef FACEBOOK_NETWORK_STREAMING_H
9 #define FACEBOOK_NETWORK_STREAMING_H
133 inline const std::string& name()
const;
139 inline const std::string& description()
const;
145 inline double responseTimeout()
const;
152 virtual bool setName(
const std::string& name);
196 bool parse(
const unsigned char* data,
const size_t size,
bool& isResponse, std::string& message, std::string& value,
SessionId& sessionId);
247 double responseTimeout_ = 2.0;
This class implements a message queue.
Definition: MessageQueue.h:29
unsigned int Id
Definition of a message id.
Definition: MessageQueue.h:35
This class is the base class for all streaming objects.
Definition: Streaming.h:25
Streaming & operator=(const Streaming &streaming)=delete
Disabled copy operator.
double responseTimeout_
Timeout value for response messages.
Definition: Streaming.h:247
static const std::string & clientPortCommand()
Definition of a client port command.
static const std::string & dataTypeRequestResponseN()
Definition of a negative data type request response.
virtual ~Streaming()=default
Destructs an object.
static const std::string & pauseResponseN()
Definition of a negative pause response.
bool setResponseTimeout(const double timeout)
Sets the timeout value the streaming object waits for response messages.
static const std::string & channelSelectResponseP()
Definition of a positive channel select response.
static std::string createCommand(const std::string &command, const std::string &value, const SessionId sessionId)
Creates a new command message with a value.
std::string description_
Description of this streaming object.
Definition: Streaming.h:244
virtual bool setName(const std::string &name)
Sets the name of this streaming object.
const std::string & description() const
Returns the description of this streaming object.
Definition: Streaming.h:258
static const std::string & stopResponseN()
Definition of a negative stop response.
static const std::string & disconnectResponseN()
Definition of a negative disconnect response.
static const std::string & serverPortResponseN()
Definition of a negative server port response.
static std::string createResponse(const std::string &response, const std::string &value, const SessionId sessionId)
Creates a new response message with a value.
static const std::string & pauseResponseP()
Definition of a positive pause response.
static const std::string & clientPortResponseN()
Definition of a negative client port response.
static const std::string & channelSelectResponseN()
Definition of a negative channel select response.
static const std::string & startCommand()
Definition of a start command.
const std::string & name() const
Returns the name of this streaming object.
Definition: Streaming.h:253
double responseTimeout() const
Returns the timeout value the streaming object waits for response messages.
Definition: Streaming.h:263
static const std::string & disconnectCommand()
Definition of a disconnect command.
static const std::string & channelRequestCommand()
Definition of a channel request command.
static const std::string & serverPortCommand()
Definition of a server port command.
static const std::string & clientPortResponseP()
Definition of a positive client port response.
virtual bool setDescription(const std::string &description)
Sets the description of this streaming object.
static const std::string & connectResponseN()
Definition of a negative connect response.
Streaming(const Streaming &streaming)=delete
Disabled copy constructor.
bool parse(const unsigned char *data, const size_t size, bool &isResponse, std::string &message, std::string &value, SessionId &sessionId)
Parses a command or a response.
std::string name_
Name of this streaming object.
Definition: Streaming.h:241
static const std::string & dataTypeRequestResponseP()
Definition of a positive data type request response.
static const std::string & connectResponseP()
Definition of a positive connect response.
MessageQueue::Id SessionId
Definition of a session id.
Definition: Streaming.h:46
static const std::string & startResponseN()
Definition fo a negative start response.
static const std::string & changedDataTypeCommand()
Definition of a changed data type command.
static const std::string & startResponseP()
Definition of a positiv start response.
static const std::string & channelRequestResponseN()
Definition of a negative channel request response.
static const std::string & stopCommand()
Definition of a stop command.
static const std::string & serverPortResponseP()
Definition of a positive server port response.
static const std::string & channelSelectCommand()
Definition of a channel select command.
static const std::string & changedDataTypeResponseN()
Definition of a negative change data type request.
static const std::string & connectCommand()
Definition of a connect command.
static std::string createResponse(const std::string &response, const SessionId sessionId)
Creates a new response message.
static const std::string & channelRequestResponseP()
Definition of a positive channel request response.
static const std::string & stopResponseP()
Definition of a positive stop response.
static const std::string & disconnectResponseP()
Definition of a positive disconnect response.
State
Definition of different streaming states.
Definition: Streaming.h:32
@ STATE_START
Start state.
Definition: Streaming.h:34
@ STATE_STOP
Stop state.
Definition: Streaming.h:38
@ STATE_PAUSE
Pause state.
Definition: Streaming.h:36
Streaming()
Creates a new streaming object.
static std::string createCommand(const std::string &command, const SessionId sessionId)
Creates a new command message.
static const std::string & changedDataTypeResponseP()
Definition of a positive changed data type request.
static const std::string & pauseCommand()
Definition of a pause command.
static const std::string & dataTypeRequestCommand()
Definition of a data type request command.
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15