12#ifndef WSFXIO_REQUEST_HPP
13#define WSFXIO_REQUEST_HPP
15#include "wsf_export.h"
19#include "UtCallbackHolder.hpp"
55 using SessionMap = std::map<WsfXIO_SubscriptionId, WsfXIO_ServiceSession*>;
75 static unsigned int mNextRequestId;
113 void SetRequestId(
unsigned int aRequestId) { mRequestId = aRequestId; }
125 bool mRemotelyDestroyed;
126 unsigned int mRequestId;
#define WSF_EXPORT
Definition WsfXIO_Export.hpp:35
Definition WsfXIO_Connection.hpp:37
Definition WsfXIO_Interface.hpp:54
Basic information required for subscription requests.
Definition WsfXIO_PacketRegistry.hpp:137
Maintains a group of WsfXIO_Requests.
Definition WsfXIO_Request.hpp:31
WsfXIO_RequestManager(WsfXIO_Interface *aInterfacePtr)
Definition WsfXIO_Request.cpp:23
std::map< int, WsfXIO_Request * > RequestMap
Definition WsfXIO_Request.hpp:54
void AddRequest(WsfXIO_Request *aRequestPtr)
Definition WsfXIO_Request.cpp:62
WsfXIO_Interface * mInterfacePtr
Definition WsfXIO_Request.hpp:70
void RemoveSession(WsfXIO_ServiceSession *aSessionPtr)
Removes the session from the request manager.
Definition WsfXIO_Request.cpp:94
void AddSession(WsfXIO_ServiceSession *aSessionPtr)
Adds a session to the request manager for the primary goal of routing WsfXIO_ResponsePkt to the sessi...
Definition WsfXIO_Request.cpp:88
const SessionMap & GetSessions() const
Definition WsfXIO_Request.hpp:57
UtCallbackHolder mCallbacks
Definition WsfXIO_Request.hpp:69
std::map< WsfXIO_SubscriptionId, WsfXIO_ServiceSession * > SessionMap
Definition WsfXIO_Request.hpp:55
const RequestMap & GetRequests() const
Definition WsfXIO_Request.hpp:58
WsfXIO_Request * FindRequest(int aRequestId)
Returns the request with the given request ID if it exists.
Definition WsfXIO_Request.cpp:135
void RemoveRequest(WsfXIO_Request *aRequestPtr)
Definition WsfXIO_Request.cpp:70
Definition WsfXIO_Request.hpp:81
virtual void HandleResponse(WsfXIO_ResponsePkt &aPkt)
Definition WsfXIO_Request.hpp:87
int GetRequestId() const
Returns the request's locally unique ID.
Definition WsfXIO_Request.hpp:98
bool IsReliable() const
Returns 'true' if data for this request is to be sent reliably.
Definition WsfXIO_Request.hpp:95
virtual void Initialized()=0
friend class WsfXIO_RequestManager
Definition WsfXIO_Request.hpp:83
void SetRequestId(unsigned int aRequestId)
Definition WsfXIO_Request.hpp:113
WsfXIO_Connection * GetConnection() const
Returns the connection to the application from which data is requested.
Definition WsfXIO_Request.hpp:92
void SetIsReliable(bool aIsReliable)
Definition WsfXIO_Request.hpp:119
void SetRequestManager(WsfXIO_RequestManager *aRequestManagerPtr)
Sets the owner of this request.
Definition WsfXIO_Request.hpp:101
bool IsRemotelyDestroyed() const
Definition WsfXIO_Request.hpp:117
WsfXIO_Request(WsfXIO_Connection *aConnectionPtr, bool aIsReliable=true)
Definition WsfXIO_Request.cpp:160
void SetRemotelyDestroyed()
Definition WsfXIO_Request.hpp:115
Definition WsfXIO_PacketRegistry.hpp:171
Definition WsfXIO_Service.hpp:133
Definition WsfXIO_PacketRegistry.hpp:128