SignDoc SDK (C)  5.0.0
SIGNDOC_Attachment Class Reference

Output of SIGNDOC_Document_getAttachment(). More...

#include <SignDocSDK-c.h>

Public Member Functions

struct SIGNDOC_AttachmentSIGNDOC_Attachment_new (struct SIGNDOC_Exception **aEx)
 SIGNDOC_Attachment constructor. More...
 
struct SIGNDOC_AttachmentSIGNDOC_Attachment_clone (struct SIGNDOC_Exception **aEx, const struct SIGNDOC_Attachment *aSource)
 Clone a SIGNDOC_Attachment object. More...
 
void SIGNDOC_Attachment_delete (struct SIGNDOC_Attachment *aObj)
 SIGNDOC_Attachment destructor. More...
 
void SIGNDOC_Attachment_assign (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Attachment *aObj, const struct SIGNDOC_Attachment *aSource)
 SIGNDOC_Attachment assignment operator. More...
 
char * SIGNDOC_Attachment_getName (struct SIGNDOC_Exception **aEx, const struct SIGNDOC_Attachment *aObj, int aEncoding)
 Get the name of the attachment. More...
 
const char * SIGNDOC_Attachment_getNameUTF8 (struct SIGNDOC_Exception **aEx, const struct SIGNDOC_Attachment *aObj)
 Get the name of the attachment as UTF-8-encoded C string. More...
 
char * SIGNDOC_Attachment_getFileName (struct SIGNDOC_Exception **aEx, const struct SIGNDOC_Attachment *aObj, int aEncoding)
 Get the file name of the attachment. More...
 
const char * SIGNDOC_Attachment_getFileNameUTF8 (struct SIGNDOC_Exception **aEx, const struct SIGNDOC_Attachment *aObj)
 Get the file name of the attachment as UTF-8-encoded C string. More...
 
char * SIGNDOC_Attachment_getDescription (struct SIGNDOC_Exception **aEx, const struct SIGNDOC_Attachment *aObj, int aEncoding)
 Get the description of the attachment. More...
 
const char * SIGNDOC_Attachment_getDescriptionUTF8 (struct SIGNDOC_Exception **aEx, const struct SIGNDOC_Attachment *aObj)
 Get the description of the attachment as UTF-8-encoded C string. More...
 
int SIGNDOC_Attachment_getSize (struct SIGNDOC_Exception **aEx, const struct SIGNDOC_Attachment *aObj)
 Get the size (in octets) of the attachment. More...
 
int SIGNDOC_Attachment_getCompressedSize (struct SIGNDOC_Exception **aEx, const struct SIGNDOC_Attachment *aObj)
 Get the compressed size (in octets) of the attachment. More...
 
const char * SIGNDOC_Attachment_getType (struct SIGNDOC_Exception **aEx, const struct SIGNDOC_Attachment *aObj)
 Get the MIME type of the attachment. More...
 
const char * SIGNDOC_Attachment_getCreationTime (struct SIGNDOC_Exception **aEx, const struct SIGNDOC_Attachment *aObj)
 Get the creation time and date of the attachment. More...
 
const char * SIGNDOC_Attachment_getModificationTime (struct SIGNDOC_Exception **aEx, const struct SIGNDOC_Attachment *aObj)
 Get the time and date of the last modification of the attachment. More...
 

Detailed Description

Member Function Documentation

void SIGNDOC_Attachment_assign ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Attachment aObj,
const struct SIGNDOC_Attachment aSource 
)

SIGNDOC_Attachment assignment operator.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Attachment object.
[in]aSourceA pointer to the source SIGNDOC_Attachment object.
struct SIGNDOC_Attachment * SIGNDOC_Attachment_clone ( struct SIGNDOC_Exception **  aEx,
const struct SIGNDOC_Attachment aSource 
)

Clone a SIGNDOC_Attachment object.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aSourceA pointer to the SIGNDOC_Attachment object.
Returns
A pointer to the new SIGNDOC_Attachment object.
void SIGNDOC_Attachment_delete ( struct SIGNDOC_Attachment aObj)

SIGNDOC_Attachment destructor.

Parameters
[in]aObjA pointer to the SIGNDOC_Attachment object.
int SIGNDOC_Attachment_getCompressedSize ( struct SIGNDOC_Exception **  aEx,
const struct SIGNDOC_Attachment aObj 
)

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

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Attachment object.
Returns
The compressed size (in octets) of the attachment.
See also
SIGNDOC_Attachment_getSize()
const char * SIGNDOC_Attachment_getCreationTime ( struct SIGNDOC_Exception **  aEx,
const struct SIGNDOC_Attachment aObj 
)

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.

Note
Do not call SIGNDOC_free() on the return value.
Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Attachment object.
Returns
The creation time and date of the attachment. This pointer will become invalid when aObj is destroyed.
See also
SIGNDOC_Attachment_getModificationTime()
char * SIGNDOC_Attachment_getDescription ( struct SIGNDOC_Exception **  aEx,
const struct SIGNDOC_Attachment aObj,
int  aEncoding 
)

Get the description of the attachment.

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

This function throws an exception of type SIGNDOC_EXCEPTION_TYPE_SPOOC_ENCODING_ERROR if the description cannot be represented using the specified encoding.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Attachment object.
[in]aEncodingThe encoding to be used for the return value (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1).
Returns
The description of the attachment. The string must be freed with SIGNDOC_free().
See also
SIGNDOC_Attachment_getDescriptionUTF8()
const char * SIGNDOC_Attachment_getDescriptionUTF8 ( struct SIGNDOC_Exception **  aEx,
const struct SIGNDOC_Attachment aObj 
)

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

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

Note
Do not call SIGNDOC_free() on the return value.
Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Attachment object.
Returns
The description of the attachment. This pointer will become invalid when aObj is destroyed.
See also
SIGNDOC_Attachment_getDescription()
char * SIGNDOC_Attachment_getFileName ( struct SIGNDOC_Exception **  aEx,
const struct SIGNDOC_Attachment aObj,
int  aEncoding 
)

Get the file name of the attachment.

This function throws an exception of type SIGNDOC_EXCEPTION_TYPE_SPOOC_ENCODING_ERROR if the file name cannot be represented using the specified encoding.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Attachment object.
[in]aEncodingThe encoding to be used for the return value (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1).
Returns
The file name of the attachment. The string must be freed with SIGNDOC_free().
See also
SIGNDOC_Attachment_getFileNameUTF8()
const char * SIGNDOC_Attachment_getFileNameUTF8 ( struct SIGNDOC_Exception **  aEx,
const struct SIGNDOC_Attachment aObj 
)

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

Note
Do not call SIGNDOC_free() on the return value.
Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Attachment object.
Returns
The file name of the attachment. This pointer will become invalid when aObj is destroyed.
See also
SIGNDOC_Attachment_getFileName()
const char * SIGNDOC_Attachment_getModificationTime ( struct SIGNDOC_Exception **  aEx,
const struct SIGNDOC_Attachment aObj 
)

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.

Note
Do not call SIGNDOC_free() on the return value.
Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Attachment object.
Returns
The time and date of the last modification of the attachment. This pointer will become invalid when aObj is destroyed.
char * SIGNDOC_Attachment_getName ( struct SIGNDOC_Exception **  aEx,
const struct SIGNDOC_Attachment aObj,
int  aEncoding 
)

Get the name of the attachment.

This function throws an exception of type SIGNDOC_EXCEPTION_TYPE_SPOOC_ENCODING_ERROR if the name cannot be represented using the specified encoding.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Attachment object.
[in]aEncodingThe encoding to be used for the return value. (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1).
Returns
The name of the attachment. The string must be freed with SIGNDOC_free().
See also
SIGNDOC_Attachment_getNameUTF8()
const char * SIGNDOC_Attachment_getNameUTF8 ( struct SIGNDOC_Exception **  aEx,
const struct SIGNDOC_Attachment aObj 
)

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

Note
Do not call SIGNDOC_free() on the return value.
Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Attachment object.
Returns
The name of the attachment. This pointer will become invalid when aObj is destroyed.
See also
SIGNDOC_Attachment_getName()
int SIGNDOC_Attachment_getSize ( struct SIGNDOC_Exception **  aEx,
const struct SIGNDOC_Attachment aObj 
)

Get the size (in octets) of the attachment.

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

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Attachment object.
Returns
The size (in octets) of the attachment or -1.
See also
SIGNDOC_Attachment_getCompressedSize()
const char * SIGNDOC_Attachment_getType ( struct SIGNDOC_Exception **  aEx,
const struct SIGNDOC_Attachment aObj 
)

Get the MIME type of the attachment.

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

Note
Do not call SIGNDOC_free() on the return value.
Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Attachment object.
Returns
The MIME type of the attachment. This pointer will become invalid when aObj is destroyed.
struct SIGNDOC_Attachment * SIGNDOC_Attachment_new ( struct SIGNDOC_Exception **  aEx)

SIGNDOC_Attachment constructor.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
Returns
A pointer to the new SIGNDOC_Attachment object.

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