include/alp/postal_folder.h File Reference


Detailed Description

Folders management APIs.

#include <alp/postal_types.h>
#include <alp/postal_envelope.h>
#include <alp/postal_search.h>

Go to the source code of this file.

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.


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

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