Session
[IMAP]


Data Structures

struct  _AlpPostalImapSessionInfoType
 IMAP session Info datatype includes some interesting information about active async IMAP sessions found with alp_postal_imap_service_get_session_info_list(). More...

IMAP session notifications

Defines notifications generated by IMAP session API's

#define ALP_POSTAL_IMAP_NOTIFICATION_SESSION_FINISHED
 Sent once when a IMAP session completes for any reason. The UI should register an AlpPostalEmailNotificationSessionFinishedCallback handler to observe these notifications.
#define ALP_POSTAL_IMAP_NOTIFICATION_SESSION_STARTING
 Sent once when a IMAP session first starts up. The UI should register an AlpPostalEmailNotificationSessionStartingCallback handler to observe these notifications.
#define ALP_POSTAL_IMAP_NOTIFICATION_SYNC_PROGRESS
 The following postal service notification is broadcast throughout the course of a IMAP sync session. It is used to give an observing application some insight into what is currently going on in the sync session so that it can update a progress dialog.

POSTAL IMAP SESSION NOTIFICATIONS

Defines notifications sent by the IMAP Session API, below

#define ALP_POSTAL_IMAP_NOTIFICATION_TYPE_IDLING_START   407
 Sent when the plugin begins to idling.
#define ALP_POSTAL_IMAP_NOTIFICATION_TYPE_OFFLINE_CMD_START   404
 Sent when the plugin starts offline command processing.
#define ALP_POSTAL_IMAP_NOTIFICATION_TYPE_SYNC_ALL_FOLDERS_START   405
 Sent when the plugin starts Sync All Folders processing.
#define ALP_POSTAL_IMAP_NOTIFICATION_TYPE_SYNC_FOLDER_START   406
 Sent when the plugin starts Sync Folder processing Param1: folder id.
#define ALP_POSTAL_IMAP_NOTIFICATION_TYPE_UPLOAD_CONTINUE   402
 Sent when the plugin sends another block of data when uploading a message to the server. Param1: current message we are sending Param2: total messages we need to send Param3: current byte we just finished sending Param4: total bytes we need to send.
#define ALP_POSTAL_IMAP_NOTIFICATION_TYPE_UPLOAD_END   403
 Sent when the plugin finishes uploading a message Param1: current message we just finished sending Param2: total messages we need to send Param3: envelope id.
#define ALP_POSTAL_IMAP_NOTIFICATION_TYPE_UPLOAD_START   401
 Sent when the plugin begins to upload a message. Param1: current message we just started sending Param2: total messages we need to send Param3: envelope id.

Typedefs

typedef void(* AlpPostalIMAPSessionIdleFolderAsyncReplyCallback )(alp_postal_session_id_t iSessiontId, alp_postal_account_id_t iAccountId, alp_status_t iRequestResult)
 Postal session IDLE Folder async response callback sent for alp_postal_imap_session_idle_folder().
typedef void(* AlpPostalIMAPSessionSendAndSyncAllFoldersAsyncReplyCallback )(alp_postal_session_id_t iSessiontId, alp_postal_account_id_t iAccountId, alp_status_t iRequestResult)
 Postal session send account async response callback sent to alp_postal_imap_session_send_and_sync_all_folders().
typedef void(* AlpPostalIMAPSessionSendAndSyncFolderAsyncReplyCallback )(alp_postal_session_id_t iSessiontId, alp_postal_account_id_t iAccountId, alp_status_t iRequestResult)
 Postal session send account async response callback sent to alp_postal_imap_session_send_and_sync_folder().
typedef void(* AlpPostalIMAPSessionSendAsyncReplyCallback )(alp_postal_session_id_t iSessiontId, alp_postal_account_id_t iAccountId, alp_status_t iRequestResult)
 Postal session send account async response callback sent to alp_postal_imap_session_send().
typedef void(* AlpPostalIMAPSessionSyncAllFoldersAsyncReplyCallback )(alp_postal_session_id_t iSessiontId, alp_postal_account_id_t iAccountId, alp_status_t iRequestResult)
 Postal session Sync All Folders async response callback sent to alp_postal_imap_session_sync_all_folders().
typedef void(* AlpPostalIMAPSessionSyncFolderAsyncReplyCallback )(alp_postal_session_id_t iSessiontId, alp_postal_account_id_t iAccountId, alp_status_t iRequestResult)
 Postal session Sync Folder async response callback sent to alp_postal_imap_session_sync_folder().
typedef void(* AlpPostalIMAPSessionValidateAccountAsyncReplyCallback )(alp_postal_session_id_t iSessiontId, alp_postal_account_id_t iAccountId, alp_status_t iRequestResult)
 Postal session validate IMAP account async response callback.

Functions

alp_status_t alp_postal_imap_session_cancel (alp_postal_session_id_t iSessionId)
 Cancel an imap session.
alp_status_t alp_postal_imap_session_idle_folder (alp_postal_session_id_t iSessionId, alp_postal_folder_id_t iFolderId, bool iManual, AlpPostalIMAPSessionIdleFolderAsyncReplyCallback iCallbackFuncP)
 receive all message. Returns results via async callback.
alp_status_t alp_postal_imap_session_send (alp_postal_session_id_t iSessionId, bool iManual, AlpPostalIMAPSessionSendAsyncReplyCallback iCallbackFuncP)
 Syncs with a SMTP server, sending messages from the Outbox and moving them to the Sent Items folder respecting any SMTP-related account properties defined in the current account.
alp_status_t alp_postal_imap_session_send_and_sync_all_folders (alp_postal_session_id_t iSessionId, bool iManual, AlpPostalIMAPSessionSendAndSyncAllFoldersAsyncReplyCallback iCallbackFuncP)
 receive all message. Returns results via async callback.
alp_status_t alp_postal_imap_session_send_and_sync_folder (alp_postal_session_id_t iSessionId, alp_postal_folder_id_t iFolderId, bool iManual, AlpPostalIMAPSessionSendAndSyncFolderAsyncReplyCallback iCallbackFuncP)
 send and receive all message. Returns results via async callback.
alp_status_t alp_postal_imap_session_sync_all_folders (alp_postal_session_id_t iSessionId, bool iManual, AlpPostalIMAPSessionSyncAllFoldersAsyncReplyCallback iCallbackFuncP)
 receive all message. Returns results via async callback.
alp_status_t alp_postal_imap_session_sync_folder (alp_postal_session_id_t iSessionId, alp_postal_account_id_t iAccountId, bool iManual, AlpPostalIMAPSessionSyncFolderAsyncReplyCallback iCallbackFuncP)
 receive all message. Returns results via async callback.
alp_status_t alp_postal_imap_session_validate_account (alp_postal_session_id_t iSessionId, AlpPostalIMAPSessionValidateAccountAsyncReplyCallback iCallbackFuncP)
 Validates IMAP account settings. Called once during account setup. Checks the IMAP account for required capabilities. Returns results via async callback.


Define Documentation

#define ALP_POSTAL_IMAP_NOTIFICATION_SESSION_FINISHED
 

Value:

Sent once when a IMAP session completes for any reason. The UI should register an AlpPostalEmailNotificationSessionFinishedCallback handler to observe these notifications.

Remarks:
This notification is needed separately from the SYNC_PROGRESS notification because the UI will be interested in knowning about new sessions anytime it is running, not just when the sync progress dialog is displayed..

#define ALP_POSTAL_IMAP_NOTIFICATION_SESSION_STARTING
 

Value:

Sent once when a IMAP session first starts up. The UI should register an AlpPostalEmailNotificationSessionStartingCallback handler to observe these notifications.

Remarks:
This notification is needed separately from the SYNC_PROGRESS notification because the UI will be interested in knowning about new sessions anytime it is running, not just when the sync progress dialog is displayed..

#define ALP_POSTAL_IMAP_NOTIFICATION_SYNC_PROGRESS
 

Value:

The following postal service notification is broadcast throughout the course of a IMAP sync session. It is used to give an observing application some insight into what is currently going on in the sync session so that it can update a progress dialog.

The UI should register an AlpPostalEmailNotificationSyncProgressCallback which is common to both this and other email plugin sync progress notifications, where the notificationType parameter given to the callback will be one of ALP_POSTAL_EMAIL_NOTIFICATION_TYPE_*, and the errors corresponding to each notification type are described above.

Remarks:
Note this notification can only be generated if the UI has called alp_postal_imap_service_enable_sync_progress_notifications(true)
With each notification, the IMAP plugin will package up the following data
  • alp_postal_session_id_t sessionId
  • alp_postal_account_id_t accountId
  • uint32_t notificationType (see ALP_POSTAL_IMAP_NOTIFICATION_TYPE_*)
  • uint32_t param1 (Example: curr message num)
  • uint32_t param2 (Example: total msgs to download)
  • uint32_t param3 (Example: curr byte num
  • uint32_t param4 (Example: total bytes to download)
  • alp_status_t err;

#define ALP_POSTAL_IMAP_NOTIFICATION_TYPE_IDLING_START   407
 

Sent when the plugin begins to idling.

#define ALP_POSTAL_IMAP_NOTIFICATION_TYPE_OFFLINE_CMD_START   404
 

Sent when the plugin starts offline command processing.

#define ALP_POSTAL_IMAP_NOTIFICATION_TYPE_SYNC_ALL_FOLDERS_START   405
 

Sent when the plugin starts Sync All Folders processing.

#define ALP_POSTAL_IMAP_NOTIFICATION_TYPE_SYNC_FOLDER_START   406
 

Sent when the plugin starts Sync Folder processing Param1: folder id.

#define ALP_POSTAL_IMAP_NOTIFICATION_TYPE_UPLOAD_CONTINUE   402
 

Sent when the plugin sends another block of data when uploading a message to the server. Param1: current message we are sending Param2: total messages we need to send Param3: current byte we just finished sending Param4: total bytes we need to send.

#define ALP_POSTAL_IMAP_NOTIFICATION_TYPE_UPLOAD_END   403
 

Sent when the plugin finishes uploading a message Param1: current message we just finished sending Param2: total messages we need to send Param3: envelope id.

#define ALP_POSTAL_IMAP_NOTIFICATION_TYPE_UPLOAD_START   401
 

Sent when the plugin begins to upload a message. Param1: current message we just started sending Param2: total messages we need to send Param3: envelope id.


Typedef Documentation

typedef void(* AlpPostalIMAPSessionIdleFolderAsyncReplyCallback)(alp_postal_session_id_t iSessiontId, alp_postal_account_id_t iAccountId, alp_status_t iRequestResult)
 

Postal session IDLE Folder async response callback sent for alp_postal_imap_session_idle_folder().

One special result is defined for this event: ALP_POSTAL_IMAP_RESULT_IDLE_FOLDER_CHANGED

Parameters:
[in] iSessionId The Postal Session id on which the request has been invoked.
[in] iAccountId The Postal Account id that was synced
[in] iRequestResult The result of the request.

typedef void(* AlpPostalIMAPSessionSendAndSyncAllFoldersAsyncReplyCallback)(alp_postal_session_id_t iSessiontId, alp_postal_account_id_t iAccountId, alp_status_t iRequestResult)
 

Postal session send account async response callback sent to alp_postal_imap_session_send_and_sync_all_folders().

Parameters:
[in] iSessionId The Postal Session id on which the request has been invoked.
[in] iAccountId The Postal Account id that was synced
[in] iRequestResult The result of the request.

typedef void(* AlpPostalIMAPSessionSendAndSyncFolderAsyncReplyCallback)(alp_postal_session_id_t iSessiontId, alp_postal_account_id_t iAccountId, alp_status_t iRequestResult)
 

Postal session send account async response callback sent to alp_postal_imap_session_send_and_sync_folder().

Parameters:
[in] iSessionId The Postal Session id on which the request has been invoked.
[in] iAccountId The Postal Account id that was synced
[in] iRequestResult The result of the request.

typedef void(* AlpPostalIMAPSessionSendAsyncReplyCallback)(alp_postal_session_id_t iSessiontId, alp_postal_account_id_t iAccountId, alp_status_t iRequestResult)
 

Postal session send account async response callback sent to alp_postal_imap_session_send().

Parameters:
[in] iSessionId The Postal Session id on which the request has been invoked.
[in] iAccountId The Postal Account id that was synced
[in] iRequestResult The result of the request.

typedef void(* AlpPostalIMAPSessionSyncAllFoldersAsyncReplyCallback)(alp_postal_session_id_t iSessiontId, alp_postal_account_id_t iAccountId, alp_status_t iRequestResult)
 

Postal session Sync All Folders async response callback sent to alp_postal_imap_session_sync_all_folders().

Parameters:
[in] iSessionId The Postal Session id on which the request has been invoked.
[in] iAccountId The Postal Account id that was synced
[in] iRequestResult The result of the request.

typedef void(* AlpPostalIMAPSessionSyncFolderAsyncReplyCallback)(alp_postal_session_id_t iSessiontId, alp_postal_account_id_t iAccountId, alp_status_t iRequestResult)
 

Postal session Sync Folder async response callback sent to alp_postal_imap_session_sync_folder().

Parameters:
[in] iSessionId The Postal Session id on which the request has been invoked.
[in] iAccountId The Postal Account id that was synced
[in] iRequestResult The result of the request.

typedef void(* AlpPostalIMAPSessionValidateAccountAsyncReplyCallback)(alp_postal_session_id_t iSessiontId, alp_postal_account_id_t iAccountId, alp_status_t iRequestResult)
 

Postal session validate IMAP account async response callback.

Parameters:
[in] iSessionId The Postal Session id on which the request has been invoked.
[in] iAccountId The Postal Account id that was validated
[in] iRequestResult The result of the request.


Function Documentation

alp_status_t alp_postal_imap_session_cancel alp_postal_session_id_t  iSessionId  ) 
 

Cancel an imap session.

Parameters:
[in] iSessionId The session Id on which the request must be cancelled.
Returns:
Returns an error code.

alp_status_t alp_postal_imap_session_idle_folder alp_postal_session_id_t  iSessionId,
alp_postal_folder_id_t  iFolderId,
bool  iManual,
AlpPostalIMAPSessionIdleFolderAsyncReplyCallback  iCallbackFuncP
 

receive all message. Returns results via async callback.

alp_postal_imap_session_idle_folder

Parameters:
[in] iSessionId The session Id to work on.
[in] iFolderId the Postal Folder id to be synced.
[in] iCallbackFuncP call back function. May be NULL??
[in] iManual The flag to set conncetion flags to foreground(if true)/background mode
Returns:
error

alp_status_t alp_postal_imap_session_send alp_postal_session_id_t  iSessionId,
bool  iManual,
AlpPostalIMAPSessionSendAsyncReplyCallback  iCallbackFuncP
 

Syncs with a SMTP server, sending messages from the Outbox and moving them to the Sent Items folder respecting any SMTP-related account properties defined in the current account.

Parameters:
[in] iSessionId The session Id to work on.
[in] iManual The flag to set conncetion flags to foreground(if true)/background mode
[in] iCallbackFuncP The call back function to be called. May be NULL if the caller doesn't care about the result value.
Returns:
Returns an error code.

alp_status_t alp_postal_imap_session_send_and_sync_all_folders alp_postal_session_id_t  iSessionId,
bool  iManual,
AlpPostalIMAPSessionSendAndSyncAllFoldersAsyncReplyCallback  iCallbackFuncP
 

receive all message. Returns results via async callback.

alp_postal_imap_session_send_and_sync_all_folders

Parameters:
[in] iSessionId The session Id to work on.
[in] iCallbackFuncP call back function. May be NULL??
[in] iManual The flag to set conncetion flags to foreground(if true)/background mode
Returns:
error

alp_status_t alp_postal_imap_session_send_and_sync_folder alp_postal_session_id_t  iSessionId,
alp_postal_folder_id_t  iFolderId,
bool  iManual,
AlpPostalIMAPSessionSendAndSyncFolderAsyncReplyCallback  iCallbackFuncP
 

send and receive all message. Returns results via async callback.

alp_postal_imap_session_send_and_sync_folder

Parameters:
[in] iSessionId The session Id to work on.
[in] iFolderId the Postal Folder id to be synced.
[in] iCallbackFuncP call back function. May be NULL??
[in] iManual The flag to set conncetion flags to foreground(if true)/background mode
Returns:
error

alp_status_t alp_postal_imap_session_sync_all_folders alp_postal_session_id_t  iSessionId,
bool  iManual,
AlpPostalIMAPSessionSyncAllFoldersAsyncReplyCallback  iCallbackFuncP
 

receive all message. Returns results via async callback.

alp_postal_imap_session_sync_all_folders

Parameters:
[in] iSessionId The session Id to work on.
[in] iCallbackFuncP call back function. May be NULL??
[in] iManual The flag to set conncetion flags to foreground(if true)/background mode
Returns:
error

alp_status_t alp_postal_imap_session_sync_folder alp_postal_session_id_t  iSessionId,
alp_postal_account_id_t  iAccountId,
bool  iManual,
AlpPostalIMAPSessionSyncFolderAsyncReplyCallback  iCallbackFuncP
 

receive all message. Returns results via async callback.

alp_postal_imap_session_sync_folder

Parameters:
[in] iSessionId The session Id to work on.
[in] iAccountId The Postal Account id to be synced.
[in] iCallbackFuncP call back function. May be NULL??
[in] iManual The flag to set conncetion flags to foreground(if true)/background mode
Returns:
error

alp_status_t alp_postal_imap_session_validate_account alp_postal_session_id_t  iSessionId,
AlpPostalIMAPSessionValidateAccountAsyncReplyCallback  iCallbackFuncP
 

Validates IMAP account settings. Called once during account setup. Checks the IMAP account for required capabilities. Returns results via async callback.

alp_postal_imap_session_validate_account

Parameters:
[in] iSessionId The session Id to work on.
[in] iCallbackFuncP call back function. May be NULL??
Returns:
error


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.