Safir SDK Core
Loading...
Searching...
No Matches
ResponseProxy.h
Go to the documentation of this file.
1/******************************************************************************
2*
3* Copyright Saab AB, 2008-2013 (http://safirsdkcore.com)
4*
5* Created by: Anders Widén / stawi
6*
7*******************************************************************************
8*
9* This file is part of Safir SDK Core.
10*
11* Safir SDK Core is free software: you can redistribute it and/or modify
12* it under the terms of version 3 of the GNU General Public License as
13* published by the Free Software Foundation.
14*
15* Safir SDK Core is distributed in the hope that it will be useful,
16* but WITHOUT ANY WARRANTY; without even the implied warranty of
17* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18* GNU General Public License for more details.
19*
20* You should have received a copy of the GNU General Public License
21* along with Safir SDK Core. If not, see <http://www.gnu.org/licenses/>.
22*
23******************************************************************************/
24
25#ifndef _SAFIR_DOB_RESPONSE_PROXY_H
26#define _SAFIR_DOB_RESPONSE_PROXY_H
27
28#include <Safir/Dob/Internal/ProxyImplPtr.h>
33#include <Safir/Dob/Response.h>
34#include <Safir/Dob/Defs.h>
35
36#include <string>
37
38namespace Safir
39{
40namespace Dob
41{
42
43 // Forward declaration
44 namespace Internal
45 {
46 class ResponseProxyImpl;
47 }
48
53 {
54 public:
60 bool IsSuccess() const;
61
70
79
88
104 const char * GetBlob() const;
105
119
126
133
143
162 const char * GetRequestBlob() const;
163
164
171
175 // The constructor is for internal usage only!
176 explicit ResponseProxy(Internal::ResponseProxyImpl* pImpl);
177
178 private:
179
180#ifdef _MSC_VER
181#pragma warning (push)
182#pragma warning (disable: 4251) // To get rid of warning that says that the template needs to have a DLL-interface
183#endif
184
185 Internal::ProxyImplPtr<Internal::ResponseProxyImpl> m_pImpl;
186
187#ifdef _MSC_VER
188#pragma warning (pop)
189#endif
190
191 };
192}
193}
194
195#endif
#define DOSE_CPP_API
Definition DoseCppExportDefs.h:33
This namespace contains all the functionality and definitions of the SAFIR SDK.
Definition Backdoor.h:31
std::shared_ptr< Response > ResponsePtr
Definition Response.h:34
Safir::Dob::Typesystem::Int32 RequestId
Represents the id of a request.
Definition Defs.h:42
std::shared_ptr< ConnectionInfo > ConnectionInfoPtr
Definition ConnectionInfo.h:36
std::shared_ptr< Object > ObjectPtr
A smart pointer to an Object.
Definition Object.h:44
DotsC_TypeId TypeId
A unique type identifier.
Definition Defs.h:218
Proxy class for a response.
Definition ResponseProxy.h:53
const Dob::Typesystem::ObjectPtr GetRequest() const
Get the original request.
const Dob::Typesystem::InstanceId GetRequestInstanceId() const
Get the instance id used in the original request.
const Dob::ResponsePtr GetResponse() const
Get response.
bool IsSuccess() const
Get response success or failure status.
const Dob::ConnectionInfoPtr GetResponseSenderConnectionInfo() const
Get info about the response sender.
Dob::Typesystem::TypeId GetTypeId() const
Get type id.
ResponseProxy(Internal::ResponseProxyImpl *pImpl)
const Dob::Typesystem::HandlerId GetRequestHandlerId() const
Get the handler id to which the original request was sent.
Dob::RequestId GetRequestId() const
Get request id.
const char * GetBlob() const
Get binary blob of the received response.
const char * GetRequestBlob() const
Get the original request blob.
Dob::Typesystem::TypeId GetRequestTypeId() const
Get type id of the entity or service sent in the original request.
Class containing the identity of a handler.
Definition HandlerId.h:46
Class containing the identity of an instance.
Definition InstanceId.h:49