Portuguese eID Middleware SDK
Version: 3.12.0
|
#include <eidlib.h>
Public Member Functions | |
PTEIDSDK_API | PTEID_ByteArray () |
PTEIDSDK_API | PTEID_ByteArray (const PTEID_ByteArray &bytearray) |
PTEIDSDK_API | PTEID_ByteArray (const unsigned char *pucData, unsigned long ulSize) |
virtual PTEIDSDK_API | ~PTEID_ByteArray () |
PTEIDSDK_API void | Append (const unsigned char *pucData, unsigned long ulSize) |
PTEIDSDK_API void | Append (const PTEID_ByteArray &data) |
PTEIDSDK_API void | Clear () |
PTEIDSDK_API bool | Equals (const PTEID_ByteArray &data) const |
PTEIDSDK_API unsigned long | Size () const |
PTEIDSDK_API const unsigned char * | GetBytes () const |
const char * | GetStringAt (unsigned long ulOffset, unsigned long ulLen) const |
PTEIDSDK_API bool | writeToFile (const char *csFilePath) |
PTEIDSDK_API PTEID_ByteArray & | operator= (const PTEID_ByteArray &bytearray) |
NOEXPORT_PTEIDSDK | PTEID_ByteArray (const SDK_Context *context, const CByteArray &impl) |
NOEXPORT_PTEIDSDK PTEID_ByteArray & | operator= (const CByteArray &bytearray) |
Public Member Functions inherited from eIDMW::PTEID_Object | |
virtual PTEIDSDK_API | ~PTEID_Object ()=0 |
NOEXPORT_PTEIDSDK void | Init (const SDK_Context *context, void *impl) |
NOEXPORT_PTEIDSDK void | Release () |
Additional Inherited Members | |
Protected Member Functions inherited from eIDMW::PTEID_Object | |
PTEID_Object (const SDK_Context *context, void *impl) | |
void | addObject (PTEID_Object *impl) |
void | backupObject (unsigned long idx) |
PTEID_Object * | getObject (unsigned long idx) |
PTEID_Object * | getObject (void *impl) |
void | delObject (unsigned long idx) |
void | delObject (void *impl) |
void | checkContextStillOk () const |
PTEID_Object (const PTEID_Object &obj) | |
PTEID_Object & | operator= (const PTEID_Object &obj) |
Protected Attributes inherited from eIDMW::PTEID_Object | |
bool | m_delimpl |
void * | m_impl |
unsigned long | m_ulIndexExtAdd |
std::map< unsigned long, PTEID_Object * > | m_objects |
SDK_Context * | m_context |
Class used to receive and supply an array of bytes from/to different methods in the SDK.
Memory management note - instances of this class will not own the char arrays that are supplied to it in the constructor or Append() methods as this class will perform copies of the input arrays
PTEIDSDK_API eIDMW::PTEID_ByteArray::PTEID_ByteArray | ( | ) |
Default constructor
PTEIDSDK_API eIDMW::PTEID_ByteArray::PTEID_ByteArray | ( | const PTEID_ByteArray & | bytearray | ) |
Copy constructor
PTEIDSDK_API eIDMW::PTEID_ByteArray::PTEID_ByteArray | ( | const unsigned char * | pucData, |
unsigned long | ulSize | ||
) |
Constructor - initialize a byte array with an array of unsigned char.
pucData | is the byte array |
ulSize | is the size of the array |
|
virtual |
Destructor
NOEXPORT_PTEIDSDK eIDMW::PTEID_ByteArray::PTEID_ByteArray | ( | const SDK_Context * | context, |
const CByteArray & | impl | ||
) |
For internal use : construct from lower level object
PTEIDSDK_API void eIDMW::PTEID_ByteArray::Append | ( | const unsigned char * | pucData, |
unsigned long | ulSize | ||
) |
Append data to the byte array.
pucData | is the byte array |
ulSize | is the size of the array |
PTEIDSDK_API void eIDMW::PTEID_ByteArray::Append | ( | const PTEID_ByteArray & | data | ) |
Append data to the byte array.
PTEIDSDK_API void eIDMW::PTEID_ByteArray::Clear | ( | ) |
Remove the data from the byte array.
PTEIDSDK_API bool eIDMW::PTEID_ByteArray::Equals | ( | const PTEID_ByteArray & | data | ) | const |
Return true if the content of data is the same as this.
PTEIDSDK_API const unsigned char* eIDMW::PTEID_ByteArray::GetBytes | ( | ) | const |
Return the array of bytes in the object. If Size() == 0, then NULL is returned.
const char* eIDMW::PTEID_ByteArray::GetStringAt | ( | unsigned long | ulOffset, |
unsigned long | ulLen | ||
) | const |
Get a string from buffer at ulOffset position and with ulLen size.
PTEIDSDK_API PTEID_ByteArray& eIDMW::PTEID_ByteArray::operator= | ( | const PTEID_ByteArray & | bytearray | ) |
Copy content of bytearray.
NOEXPORT_PTEIDSDK PTEID_ByteArray& eIDMW::PTEID_ByteArray::operator= | ( | const CByteArray & | bytearray | ) |
For internal use : copy from lower level object
PTEIDSDK_API unsigned long eIDMW::PTEID_ByteArray::Size | ( | ) | const |
Return the number of bytes in the array.
PTEIDSDK_API bool eIDMW::PTEID_ByteArray::writeToFile | ( | const char * | csFilePath | ) |
Writing the binary content to a file.