ResponseBytes.cpp
Go to the documentation of this file.00001
00009 #include "ResponseBytes.h"
00010 #include "Buffer.h"
00011 #include "OID.h"
00012
00013 #include "ToolkitUtils.h"
00014 #include "components.h"
00015 #include "ASN1Helper.h"
00016 #include "OCSP.h"
00017 using namespace std;
00018
00020 struct CPKIFResponseBytesImpl
00021 {
00022 CPKIFOIDPtr m_responseType;
00023 CPKIFBufferPtr m_response;
00024 };
00026
00034 CPKIFResponseBytes::CPKIFResponseBytes(void)
00035 :m_impl (new CPKIFResponseBytesImpl)
00036 {
00037 LOG_STRING_DEBUG("CPKIFResponseBytes::CPKIFResponseBytes(void)", TOOLKIT_OCSP_ASN, 0, this);
00038 }
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060 CPKIFResponseBytes::CPKIFResponseBytes(
00062 const CPKIFOID& type,
00064 const CPKIFBuffer& respData)
00065 :m_impl (new CPKIFResponseBytesImpl)
00066 {
00067 LOG_STRING_DEBUG("CPKIFResponseBytes::CPKIFResponseBytes(ResponseBytes& rb)", TOOLKIT_OCSP_ASN, 0, this);
00068
00069 CPKIFOIDPtr tmpOID(new CPKIFOID(type));
00070 m_impl->m_responseType = tmpOID;
00071
00072 CPKIFBufferPtr tmpBuf(new CPKIFBuffer(respData));
00073 m_impl->m_response = tmpBuf;
00074 }
00082 CPKIFResponseBytes::~CPKIFResponseBytes(void)
00083 {
00084 LOG_STRING_DEBUG("CPKIFResponseBytes::~CPKIFResponseBytes(void)", TOOLKIT_OCSP_ASN, 0, this);
00085
00086 delete m_impl;
00087 m_impl = NULL;
00088 }
00089
00090
00098 CPKIFOIDPtr CPKIFResponseBytes::GetResponseType() const
00099 {
00100 return m_impl->m_responseType;
00101 }
00109 void CPKIFResponseBytes::SetResponseType(
00112 CPKIFOIDPtr& responseType)
00113 {
00114 m_impl->m_responseType = responseType;
00115 }
00116
00117
00126 CPKIFBufferPtr CPKIFResponseBytes::GetResponse() const
00127 {
00128 return m_impl->m_response;
00129 }
00138 void CPKIFResponseBytes::SetResponse(
00140 CPKIFBufferPtr& resp)
00141 {
00142 m_impl->m_response = resp;
00143 }