Folder
[Protocol Common Services]


Detailed Description

Common Folder APIs.


POSTAL FOLDER STATUS

Defines the account status provided by the ALP_POSTAL_NOTIFICATION_FOLDER_STATUS_CHANGE notification callback.

#define ALP_POSTAL_FOLDER_CONTENT_UPDATED   ALP_POSTAL_FOLDER_STATUS(ALP_POSTAL_SERVICE_ID_COMMON, 6)
 The content of the folder has been updated (Note: the notification won't be received for the child folders).
#define ALP_POSTAL_FOLDER_STATUS_CREATED   ALP_POSTAL_FOLDER_STATUS(ALP_POSTAL_SERVICE_ID_COMMON, 1)
 The folder has been created.
#define ALP_POSTAL_FOLDER_STATUS_DELETED   ALP_POSTAL_FOLDER_STATUS(ALP_POSTAL_SERVICE_ID_COMMON, 3)
 The folder has been deleted (Note: the notification won't be received for the child folders).
#define ALP_POSTAL_FOLDER_STATUS_EMPTIED   ALP_POSTAL_FOLDER_STATUS(ALP_POSTAL_SERVICE_ID_COMMON, 5)
 The folder has been emptied (Note: the notification won't be received for the child folders).
#define ALP_POSTAL_FOLDER_STATUS_MOVED   ALP_POSTAL_FOLDER_STATUS(ALP_POSTAL_SERVICE_ID_COMMON, 4)
 The folder has been moved (Note: the notification won't be received for the child folders).
#define ALP_POSTAL_FOLDER_STATUS_UPDATED   ALP_POSTAL_FOLDER_STATUS(ALP_POSTAL_SERVICE_ID_COMMON, 2)
 The folder has been updated (e.g: a property value of the folder has been changed).

POSTAL FOLDER NOTIFICATIONS

Defines folder notifications.

#define ALP_POSTAL_NOTIFICATION_FOLDER_STATUS_CHANGE   ALP_POSTAL_NOTIFICATION(ALP_POSTAL_SERVICE_ID_COMMON, ALP_POSTAL_SERVICE_CLASS_ID_FOLDER, 1)
 folder status change.

POSTAL FOLDER PROPERTIES

Defines folder properties.

#define ALP_POSTAL_PROPERTY_FOLDER_CAPABILITIES   ALP_POSTAL_PROPERTY(ALP_POSTAL_SERVICE_ID_COMMON, ALP_POSTAL_SERVICE_CLASS_ID_FOLDER, ALP_POSTAL_PROPERTY_TYPE_INT, 4)
 The folder capabilities.
#define ALP_POSTAL_PROPERTY_FOLDER_EXISTS_COUNT   ALP_POSTAL_PROPERTY(ALP_POSTAL_SERVICE_ID_COMMON, ALP_POSTAL_SERVICE_CLASS_ID_FOLDER, ALP_POSTAL_PROPERTY_TYPE_INT, 8)
 The number of email which exists in a server (for IMAP).
#define ALP_POSTAL_PROPERTY_FOLDER_ID   ALP_POSTAL_PROPERTY_READ_ONLY(ALP_POSTAL_SERVICE_ID_COMMON, ALP_POSTAL_SERVICE_CLASS_ID_FOLDER, ALP_POSTAL_PROPERTY_TYPE_INT, 2)
 The folder storage identifer.
#define ALP_POSTAL_PROPERTY_FOLDER_MARKED_FOR_DELETION   ALP_POSTAL_PROPERTY(ALP_POSTAL_SERVICE_ID_COMMON, ALP_POSTAL_SERVICE_CLASS_ID_FOLDER, ALP_POSTAL_PROPERTY_TYPE_BOOLEAN, 7)
 The folder marked for deletion.
#define ALP_POSTAL_PROPERTY_FOLDER_NAME   ALP_POSTAL_PROPERTY(ALP_POSTAL_SERVICE_ID_COMMON, ALP_POSTAL_SERVICE_CLASS_ID_FOLDER, ALP_POSTAL_PROPERTY_TYPE_C_STRING, 1)
 The name of a folder.
#define ALP_POSTAL_PROPERTY_FOLDER_NEXT_UID   ALP_POSTAL_PROPERTY(ALP_POSTAL_SERVICE_ID_COMMON, ALP_POSTAL_SERVICE_CLASS_ID_FOLDER, ALP_POSTAL_PROPERTY_TYPE_INT, 9)
 The next UID (for IMAP).
#define ALP_POSTAL_PROPERTY_FOLDER_SERVER_ID   ALP_POSTAL_PROPERTY(ALP_POSTAL_SERVICE_ID_COMMON, ALP_POSTAL_SERVICE_CLASS_ID_FOLDER, ALP_POSTAL_PROPERTY_TYPE_INT, 10)
 The folder ID in server (for IMAP UID-validity).
#define ALP_POSTAL_PROPERTY_FOLDER_SERVER_NAME   ALP_POSTAL_PROPERTY(ALP_POSTAL_SERVICE_ID_COMMON, ALP_POSTAL_SERVICE_CLASS_ID_FOLDER, ALP_POSTAL_PROPERTY_TYPE_C_STRING, 5)
 The folder name on the server. When ALP_POSTAL_PROPERTY_FOLDER_TYPE is ALP_POSTAL_SPECIAL_FOLDER_ROOT in the case of IMAP, the path of ROOT MAILBOX is stored in this property.
#define ALP_POSTAL_PROPERTY_FOLDER_SUBSCRIBED   ALP_POSTAL_PROPERTY(ALP_POSTAL_SERVICE_ID_COMMON, ALP_POSTAL_SERVICE_CLASS_ID_FOLDER, ALP_POSTAL_PROPERTY_TYPE_BOOLEAN, 6)
 The folder subscribed.
#define ALP_POSTAL_PROPERTY_FOLDER_TYPE   ALP_POSTAL_PROPERTY(ALP_POSTAL_SERVICE_ID_COMMON, ALP_POSTAL_SERVICE_CLASS_ID_FOLDER, ALP_POSTAL_PROPERTY_TYPE_INT, 3)
 The folder type.

SPECIAL POSTAL FOLDER TYPES

Defines Folder Types.

#define ALP_POSTAL_SPECIAL_FOLDER_DRAFT   ((alp_postal_folder_type_t)4)
 Draft.
#define ALP_POSTAL_SPECIAL_FOLDER_INBOX   ((alp_postal_folder_type_t)1)
 Inbox.
#define ALP_POSTAL_SPECIAL_FOLDER_OUTBOX   ((alp_postal_folder_type_t)2)
 Outbox.
#define ALP_POSTAL_SPECIAL_FOLDER_REMOTE   ((alp_postal_folder_type_t)9)
 Remote - a folder on the Server.
#define ALP_POSTAL_SPECIAL_FOLDER_REMOTE_ROOT   ((alp_postal_folder_type_t)8)
 Remote Root: the root folder that contains a list of folders on the Server.
#define ALP_POSTAL_SPECIAL_FOLDER_ROOT   ((alp_postal_folder_type_t)0)
 Root.
#define ALP_POSTAL_SPECIAL_FOLDER_SAVED   ((alp_postal_folder_type_t)13)
 Saved.
#define ALP_POSTAL_SPECIAL_FOLDER_SENT   ((alp_postal_folder_type_t)3)
 Sent.
#define ALP_POSTAL_SPECIAL_FOLDER_SIM   ((alp_postal_folder_type_t)10)
 SIM folder.
#define ALP_POSTAL_SPECIAL_FOLDER_SPAM   ((alp_postal_folder_type_t)6)
 Spam.
#define ALP_POSTAL_SPECIAL_FOLDER_TEMPLATE   ((alp_postal_folder_type_t)5)
 Template.
#define ALP_POSTAL_SPECIAL_FOLDER_TMP   ((alp_postal_folder_type_t)11)
 Temporary - Internal use only.
#define ALP_POSTAL_SPECIAL_FOLDER_TRASH   ((alp_postal_folder_type_t)7)
 Trash.
#define ALP_POSTAL_SPECIAL_FOLDER_USER   ((alp_postal_folder_type_t)12)
 User.

Defines

#define ALP_POSTAL_FOLDER_INVALID_ID   ((alp_postal_folder_id_t)ALP_POSTAL_INVALID_OBJECT_ID)
 Invalid Account ID definition.
#define ALP_POSTAL_FOLDER_STATUS(service_id, status_id)
 Define a FOLDER STATUS CHANGE notification.

Typedefs

typedef uint32_t alp_postal_folder_status_t
 Folder status type.
typedef uint32_t alp_postal_folder_type_t
 Folder Types type.
typedef _AlpPostalPropertyList AlpPostalFolder
 AlpPostalFolder.
typedef void(* AlpPostalNotificationFolderStatusChangeCallback )(alp_postal_service_id_t iServiceId, alp_postal_account_id_t iAccountId, alp_postal_folder_id_t iFolderId, alp_postal_folder_status_t iFolderStatus)
 Postal Folder status change Notification Callback.

Functions

alp_status_t alp_postal_folder_copy (alp_postal_service_id_t iServiceId, alp_postal_folder_id_t iFolderId, alp_postal_folder_id_t iDestFolderId, alp_postal_folder_id_t *oNewFolderIdP)
 Copy a folder into another.
alp_status_t alp_postal_folder_copy_envelope_to (alp_postal_service_id_t iServiceId, alp_postal_folder_id_t iDestFolderId, alp_postal_envelope_id_t iEnvelopeId, alp_postal_envelope_id_t *oCopiedEnvelopeIdP)
 Copy a stored envelope into another folder.
alp_status_t alp_postal_folder_create (alp_postal_service_id_t iServiceId, alp_postal_folder_id_t iParentFolderId, AlpPostalFolder *iFolderP, alp_postal_folder_id_t *oFolderIdP)
 Create a new folder into the given one.
alp_status_t alp_postal_folder_delete (alp_postal_service_id_t iServiceId, alp_postal_folder_id_t iFolderId)
 Delete the given folder Id and its content.
alp_status_t alp_postal_folder_envelope_init_enumerator (AlpPostalEnumerator *iEnumeratorP)
 Initialize an envelope enumerator. MUST be called before alp_postal_folder_get_envelope_enumerator API.
alp_status_t alp_postal_folder_envelope_release_enumerator (AlpPostalEnumerator *iEnumeratorP)
 free datas into the enumerator and release it, must be called when data access is over.
alp_status_t alp_postal_folder_free (AlpPostalFolder *iFolderP)
 Free the given Folder.
alp_status_t alp_postal_folder_get (alp_postal_service_id_t iServiceId, alp_postal_folder_id_t iFolderId, AlpPostalFolder *oFolderP)
 Get the folder properties list of a stored Postal Folder.
alp_status_t alp_postal_folder_get_envelope_count (alp_postal_service_id_t iServiceId, alp_postal_folder_id_t iFolderId, uint32_t *oEnvelopeCountP)
 Get the number of envelopes located in the specifier folder.
alp_status_t alp_postal_folder_get_envelope_enumerator (alp_postal_service_id_t iServiceId, alp_postal_folder_id_t iFolderId, AlpPostalEnvelope *iEnvelopeP, alp_postal_address_class_t iAddressMask, bool iGetBodyparts, AlpPostalSearchNode *iFilterP, AlpPostalSortCriteria *iSortInfoP, AlpPostalEnumerator *oEnvelopeEnumeratorP)
 Get an enumerator of envelopes stored into a folder.
alp_status_t alp_postal_folder_get_envelope_enumerator_index (AlpPostalEnumerator *iEnvelopeEnumeratorP, alp_postal_envelope_id_t iEnvelopeId, uint32_t *oIndexP)
 Return index of the given envelope identifer into the given envelope enumerator.
alp_status_t alp_postal_folder_get_folder_enumerator (alp_postal_service_id_t iServiceId, alp_postal_folder_id_t iFolderId, AlpPostalEnumerator *oFolderEnumeratorP)
 Get an enumerator of childen folders on a folder.
alp_status_t alp_postal_folder_get_id (AlpPostalFolder *iFolderP, alp_postal_folder_id_t *oFolderIdP)
 Get the id of a folder structure provided by the server, otherwise id won't exist.
alp_status_t alp_postal_folder_get_next_envelope (AlpPostalEnumerator *iEnvelopeEnumeratorP, AlpPostalEnvelope *oEnvelopeP)
 Return the envelope structure for the current position and increment it.
alp_status_t alp_postal_folder_get_next_folder (AlpPostalEnumerator *iFolderEnumeratorP, AlpPostalFolder *oFolderP)
 Return the folder structure for the current position of the enumerator and increment it.
alp_status_t alp_postal_folder_get_property (AlpPostalFolder *iFolderP, alp_postal_property_id_t iPropertyId, AlpPostalProperty **oFolderPropertyP)
 Retrieve a property from a Postal Folder.
alp_status_t alp_postal_folder_get_size (alp_postal_service_id_t iServiceId, alp_postal_folder_id_t iFolderId, uint32_t *oFolderSizeP)
 Get the size in bytes of all envelope's bodyparts contained into the folder and its sub-folders.
alp_status_t alp_postal_folder_get_special_folder_name (alp_postal_folder_type_t iFolderType, char **oFolderNameStrP)
 Return the name of a special folder (e.g: "Inbox").
alp_status_t alp_postal_folder_get_unread_envelope_count (alp_postal_service_id_t iServiceId, alp_postal_folder_id_t iFolderId, uint32_t *oEnvelopeCountP)
 Get the number of unread envelopes located in the specifier folder.
alp_status_t alp_postal_folder_init (AlpPostalFolder *iFolderP)
 Initialize an folder. MUST be called before use.
alp_status_t alp_postal_folder_init_folder_enumerator (AlpPostalEnumerator *iEnumeratorP)
 Initialize a folder enumerator. MUST be called before alp_postal_folder_get_folder_enumerator API.
alp_status_t alp_postal_folder_make_empty (alp_postal_service_id_t iServiceId, alp_postal_folder_id_t iFolderId)
 Remove all the stored envelope located in the given folder Id.
alp_status_t alp_postal_folder_move (alp_postal_service_id_t iServiceId, alp_postal_folder_id_t iFolderId, alp_postal_folder_id_t iDestFolderId)
 Move a folder and its content to another.
alp_status_t alp_postal_folder_move_all_envelopes_to (alp_postal_service_id_t iServiceId, alp_postal_folder_id_t iSrcFolder, alp_postal_folder_id_t iDestFolderId)
 Move all envelope from src folder to dest folder.
alp_status_t alp_postal_folder_move_envelope_to (alp_postal_service_id_t iServiceId, alp_postal_folder_id_t iDestFolderId, alp_postal_envelope_id_t iEnvelopeId)
 Move a stored envelope to another folder.
alp_status_t alp_postal_folder_release_folder_enumerator (AlpPostalEnumerator *iEnumeratorP)
 free datas into the enumerator and release it, must be called when data access is over.
alp_status_t alp_postal_folder_save_envelope (alp_postal_service_id_t iServiceId, alp_postal_folder_id_t iFolderId, AlpPostalEnvelope *iEnvelopeP, alp_postal_envelope_id_t *oEnvelopeIdP)
 Store an envelope into a folder.
alp_status_t alp_postal_folder_set_property (AlpPostalFolder *ioFolderP, alp_postal_property_id_t iFolderPropertyId, alp_postal_property_const_value_t iFolderPropertyDataP, uint16_t iFolderPropertyDataSize)
 Set a property to a Postal Folder.
alp_status_t alp_postal_folder_update (alp_postal_service_id_t iServiceId, alp_postal_folder_id_t iFolderId, AlpPostalFolder *iFolderP)
 Update an existing folder.


Define Documentation

#define ALP_POSTAL_FOLDER_CONTENT_UPDATED   ALP_POSTAL_FOLDER_STATUS(ALP_POSTAL_SERVICE_ID_COMMON, 6)
 

The content of the folder has been updated (Note: the notification won't be received for the child folders).

#define ALP_POSTAL_FOLDER_INVALID_ID   ((alp_postal_folder_id_t)ALP_POSTAL_INVALID_OBJECT_ID)
 

Invalid Account ID definition.

#define ALP_POSTAL_FOLDER_STATUS service_id,
status_id   ) 
 

Value:

Define a FOLDER STATUS CHANGE notification.

#define ALP_POSTAL_FOLDER_STATUS_CREATED   ALP_POSTAL_FOLDER_STATUS(ALP_POSTAL_SERVICE_ID_COMMON, 1)
 

The folder has been created.

#define ALP_POSTAL_FOLDER_STATUS_DELETED   ALP_POSTAL_FOLDER_STATUS(ALP_POSTAL_SERVICE_ID_COMMON, 3)
 

The folder has been deleted (Note: the notification won't be received for the child folders).

#define ALP_POSTAL_FOLDER_STATUS_EMPTIED   ALP_POSTAL_FOLDER_STATUS(ALP_POSTAL_SERVICE_ID_COMMON, 5)
 

The folder has been emptied (Note: the notification won't be received for the child folders).

#define ALP_POSTAL_FOLDER_STATUS_MOVED   ALP_POSTAL_FOLDER_STATUS(ALP_POSTAL_SERVICE_ID_COMMON, 4)
 

The folder has been moved (Note: the notification won't be received for the child folders).

#define ALP_POSTAL_FOLDER_STATUS_UPDATED   ALP_POSTAL_FOLDER_STATUS(ALP_POSTAL_SERVICE_ID_COMMON, 2)
 

The folder has been updated (e.g: a property value of the folder has been changed).

#define ALP_POSTAL_NOTIFICATION_FOLDER_STATUS_CHANGE   ALP_POSTAL_NOTIFICATION(ALP_POSTAL_SERVICE_ID_COMMON, ALP_POSTAL_SERVICE_CLASS_ID_FOLDER, 1)
 

folder status change.

#define ALP_POSTAL_PROPERTY_FOLDER_CAPABILITIES   ALP_POSTAL_PROPERTY(ALP_POSTAL_SERVICE_ID_COMMON, ALP_POSTAL_SERVICE_CLASS_ID_FOLDER, ALP_POSTAL_PROPERTY_TYPE_INT, 4)
 

The folder capabilities.

#define ALP_POSTAL_PROPERTY_FOLDER_EXISTS_COUNT   ALP_POSTAL_PROPERTY(ALP_POSTAL_SERVICE_ID_COMMON, ALP_POSTAL_SERVICE_CLASS_ID_FOLDER, ALP_POSTAL_PROPERTY_TYPE_INT, 8)
 

The number of email which exists in a server (for IMAP).

#define ALP_POSTAL_PROPERTY_FOLDER_ID   ALP_POSTAL_PROPERTY_READ_ONLY(ALP_POSTAL_SERVICE_ID_COMMON, ALP_POSTAL_SERVICE_CLASS_ID_FOLDER, ALP_POSTAL_PROPERTY_TYPE_INT, 2)
 

The folder storage identifer.

#define ALP_POSTAL_PROPERTY_FOLDER_MARKED_FOR_DELETION   ALP_POSTAL_PROPERTY(ALP_POSTAL_SERVICE_ID_COMMON, ALP_POSTAL_SERVICE_CLASS_ID_FOLDER, ALP_POSTAL_PROPERTY_TYPE_BOOLEAN, 7)
 

The folder marked for deletion.

#define ALP_POSTAL_PROPERTY_FOLDER_NAME   ALP_POSTAL_PROPERTY(ALP_POSTAL_SERVICE_ID_COMMON, ALP_POSTAL_SERVICE_CLASS_ID_FOLDER, ALP_POSTAL_PROPERTY_TYPE_C_STRING, 1)
 

The name of a folder.

#define ALP_POSTAL_PROPERTY_FOLDER_NEXT_UID   ALP_POSTAL_PROPERTY(ALP_POSTAL_SERVICE_ID_COMMON, ALP_POSTAL_SERVICE_CLASS_ID_FOLDER, ALP_POSTAL_PROPERTY_TYPE_INT, 9)
 

The next UID (for IMAP).

#define ALP_POSTAL_PROPERTY_FOLDER_SERVER_ID   ALP_POSTAL_PROPERTY(ALP_POSTAL_SERVICE_ID_COMMON, ALP_POSTAL_SERVICE_CLASS_ID_FOLDER, ALP_POSTAL_PROPERTY_TYPE_INT, 10)
 

The folder ID in server (for IMAP UID-validity).

#define ALP_POSTAL_PROPERTY_FOLDER_SERVER_NAME   ALP_POSTAL_PROPERTY(ALP_POSTAL_SERVICE_ID_COMMON, ALP_POSTAL_SERVICE_CLASS_ID_FOLDER, ALP_POSTAL_PROPERTY_TYPE_C_STRING, 5)
 

The folder name on the server. When ALP_POSTAL_PROPERTY_FOLDER_TYPE is ALP_POSTAL_SPECIAL_FOLDER_ROOT in the case of IMAP, the path of ROOT MAILBOX is stored in this property.

#define ALP_POSTAL_PROPERTY_FOLDER_SUBSCRIBED   ALP_POSTAL_PROPERTY(ALP_POSTAL_SERVICE_ID_COMMON, ALP_POSTAL_SERVICE_CLASS_ID_FOLDER, ALP_POSTAL_PROPERTY_TYPE_BOOLEAN, 6)
 

The folder subscribed.

#define ALP_POSTAL_PROPERTY_FOLDER_TYPE   ALP_POSTAL_PROPERTY(ALP_POSTAL_SERVICE_ID_COMMON, ALP_POSTAL_SERVICE_CLASS_ID_FOLDER, ALP_POSTAL_PROPERTY_TYPE_INT, 3)
 

The folder type.

#define ALP_POSTAL_SPECIAL_FOLDER_DRAFT   ((alp_postal_folder_type_t)4)
 

Draft.

#define ALP_POSTAL_SPECIAL_FOLDER_INBOX   ((alp_postal_folder_type_t)1)
 

Inbox.

#define ALP_POSTAL_SPECIAL_FOLDER_OUTBOX   ((alp_postal_folder_type_t)2)
 

Outbox.

#define ALP_POSTAL_SPECIAL_FOLDER_REMOTE   ((alp_postal_folder_type_t)9)
 

Remote - a folder on the Server.

#define ALP_POSTAL_SPECIAL_FOLDER_REMOTE_ROOT   ((alp_postal_folder_type_t)8)
 

Remote Root: the root folder that contains a list of folders on the Server.

#define ALP_POSTAL_SPECIAL_FOLDER_ROOT   ((alp_postal_folder_type_t)0)
 

Root.

#define ALP_POSTAL_SPECIAL_FOLDER_SAVED   ((alp_postal_folder_type_t)13)
 

Saved.

#define ALP_POSTAL_SPECIAL_FOLDER_SENT   ((alp_postal_folder_type_t)3)
 

Sent.

#define ALP_POSTAL_SPECIAL_FOLDER_SIM   ((alp_postal_folder_type_t)10)
 

SIM folder.

#define ALP_POSTAL_SPECIAL_FOLDER_SPAM   ((alp_postal_folder_type_t)6)
 

Spam.

#define ALP_POSTAL_SPECIAL_FOLDER_TEMPLATE   ((alp_postal_folder_type_t)5)
 

Template.

#define ALP_POSTAL_SPECIAL_FOLDER_TMP   ((alp_postal_folder_type_t)11)
 

Temporary - Internal use only.

#define ALP_POSTAL_SPECIAL_FOLDER_TRASH   ((alp_postal_folder_type_t)7)
 

Trash.

#define ALP_POSTAL_SPECIAL_FOLDER_USER   ((alp_postal_folder_type_t)12)
 

User.


Typedef Documentation

typedef uint32_t alp_postal_folder_status_t
 

Folder status type.

typedef uint32_t alp_postal_folder_type_t
 

Folder Types type.

typedef struct _AlpPostalPropertyList AlpPostalFolder
 

AlpPostalFolder.

typedef void(* AlpPostalNotificationFolderStatusChangeCallback)(alp_postal_service_id_t iServiceId, alp_postal_account_id_t iAccountId, alp_postal_folder_id_t iFolderId, alp_postal_folder_status_t iFolderStatus)
 

Postal Folder status change Notification Callback.

Parameters:
[in] iServiceId The serviceId that is unique among all services.
[in] iAccountId The account id.
[in] iFolderId The postal folder id which changed.
[in] iFolderStatus The new folder status.


Function Documentation

alp_status_t alp_postal_folder_copy alp_postal_service_id_t  iServiceId,
alp_postal_folder_id_t  iFolderId,
alp_postal_folder_id_t  iDestFolderId,
alp_postal_folder_id_t oNewFolderIdP
 

Copy a folder into another.

Parameters:
[in] iServiceId The serviceId that is unique among all services.
[in] iFolderId The folder Id to copy.
[in] iDestFolderId The parent folder where to copy to.
[out] oNewFolderIdP The newly created folder id.
Returns:
Returns an error code.

alp_status_t alp_postal_folder_copy_envelope_to alp_postal_service_id_t  iServiceId,
alp_postal_folder_id_t  iDestFolderId,
alp_postal_envelope_id_t  iEnvelopeId,
alp_postal_envelope_id_t oCopiedEnvelopeIdP
 

Copy a stored envelope into another folder.

Parameters:
[in] iServiceId The serviceId that is unique among all services.
[in] iDestFolderId The folder id where to copy the envelope.
[in] iEnvelopeId The stored envelope to copy.
[out] oCopiedEnvelopeIdP The Id of the copy of the envelope referenced by iEnvelopeId.
Returns:
Returns an error code.

alp_status_t alp_postal_folder_create alp_postal_service_id_t  iServiceId,
alp_postal_folder_id_t  iParentFolderId,
AlpPostalFolder iFolderP,
alp_postal_folder_id_t oFolderIdP
 

Create a new folder into the given one.

Parameters:
[in] iServiceId The serviceId that is unique among all services.
[in] iParentFolderId The folder Id to work on.
[in] iFolderP A folder Ptr.
[out] oFolderIdP The id of the created folder.
Returns:
Returns an error code.

alp_status_t alp_postal_folder_delete alp_postal_service_id_t  iServiceId,
alp_postal_folder_id_t  iFolderId
 

Delete the given folder Id and its content.

Parameters:
[in] iServiceId The serviceId that is unique among all services.
[in] iFolderId The folder Id to work on.
Returns:
Returns an error code.

alp_status_t alp_postal_folder_envelope_init_enumerator AlpPostalEnumerator iEnumeratorP  ) 
 

Initialize an envelope enumerator. MUST be called before alp_postal_folder_get_envelope_enumerator API.

Parameters:
[in] iEnumeratorP the enumerator to initialize.
Returns:
Returns an error code.

alp_status_t alp_postal_folder_envelope_release_enumerator AlpPostalEnumerator iEnumeratorP  ) 
 

free datas into the enumerator and release it, must be called when data access is over.

Parameters:
[in] iEnumeratorP the enumerator to release.
Returns:
Returns an error code.

alp_status_t alp_postal_folder_free AlpPostalFolder iFolderP  ) 
 

Free the given Folder.

Parameters:
[in] iFolderP An folder Ptr.
Returns:
Returns an error code.

alp_status_t alp_postal_folder_get alp_postal_service_id_t  iServiceId,
alp_postal_folder_id_t  iFolderId,
AlpPostalFolder oFolderP
 

Get the folder properties list of a stored Postal Folder.

Parameters:
[in] iServiceId The serviceId that is unique among all services.
[in] iFolderId The folder Id of the stored account.
[out] oFolderP The result folder property list Ptr.
Returns:
Returns an error code.

alp_status_t alp_postal_folder_get_envelope_count alp_postal_service_id_t  iServiceId,
alp_postal_folder_id_t  iFolderId,
uint32_t *  oEnvelopeCountP
 

Get the number of envelopes located in the specifier folder.

Parameters:
[in] iServiceId The serviceId that is unique among all services.
[in] iFolderId The folder Id to work on.
[out] oEnvelopeCountP The count of envelope in the folderId.
Returns:
Returns an error code.

alp_status_t alp_postal_folder_get_envelope_enumerator alp_postal_service_id_t  iServiceId,
alp_postal_folder_id_t  iFolderId,
AlpPostalEnvelope iEnvelopeP,
alp_postal_address_class_t  iAddressMask,
bool  iGetBodyparts,
AlpPostalSearchNode iFilterP,
AlpPostalSortCriteria iSortInfoP,
AlpPostalEnumerator oEnvelopeEnumeratorP
 

Get an enumerator of envelopes stored into a folder.

Parameters:
[in] iServiceId The serviceId that is unique among all services.
[in] iFolderId The folder Id to search in
[in] iEnvelopeP An envelope used as a filter for retrieved envelopes. Only property that have been setted (with any value) will be available when calling envelope_get_next. if iEnvelopeP is empty, all properties will be accessible. note that neither recipients nor bodyparts will be accessible in envelope returned by envelope_get_next. To retrieve such data, you can use envelope_get() on each retrieved envelopes and specify the datas you want.
[in] iAddressMask address classes to retrieve, or 0 for none.
[in] iGetBodyparts TRUE to retrieve bodyparts.
[in] iFilterP To filter envelopes.
[in] iSortInfoP To sort envelopes.
[out] oEnvelopeEnumeratorP A reseted enumerator on the result.
Returns:
Returns an error code.

alp_status_t alp_postal_folder_get_envelope_enumerator_index AlpPostalEnumerator iEnvelopeEnumeratorP,
alp_postal_envelope_id_t  iEnvelopeId,
uint32_t *  oIndexP
 

Return index of the given envelope identifer into the given envelope enumerator.

Parameters:
[in] iEnvelopeEnumeratorP An enumerator on a list of result.
[in] iEnvelopeId The unique identifier of the envelope for which the index into the given enumerator is wanted.
[out] oIndexP Index of the given envelope identifer into the given envelope enumerator.
Returns:
Returns an error code.

alp_status_t alp_postal_folder_get_folder_enumerator alp_postal_service_id_t  iServiceId,
alp_postal_folder_id_t  iFolderId,
AlpPostalEnumerator oFolderEnumeratorP
 

Get an enumerator of childen folders on a folder.

Parameters:
[in] iServiceId The serviceId that is unique among all services.
[in] iFolderId The folder Id to work on.
[out] oFolderEnumeratorP A reseted enumerator on the result.
Returns:
Returns an error code.

alp_status_t alp_postal_folder_get_id AlpPostalFolder iFolderP,
alp_postal_folder_id_t oFolderIdP
 

Get the id of a folder structure provided by the server, otherwise id won't exist.

Parameters:
[in] iFolderP a folder structure Ptr.
[out] oFolderIdP the unique id of the folder, 0 if it not exist.
Returns:
Returns an error code.

alp_status_t alp_postal_folder_get_next_envelope AlpPostalEnumerator iEnvelopeEnumeratorP,
AlpPostalEnvelope oEnvelopeP
 

Return the envelope structure for the current position and increment it.

Parameters:
[in] iEnvelopeEnumeratorP An enumerator on a list of result.
[out] oEnvelopeP the next envelope property list. Only the properties of the iEnvelopeP parameter of the alp_postal_folder_get_envelope_enumerator() function call will be filled. if it was empty, then all the properties will be returned.
Returns:
Returns an error code.

alp_status_t alp_postal_folder_get_next_folder AlpPostalEnumerator iFolderEnumeratorP,
AlpPostalFolder oFolderP
 

Return the folder structure for the current position of the enumerator and increment it.

Parameters:
[in] iFolderEnumeratorP An enumerator on a list of result.
[out] oFolderP the next folder property list.
Returns:
Returns an error code.

alp_status_t alp_postal_folder_get_property AlpPostalFolder iFolderP,
alp_postal_property_id_t  iPropertyId,
AlpPostalProperty **  oFolderPropertyP
 

Retrieve a property from a Postal Folder.

Parameters:
[in] iFolderP The Postal Folder in which a property must be retrieved.
[in] iPropertyId a folder property Id.
[out] oFolderPropertyP The Postal Folder property to be retrieved.
Returns:
Returns an error code.

alp_status_t alp_postal_folder_get_size alp_postal_service_id_t  iServiceId,
alp_postal_folder_id_t  iFolderId,
uint32_t *  oFolderSizeP
 

Get the size in bytes of all envelope's bodyparts contained into the folder and its sub-folders.

Parameters:
[in] iServiceId The serviceId that is unique among all services.
[in] iFolderId the unique id of the folder.
[out] oFolderSizeP the retrieved size.
Returns:
Returns an error code.

alp_status_t alp_postal_folder_get_special_folder_name alp_postal_folder_type_t  iFolderType,
char **  oFolderNameStrP
 

Return the name of a special folder (e.g: "Inbox").

Parameters:
[in] iFolderType The special folder type (see define types).
[out] oFolderNameStrP The friendly localized folder name. Heap Memory allocation is done by the call if successfull. Function caller is responsible for freeing it.
Returns:
Returns an error code.

alp_status_t alp_postal_folder_get_unread_envelope_count alp_postal_service_id_t  iServiceId,
alp_postal_folder_id_t  iFolderId,
uint32_t *  oEnvelopeCountP
 

Get the number of unread envelopes located in the specifier folder.

Parameters:
[in] iServiceId The serviceId that is unique among all services.
[in] iFolderId the folder Id to work on.
[out] oEnvelopeCountP the count of unread envelope in the folderId.
Returns:
Returns an error code.

alp_status_t alp_postal_folder_init AlpPostalFolder iFolderP  ) 
 

Initialize an folder. MUST be called before use.

Parameters:
[in] iFolderP The Postal Folder to be initialized.
Returns:
Returns an error code.

alp_status_t alp_postal_folder_init_folder_enumerator AlpPostalEnumerator iEnumeratorP  ) 
 

Initialize a folder enumerator. MUST be called before alp_postal_folder_get_folder_enumerator API.

Parameters:
[in] iEnumeratorP the enumerator to initialize.
Returns:
Returns an error code.

alp_status_t alp_postal_folder_make_empty alp_postal_service_id_t  iServiceId,
alp_postal_folder_id_t  iFolderId
 

Remove all the stored envelope located in the given folder Id.

Parameters:
[in] iServiceId The serviceId that is unique among all services.
[in] iFolderId The folder Id to work on.
Returns:
Returns an error code.

alp_status_t alp_postal_folder_move alp_postal_service_id_t  iServiceId,
alp_postal_folder_id_t  iFolderId,
alp_postal_folder_id_t  iDestFolderId
 

Move a folder and its content to another.

Parameters:
[in] iServiceId The serviceId that is unique among all services.
[in] iFolderId The folder Id to be moved.
[in] iDestFolderId The parent folder where to move to.
Returns:
Returns an error code.

alp_status_t alp_postal_folder_move_all_envelopes_to alp_postal_service_id_t  iServiceId,
alp_postal_folder_id_t  iSrcFolder,
alp_postal_folder_id_t  iDestFolderId
 

Move all envelope from src folder to dest folder.

Parameters:
[in] iServiceId The serviceId that is unique among all services.
[in] iSrcFolder The source folder id that contains the envelopes to move.
[in] iDestFolderId The folder id to move to.
Returns:
Returns an error code.

alp_status_t alp_postal_folder_move_envelope_to alp_postal_service_id_t  iServiceId,
alp_postal_folder_id_t  iDestFolderId,
alp_postal_envelope_id_t  iEnvelopeId
 

Move a stored envelope to another folder.

Parameters:
[in] iServiceId The serviceId that is unique among all services.
[in] iDestFolderId The folder id to move to.
[in] iEnvelopeId The stored envelope to move.
Returns:
POSTAL_STATUS_OK in case of success. POSTAL_STATUS_INVALID_PARAM if iDestFolderId belongs to a service different than iServiceId and iEnvelopeId is not ALP_POSTAL_ENVELOPE_TYPE_DRAFT.

alp_status_t alp_postal_folder_release_folder_enumerator AlpPostalEnumerator iEnumeratorP  ) 
 

free datas into the enumerator and release it, must be called when data access is over.

Parameters:
[in] iEnumeratorP the enumerator to release.
Returns:
Returns an error code.

alp_status_t alp_postal_folder_save_envelope alp_postal_service_id_t  iServiceId,
alp_postal_folder_id_t  iFolderId,
AlpPostalEnvelope iEnvelopeP,
alp_postal_envelope_id_t oEnvelopeIdP
 

Store an envelope into a folder.

Parameters:
[in] iServiceId The serviceId that is unique among all services.
[in] iFolderId the folder Id where to save the envelope.
[in] iEnvelopeP an envelope structure.
[out] oEnvelopeIdP the returned stored envelope unique identifier.
Returns:
Returns an error code.

alp_status_t alp_postal_folder_set_property AlpPostalFolder ioFolderP,
alp_postal_property_id_t  iFolderPropertyId,
alp_postal_property_const_value_t  iFolderPropertyDataP,
uint16_t  iFolderPropertyDataSize
 

Set a property to a Postal Folder.

Parameters:
[in,out] ioFolderP The Postal Folder in which a property must be set.
[in] iFolderPropertyId The Id of the property to be created.
[in] iFolderPropertyDataP The value of the property to be created.
[in] iFolderPropertyDataSize the size of the data, strlen+1 if it's a string
Returns:
Returns an error code.

alp_status_t alp_postal_folder_update alp_postal_service_id_t  iServiceId,
alp_postal_folder_id_t  iFolderId,
AlpPostalFolder iFolderP
 

Update an existing folder.

Parameters:
[in] iServiceId The serviceId that is unique among all services.
[in] iFolderId The folder Id to work on.
[in] iFolderP A folder Ptr.
Returns:
Returns an error code.


Generated on Wed Jul 30 07:06:43 2008 by Doxygen 1.4.6 for ALP SDK + Hiker Documentation

Copyright © 1999-2008 ACCESS CO., LTD. All rights reserved.