30 #ifndef __IDHTTPWrapper__ 31 #define __IDHTTPWrapper__ 33 #include "HTTPLinkSubsystemTypes.h" 37 #include "boost/config.hpp" 38 #include "boost/shared_ptr.hpp" 39 #include "boost/function.hpp" 44 namespace IDHTTPWrapper
53 typedef std::string Payload;
64 boost::shared_ptr<RequestIDImpl> fImpl;
75 bool16 IsNetworkConnectivityError()
const;
79 bool16 IsClientError()
const;
83 bool16 IsNotAuthorized()
const;
87 bool16 IsForbidden()
const;
92 int32 GetStatus()
const;
97 Payload GetPayload()
const;
102 HTTPLinkSubsystemTypes::Headers GetHeaders()
const;
105 boost::shared_ptr<ResponseImpl> fImpl;
108 typedef boost::function<void(RequestID, Response)> CompletionFunction;
121 const CompletionFunction& inCompletionFunction,
123 const int inTimeoutInMS = 2000,
124 const HTTPLinkSubsystemTypes::Headers& inHeaders = HTTPLinkSubsystemTypes::Headers());
136 const CompletionFunction& inCompletionFunction,
138 const Payload &payload,
139 const int inTimeoutInMS = 2000,
140 const HTTPLinkSubsystemTypes::Headers& inHeaders = HTTPLinkSubsystemTypes::Headers());
147 bool AsyncCallFromMainThread(
const boost::function<
void()>& inFn,
unsigned int inDelayInMilliseconds = 0);