SignDoc SDK (C++)  5.0.0
SignDocAttachment Class Reference

Output of SignDocDocument::getAttachment(). More...

#include <SignDocSDK-cpp.h>

Public Member Functions

 SignDocAttachment ()
 Constructor. More...
 
 SignDocAttachment (const SignDocAttachment &aSource)
 Copy constructor. More...
 
 ~SignDocAttachment ()
 Destructor. More...
 
SignDocAttachmentoperator= (const SignDocAttachment &aSource)
 Assignment operator. More...
 
void swap (SignDocAttachment &aOther)
 Efficiently swap this object with another one. More...
 
std::string getName (Encoding aEncoding) const
 Get the name of the attachment. More...
 
const char * getNameUTF8 () const
 Get the name of the attachment as UTF-8-encoded C string. More...
 
std::string getFileName (Encoding aEncoding) const
 Get the file name of the attachment. More...
 
const char * getFileNameUTF8 () const
 Get the file name of the attachment as UTF-8-encoded C string. More...
 
std::string getDescription (Encoding aEncoding) const
 Get the description of the attachment. More...
 
const char * getDescriptionUTF8 () const
 Get the description of the attachment as UTF-8-encoded C string. More...
 
int getSize () const
 Get the size (in octets) of the attachment. More...
 
int getCompressedSize () const
 Get the compressed size (in octets) of the attachment. More...
 
const char * getType () const
 Get the MIME type of the attachment. More...
 
const char * getCreationTime () const
 Get the creation time and date of the attachment. More...
 
const char * getModificationTime () const
 Get the time and date of the last modification of the attachment. More...
 
 SignDocAttachment (SIGNDOC_Attachment *aP)
 Internal function. More...
 
SIGNDOC_Attachment * getImpl ()
 Internal function. More...
 
const SIGNDOC_Attachment * getImpl () const
 Internal function. More...
 
void setImpl (SIGNDOC_Attachment *aP)
 Internal function. More...
 

Detailed Description

Constructor & Destructor Documentation

SignDocAttachment ( )
inline

Constructor.

SignDocAttachment ( const SignDocAttachment aSource)
inline

Copy constructor.

Parameters
[in]aSourceThe object to be copied.
~SignDocAttachment ( )
inline

Destructor.

SignDocAttachment ( SIGNDOC_Attachment *  aP)
inline

Internal function.

Member Function Documentation

int getCompressedSize ( ) const
inline

Get the compressed size (in octets) of the attachment.

Returns
The compressed size (in octets) of the attachment.
See also
getSize()
const char * getCreationTime ( ) const
inline

Get the creation time and date of the attachment.

The returned string will be empty if the creation time and date are missing.

ISO 8601 format is used: yyyy-mm-ddThh:mm:ss, optionally followed by a timezone: Z, +hh:mm, or -hh:mm.

The PDF reference is ambiguous; apparently, the creation time is supposed to be the time and date at which the attachment was the PDF document. Changing the description does not update the modification date/time.

Returns
The creation time and date of the attachment. This pointer will become invalid when this object is destroyed.
See also
getModificationTime()
std::string getDescription ( Encoding  aEncoding) const
inline

Get the description of the attachment.

The returned string will be empty if the description is missing.

This function throws std::runtime_error if the description cannot be represented using the specified encoding.

Parameters
[in]aEncodingThe encoding to be used for the return value.
Returns
The description of the attachment.
See also
getDescriptionUTF8()
const char * getDescriptionUTF8 ( ) const
inline

Get the description of the attachment as UTF-8-encoded C string.

The returned string will be empty if the description is missing.

Returns
The description of the attachment. This pointer will become invalid when this object is destroyed.
See also
getDescription()
std::string getFileName ( Encoding  aEncoding) const
inline

Get the file name of the attachment.

This function throws std::runtime_error if the file name cannot be represented using the specified encoding.

Parameters
[in]aEncodingThe encoding to be used for the return value.
Returns
The file name of the attachment.
See also
getFileNameUTF8()
const char * getFileNameUTF8 ( ) const
inline

Get the file name of the attachment as UTF-8-encoded C string.

Returns
The file name of the attachment. This pointer will become invalid when this object is destroyed.
See also
getFileName()
SIGNDOC_Attachment* getImpl ( )
inline

Internal function.

const SIGNDOC_Attachment* getImpl ( ) const
inline

Internal function.

const char * getModificationTime ( ) const
inline

Get the time and date of the last modification of the attachment.

Setting the time and date of the last modification of the attachment is optional. The returned string will be empty if the modification time and date are missing.

ISO 8601 format is used: yyyy-mm-ddThh:mm:ss, optionally followed by a timezone: Z, +hh:mm, or -hh:mm.

The PDF reference is ambiguous; apparently, the modification time is supposed to be the time and date of the last modification of the file at the time it was attached. Changing the description does not update the modification date/time.

Returns
The time and date of the last modification of the attachment. This pointer will become invalid when this object is destroyed.
std::string getName ( Encoding  aEncoding) const
inline

Get the name of the attachment.

This function throws std::runtime_error if the name cannot be represented using the specified encoding.

Parameters
[in]aEncodingThe encoding to be used for the return value.
Returns
The name of the attachment.
See also
getNameUTF8()
const char * getNameUTF8 ( ) const
inline

Get the name of the attachment as UTF-8-encoded C string.

Returns
The name of the attachment. This pointer will become invalid when this object is destroyed.
See also
getName()
int getSize ( ) const
inline

Get the size (in octets) of the attachment.

The return value is -1 if the size of the attachment is not readily available.

Returns
The size (in octets) of the attachment or -1.
See also
getCompressedSize()
const char * getType ( ) const
inline

Get the MIME type of the attachment.

The return string will be empty if the MIME type is missing.

Returns
The MIME type of the attachment. This pointer will become invalid when this object is destroyed.
SignDocAttachment & operator= ( const SignDocAttachment aSource)
inline

Assignment operator.

Parameters
[in]aSourceThe source object.
Returns
This object.
void setImpl ( SIGNDOC_Attachment *  aP)
inline

Internal function.

void swap ( SignDocAttachment aOther)
inline

Efficiently swap this object with another one.

Parameters
[in]aOtherThe other object.

The documentation for this class was generated from the following file: