#include <OTPayload.hpp>
Definition at line 145 of file OTPayload.hpp.
opentxs::OTPayload::OTPayload |
( |
| ) |
|
opentxs::OTPayload::OTPayload |
( |
const void * |
pNewData, |
|
|
uint32_t |
nNewSize |
|
) |
| |
opentxs::OTPayload::OTPayload |
( |
const OTPayload & |
rhs | ) |
|
opentxs::OTPayload::OTPayload |
( |
const OTASCIIArmor & |
theSource | ) |
|
opentxs::OTPayload::~OTPayload |
( |
| ) |
|
|
virtual |
bool opentxs::OTPayload::GetEnvelope |
( |
OTEnvelope & |
theEnvelope | ) |
const |
Definition at line 232 of file OTPayload.cpp.
236 uint32_t lIndex = lSize - 2;
242 if (0 == lSize)
return false;
251 theEnvelope.m_dataContents.Release();
270 theEnvelope.SetAsciiArmoredData(theArmor);
274 otErr <<
"Invalid Checksum in OTPayload::GetEnvelope\n";
EXPORT OT_BOOL IsChecksumValid(OT_BYTE *buffer, uint32_t size)
OTLOG_IMPORT OTLogStream otErr
const void * GetPointer() const
friend class OTASCIIArmor
bool opentxs::OTPayload::GetMessagePayload |
( |
OTMessage & |
theMessage | ) |
const |
Definition at line 280 of file OTPayload.cpp.
284 uint32_t lIndex = lSize - 2;
288 if (0 == lSize)
return false;
296 theMessage.Release();
304 theMessage.m_strRawFile.Set((
const char*)
GetPointer());
308 otErr <<
"Invalid Checksum in OTPayload::GetMessage\n";
EXPORT OT_BOOL IsChecksumValid(OT_BYTE *buffer, uint32_t size)
OTLOG_IMPORT OTLogStream otErr
const void * GetPointer() const
const void * opentxs::OTPayload::GetPayloadPointer |
( |
| ) |
const |
uint32_t opentxs::OTPayload::ReadBytesFrom |
( |
OTData & |
theData, |
|
|
uint32_t |
lSize |
|
) |
| |
Definition at line 169 of file OTPayload.cpp.
174 if (theData.GetSize() < lSize) abort();
179 Assign(refPayload.GetPayloadPointer(), lSize);
183 OTData TEMPdata((uint8_t*)refPayload.GetPayloadPointer() + lSize,
184 theData.GetSize() - lSize);
188 theData.Assign(TEMPdata);
EXPORT void Assign(const OTData &source)
bool opentxs::OTPayload::SetEnvelope |
( |
const OTEnvelope & |
theEnvelope | ) |
|
Definition at line 194 of file OTPayload.cpp.
198 if (theEnvelope.GetAsciiArmoredData(theArmor)) {
199 uint32_t lSize = theArmor.GetLength() + 1;
201 if (theArmor.GetLength()) {
205 memcpy((
void*)
GetPointer(), theArmor.Get(), lSize);
EXPORT void SetPayloadSize(uint32_t lNewSize)
const void * GetPointer() const
void AppendChecksum(OT_BYTE *buffer, uint32_t &size)
friend class OTASCIIArmor
bool opentxs::OTPayload::SetMessagePayload |
( |
const OTMessage & |
theMessage | ) |
|
Definition at line 215 of file OTPayload.cpp.
218 theMessage.m_strRawFile.GetLength() + 1;
220 if (theMessage.m_strRawFile.GetLength()) {
222 memcpy((
void*)
GetPointer(), theMessage.m_strRawFile.Get(), lSize);
EXPORT void SetPayloadSize(uint32_t lNewSize)
const void * GetPointer() const
void AppendChecksum(OT_BYTE *buffer, uint32_t &size)
void opentxs::OTPayload::SetPayloadSize |
( |
uint32_t |
lNewSize | ) |
|
The documentation for this class was generated from the following files: