Service
[Protocol Common Services]


Detailed Description

Common Service APIs.


Data Structures

struct  _AlpPostalServiceActiveSession
 Defines an active session. More...
struct  _AlpPostalServiceActiveSessionList
 Defines a list of active session. More...

POSTAL SERVICE NOTIFICATIONS

Defines service notifications.

#define ALP_POSTAL_NOTIFICATION_SERVICE_ACTIVE_SESSION_STATUS_CHANGE   ALP_POSTAL_NOTIFICATION(ALP_POSTAL_SERVICE_ID_COMMON, ALP_POSTAL_SERVICE_CLASS_ID_SERVICE, 1)
 active session state change.

POSTAL SERVICE CAPABILITIES MASKS

Defines the Postal Service capabilities mask, that can be combined.

#define ALP_POSTAL_SERVICE_CAPABILITY_BODYPART_MULTIPART   ((alp_postal_service_capabilities_t)1<<8)
 Bodypart Multipart.
#define ALP_POSTAL_SERVICE_CAPABILITY_BODYPART_SMALL_BINARY   ((alp_postal_service_capabilities_t)1<<6)
 Bodypart Small Binary.
#define ALP_POSTAL_SERVICE_CAPABILITY_BODYPART_SMALL_TEXT   ((alp_postal_service_capabilities_t)1<<5)
 Bodypart Small Text.
#define ALP_POSTAL_SERVICE_CAPABILITY_BODYPART_URI   ((alp_postal_service_capabilities_t)1<<7)
 Bodypart URI.
#define ALP_POSTAL_SERVICE_CAPABILITY_ENVELOPE_RECIPIENT_BCC   ((alp_postal_service_capabilities_t)1<<3)
 Envelope Recipient BCC.
#define ALP_POSTAL_SERVICE_CAPABILITY_ENVELOPE_RECIPIENT_CC   ((alp_postal_service_capabilities_t)1<<2)
 Envelope Recipient CC.
#define ALP_POSTAL_SERVICE_CAPABILITY_ENVELOPE_SUBJECT   ((alp_postal_service_capabilities_t)1<<4)
 Envelope Subject.
#define ALP_POSTAL_SERVICE_CAPABILITY_MULTISESSION   ((alp_postal_service_capabilities_t)1<<1)
 Multisession Capability.
#define ALP_POSTAL_SERVICE_CAPABILITY_STORE   ((alp_postal_service_capabilities_t)1<<0)
 Store Capability.

POSTAL SERVICE CLASS IDENTIFIER DEFINITION MACRO

Macro to be used for the postal service class definition.

#define ALP_POSTAL_SERVICE_CLASS_ID(service_class_id)   ((alp_postal_service_class_id_t)service_class_id)

POSTAL SERVICE CLASSES

Defines the Postal Services classes.

#define ALP_POSTAL_SERVICE_CLASS_ID_ACCOUNT   ALP_POSTAL_SERVICE_CLASS_ID(2)
 Account.
#define ALP_POSTAL_SERVICE_CLASS_ID_ADDRESS   ALP_POSTAL_SERVICE_CLASS_ID(5)
 Address.
#define ALP_POSTAL_SERVICE_CLASS_ID_BODYPART   ALP_POSTAL_SERVICE_CLASS_ID(8)
 Bodypart.
#define ALP_POSTAL_SERVICE_CLASS_ID_CONVERSATION   ALP_POSTAL_SERVICE_CLASS_ID(11)
 Conversation.
#define ALP_POSTAL_SERVICE_CLASS_ID_ENUMERATOR   ALP_POSTAL_SERVICE_CLASS_ID(10)
 Enumerator.
#define ALP_POSTAL_SERVICE_CLASS_ID_ENVELOPE   ALP_POSTAL_SERVICE_CLASS_ID(7)
 Envelope.
#define ALP_POSTAL_SERVICE_CLASS_ID_FOLDER   ALP_POSTAL_SERVICE_CLASS_ID(3)
 Folder.
#define ALP_POSTAL_SERVICE_CLASS_ID_LOG   ALP_POSTAL_SERVICE_CLASS_ID(13)
 Log.
#define ALP_POSTAL_SERVICE_CLASS_ID_OFFICE   ALP_POSTAL_SERVICE_CLASS_ID(1)
 Office.
#define ALP_POSTAL_SERVICE_CLASS_ID_RULE   ALP_POSTAL_SERVICE_CLASS_ID(12)
 Rule.
#define ALP_POSTAL_SERVICE_CLASS_ID_SEARCH   ALP_POSTAL_SERVICE_CLASS_ID(6)
 Search.
#define ALP_POSTAL_SERVICE_CLASS_ID_SERVICE   ALP_POSTAL_SERVICE_CLASS_ID(9)
 Service.
#define ALP_POSTAL_SERVICE_CLASS_ID_SESSION   ALP_POSTAL_SERVICE_CLASS_ID(4)
 Session.

POSTAL SERVICE IDENTIFIER DEFINITION MACRO

Macro to be used for the postal service identifier definition.

#define ALP_POSTAL_SERVICE_ID(service_id)   ((alp_postal_service_id_t)service_id)

COMMON POSTAL SERVICE IDENTIFIER

Defines the default postal Service identifier. all specific services (MAIL, MMS, SMS, IMPS, etc.) define their unique identifers (their identifier must be requested to the Postal Services team).

#define ALP_POSTAL_SERVICE_ID_COMMON   ALP_POSTAL_SERVICE_ID(0)
 Default Postal Service Id.

POSTAL SERVICE CLASS LAST CLASS ID

Defines the Last Postal Services classes ID.

#define ALP_POSTAL_SERVICE_LAST_CLASS_ID   ALP_POSTAL_SERVICE_CLASS_ID_LOG
 The last class ID.

POSTAL SERVICE PROTOCOL FAMILY TYPES

Defines the Postal Services protocols family types.

#define ALP_POSTAL_SERVICE_PROTOCOL_FAMILY_IMMEDIATE   ((alp_postal_service_protocol_family_t)1)
 Immediate messaging = SMS, MMS, IM (~push mode).
#define ALP_POSTAL_SERVICE_PROTOCOL_FAMILY_MAIL   ((alp_postal_service_protocol_family_t)2)
 Standard mail (~pull mode).

Defines

#define ALP_POSTAL_SERVICE_INVALID_ID   ((alp_postal_service_id_t)-1)
 Invalid Service ID definition.

Typedefs

typedef uint32_t alp_postal_service_capabilities_t
 Postal service capabilities type.
typedef uint8_t alp_postal_service_protocol_family_t
 Service Protocol family type.
typedef uint8_t alp_postal_service_status_t
 Session status change type.
typedef uint32_t alp_postal_service_version_t
 Postal service version type.
typedef _AlpPostalServiceActiveSession AlpPostalServiceActiveSession
 Defines a active session.
typedef _AlpPostalServiceActiveSessionList AlpPostalServiceActiveSessionList
 Defines a list of active session.

Functions

alp_status_t alp_postal_service_account_init_enumerator (AlpPostalEnumerator *iEnumeratorP)
 Initialize an account enumerator.
alp_status_t alp_postal_service_account_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_service_active_session_list_release (AlpPostalServiceActiveSessionList *iActiveSessionListP)
 Release a postal services active sessions list.
alp_status_t alp_postal_service_close (alp_postal_service_id_t iServiceId)
 Close the given Postal service.
alp_status_t alp_postal_service_create_account (alp_postal_service_id_t iServiceId, AlpPostalAccount *iAccountP, alp_postal_account_id_t *oAccountIdP)
 Create an account on the given service and return its unique Id.
alp_status_t alp_postal_service_create_session (alp_postal_service_id_t iServiceId, alp_postal_account_id_t iAccountId, alp_postal_session_id_t *oSessionIdP)
 Create a new session with the given service and account and return its unique Id.
alp_status_t alp_postal_service_free_address_scheme_list (AlpPostalServiceAddressSchemeList *iAddressSchemeListP)
 Free the list of Postal services address scheme.
alp_status_t alp_postal_service_free_service_id_list (AlpPostalServiceIdList *iServiceIdListP)
 Free the list of Postal services Identifier.
alp_status_t alp_postal_service_get_account_enumerator (alp_postal_service_id_t iServiceId, AlpPostalEnumerator *oAccountEnumeratorP)
 Get an enumerator of the available account for the given service.
alp_status_t alp_postal_service_get_active_session_list (AlpPostalServiceIdList *iServiceIdListP, AlpPostalServiceActiveSessionList *oActiveSessionListP)
 Get the list of postal services active sessions with their attached application ID if any.
alp_status_t alp_postal_service_get_address_scheme_list (alp_postal_service_id_t iServiceId, AlpPostalServiceAddressSchemeList *oAddressSchemeListP)
 Return a list of supported scheme for the given service (e.g: "tel:", "mail:", "wv:").
alp_status_t alp_postal_service_get_capabilities (alp_postal_service_id_t iServiceId, alp_postal_service_capabilities_t *oServiceCapabilitiesP)
 Return the capabilities of the given services.
alp_status_t alp_postal_service_get_description (alp_postal_service_id_t iServiceId, char **oServiceDescriptionStrP)
 Return the human readable description of a service (e.g: "Short Message Service").
alp_status_t alp_postal_service_get_name (alp_postal_service_id_t iServiceId, char **oServiceNameStrP)
 Return the name of a service (e.g: "SMS").
alp_status_t alp_postal_service_get_next_account (AlpPostalEnumerator *iAccountEnumeratorP, AlpPostalAccount *oAccountP)
 Return the recipient address for the current position and increment it.
alp_status_t alp_postal_service_get_protocol_family (alp_postal_service_id_t iServiceId, alp_postal_service_protocol_family_t *oProtocolFamilyP)
 Return the protocol family of the given a service. See above for actual values ().
alp_status_t alp_postal_service_get_session_id_list (alp_postal_service_id_t iServiceId, AlpPostalSessionIdList *oSessionListP)
 Return the list of current running sessions for the service.
alp_status_t alp_postal_service_get_short_name (alp_postal_service_id_t iServiceId, char **oShortNameStrP)
 Return the short name of the given a service (e.g: "SMS").
alp_status_t alp_postal_service_get_version (alp_postal_service_id_t iServiceId, alp_postal_service_version_t *oServiceVersionP)
 Return the version of a service.
alp_status_t alp_postal_service_is_address_supported (alp_postal_service_id_t iServiceId, char *iAddressStrP, bool *oSupportedP)
 Check if a row address will be understood by the given service. e.g: john@hotmail.com for the sms service will return false.
alp_status_t alp_postal_service_open (alp_postal_service_id_t iServiceId)
 Open the given Postal service.


Define Documentation

#define ALP_POSTAL_NOTIFICATION_SERVICE_ACTIVE_SESSION_STATUS_CHANGE   ALP_POSTAL_NOTIFICATION(ALP_POSTAL_SERVICE_ID_COMMON, ALP_POSTAL_SERVICE_CLASS_ID_SERVICE, 1)
 

active session state change.

#define ALP_POSTAL_SERVICE_CAPABILITY_BODYPART_MULTIPART   ((alp_postal_service_capabilities_t)1<<8)
 

Bodypart Multipart.

#define ALP_POSTAL_SERVICE_CAPABILITY_BODYPART_SMALL_BINARY   ((alp_postal_service_capabilities_t)1<<6)
 

Bodypart Small Binary.

#define ALP_POSTAL_SERVICE_CAPABILITY_BODYPART_SMALL_TEXT   ((alp_postal_service_capabilities_t)1<<5)
 

Bodypart Small Text.

#define ALP_POSTAL_SERVICE_CAPABILITY_BODYPART_URI   ((alp_postal_service_capabilities_t)1<<7)
 

Bodypart URI.

#define ALP_POSTAL_SERVICE_CAPABILITY_ENVELOPE_RECIPIENT_BCC   ((alp_postal_service_capabilities_t)1<<3)
 

Envelope Recipient BCC.

#define ALP_POSTAL_SERVICE_CAPABILITY_ENVELOPE_RECIPIENT_CC   ((alp_postal_service_capabilities_t)1<<2)
 

Envelope Recipient CC.

#define ALP_POSTAL_SERVICE_CAPABILITY_ENVELOPE_SUBJECT   ((alp_postal_service_capabilities_t)1<<4)
 

Envelope Subject.

#define ALP_POSTAL_SERVICE_CAPABILITY_MULTISESSION   ((alp_postal_service_capabilities_t)1<<1)
 

Multisession Capability.

#define ALP_POSTAL_SERVICE_CAPABILITY_STORE   ((alp_postal_service_capabilities_t)1<<0)
 

Store Capability.

#define ALP_POSTAL_SERVICE_CLASS_ID service_class_id   )     ((alp_postal_service_class_id_t)service_class_id)
 

#define ALP_POSTAL_SERVICE_CLASS_ID_ACCOUNT   ALP_POSTAL_SERVICE_CLASS_ID(2)
 

Account.

#define ALP_POSTAL_SERVICE_CLASS_ID_ADDRESS   ALP_POSTAL_SERVICE_CLASS_ID(5)
 

Address.

#define ALP_POSTAL_SERVICE_CLASS_ID_BODYPART   ALP_POSTAL_SERVICE_CLASS_ID(8)
 

Bodypart.

#define ALP_POSTAL_SERVICE_CLASS_ID_CONVERSATION   ALP_POSTAL_SERVICE_CLASS_ID(11)
 

Conversation.

#define ALP_POSTAL_SERVICE_CLASS_ID_ENUMERATOR   ALP_POSTAL_SERVICE_CLASS_ID(10)
 

Enumerator.

#define ALP_POSTAL_SERVICE_CLASS_ID_ENVELOPE   ALP_POSTAL_SERVICE_CLASS_ID(7)
 

Envelope.

#define ALP_POSTAL_SERVICE_CLASS_ID_FOLDER   ALP_POSTAL_SERVICE_CLASS_ID(3)
 

Folder.

#define ALP_POSTAL_SERVICE_CLASS_ID_LOG   ALP_POSTAL_SERVICE_CLASS_ID(13)
 

Log.

#define ALP_POSTAL_SERVICE_CLASS_ID_OFFICE   ALP_POSTAL_SERVICE_CLASS_ID(1)
 

Office.

#define ALP_POSTAL_SERVICE_CLASS_ID_RULE   ALP_POSTAL_SERVICE_CLASS_ID(12)
 

Rule.

#define ALP_POSTAL_SERVICE_CLASS_ID_SEARCH   ALP_POSTAL_SERVICE_CLASS_ID(6)
 

Search.

#define ALP_POSTAL_SERVICE_CLASS_ID_SERVICE   ALP_POSTAL_SERVICE_CLASS_ID(9)
 

Service.

#define ALP_POSTAL_SERVICE_CLASS_ID_SESSION   ALP_POSTAL_SERVICE_CLASS_ID(4)
 

Session.

#define ALP_POSTAL_SERVICE_ID service_id   )     ((alp_postal_service_id_t)service_id)
 

#define ALP_POSTAL_SERVICE_ID_COMMON   ALP_POSTAL_SERVICE_ID(0)
 

Default Postal Service Id.

#define ALP_POSTAL_SERVICE_INVALID_ID   ((alp_postal_service_id_t)-1)
 

Invalid Service ID definition.

#define ALP_POSTAL_SERVICE_LAST_CLASS_ID   ALP_POSTAL_SERVICE_CLASS_ID_LOG
 

The last class ID.

#define ALP_POSTAL_SERVICE_PROTOCOL_FAMILY_IMMEDIATE   ((alp_postal_service_protocol_family_t)1)
 

Immediate messaging = SMS, MMS, IM (~push mode).

#define ALP_POSTAL_SERVICE_PROTOCOL_FAMILY_MAIL   ((alp_postal_service_protocol_family_t)2)
 

Standard mail (~pull mode).


Typedef Documentation

typedef uint32_t alp_postal_service_capabilities_t
 

Postal service capabilities type.

typedef uint8_t alp_postal_service_protocol_family_t
 

Service Protocol family type.

typedef uint8_t alp_postal_service_status_t
 

Session status change type.

typedef uint32_t alp_postal_service_version_t
 

Postal service version type.

typedef struct _AlpPostalServiceActiveSession AlpPostalServiceActiveSession
 

Defines a active session.

typedef struct _AlpPostalServiceActiveSessionList AlpPostalServiceActiveSessionList
 

Defines a list of active session.


Function Documentation

alp_status_t alp_postal_service_account_init_enumerator AlpPostalEnumerator iEnumeratorP  ) 
 

Initialize an account enumerator.

Parameters:
[in] iEnumeratorP the enumerator to initialize.
Returns:
Returns an error code.
Warning:
MUST be called before alp_postal_service_get_account_enumerator API.

alp_status_t alp_postal_service_account_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_service_active_session_list_release AlpPostalServiceActiveSessionList iActiveSessionListP  ) 
 

Release a postal services active sessions list.

Parameters:
[in] iActiveSessionListP,: a list of the identifiers of the services on which to retrieve the active sessions with their attached application ID if any.
Returns:
Returns an error code.

alp_status_t alp_postal_service_close alp_postal_service_id_t  iServiceId  ) 
 

Close the given Postal service.

Parameters:
[in] iServiceId The serviceId to be closed.
Returns:
Returns an error code.

alp_status_t alp_postal_service_create_account alp_postal_service_id_t  iServiceId,
AlpPostalAccount iAccountP,
alp_postal_account_id_t oAccountIdP
 

Create an account on the given service and return its unique Id.

Parameters:
[in] iServiceId The serviceId that is unique among all services.
[in] iAccountP The account to be created.
[out] oAccountIdP The created account identifier.
Returns:
Returns an error code, POSTAL_STATUS_ACCOUNT_NAME_ALREADY_EXISTS.

alp_status_t alp_postal_service_create_session alp_postal_service_id_t  iServiceId,
alp_postal_account_id_t  iAccountId,
alp_postal_session_id_t oSessionIdP
 

Create a new session with the given service and account and return its unique Id.

Parameters:
[in] iServiceId The serviceId that is unique among all services.
[in] iAccountId An account Id that must be associated to a session, gathering all the data the session need to make its connection.
[out] oSessionIdP The created session Id.
Returns:
Returns an error code.

alp_status_t alp_postal_service_free_address_scheme_list AlpPostalServiceAddressSchemeList iAddressSchemeListP  ) 
 

Free the list of Postal services address scheme.

Parameters:
[in] iAddressSchemeListP,: the services address scheme list to be freed.
Returns:
Returns an error code.

alp_status_t alp_postal_service_free_service_id_list AlpPostalServiceIdList iServiceIdListP  ) 
 

Free the list of Postal services Identifier.

Parameters:
[in] iServiceIdListP,: the services identifier list to be freed.
Returns:
Returns an error code.

alp_status_t alp_postal_service_get_account_enumerator alp_postal_service_id_t  iServiceId,
AlpPostalEnumerator oAccountEnumeratorP
 

Get an enumerator of the available account for the given service.

Parameters:
[in] iServiceId The serviceId that is unique among all services.
[out] oAccountEnumeratorP A reseted enumerator on the result.
Returns:
Returns an error code.

alp_status_t alp_postal_service_get_active_session_list AlpPostalServiceIdList iServiceIdListP,
AlpPostalServiceActiveSessionList oActiveSessionListP
 

Get the list of postal services active sessions with their attached application ID if any.

Parameters:
[in] iServiceIdListP,: a list of the identifiers of the services on which to retrieve the active sessions with their attached application ID if any. NULL to request the list for all the postal services.
[in] oActiveSessionListP,: A pointer on the list of active sessions, all the returned data are allocated by this call and have to be released by the caller.
Returns:
Returns an error code.

alp_status_t alp_postal_service_get_address_scheme_list alp_postal_service_id_t  iServiceId,
AlpPostalServiceAddressSchemeList oAddressSchemeListP
 

Return a list of supported scheme for the given service (e.g: "tel:", "mail:", "wv:").

Parameters:
[in] iServiceId The serviceId that is unique among all services.
[out] oAddressSchemeListP A list of schemes supported by the service (ex: "tel:" for sms).
Returns:
Returns an error code.

alp_status_t alp_postal_service_get_capabilities alp_postal_service_id_t  iServiceId,
alp_postal_service_capabilities_t oServiceCapabilitiesP
 

Return the capabilities of the given services.

Parameters:
[in] iServiceId The serviceId that is unique among all services.
[out] oServiceCapabilitiesP a combination of service capabilities.
Returns:
Returns an error code.

alp_status_t alp_postal_service_get_description alp_postal_service_id_t  iServiceId,
char **  oServiceDescriptionStrP
 

Return the human readable description of a service (e.g: "Short Message Service").

Parameters:
[in] iServiceId The serviceId that is unique among all services.
[out] oServiceDescriptionStrP A localized string describing the given identifier. 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_service_get_name alp_postal_service_id_t  iServiceId,
char **  oServiceNameStrP
 

Return the name of a service (e.g: "SMS").

Parameters:
[in] iServiceId The serviceId that is unique among all services.
[out] oServiceNameStrP The localized friendly name of the given service identifier. 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_service_get_next_account AlpPostalEnumerator iAccountEnumeratorP,
AlpPostalAccount oAccountP
 

Return the recipient address for the current position and increment it.

Parameters:
[in] iAccountEnumeratorP An enumerator on a list of result.
[out] oAccountP the next account property list.
Returns:
Returns an error code.

alp_status_t alp_postal_service_get_protocol_family alp_postal_service_id_t  iServiceId,
alp_postal_service_protocol_family_t oProtocolFamilyP
 

Return the protocol family of the given a service. See above for actual values ().

Parameters:
[in] iServiceId The serviceId that is unique among all services.
[out] oProtocolFamilyP A service description.
Returns:
Returns an error code.

alp_status_t alp_postal_service_get_session_id_list alp_postal_service_id_t  iServiceId,
AlpPostalSessionIdList oSessionListP
 

Return the list of current running sessions for the service.

Parameters:
[in] iServiceId The serviceId that is unique among all services.
[out] oSessionListP The list of the available session for the given service.
Returns:
Returns an error code.

alp_status_t alp_postal_service_get_short_name alp_postal_service_id_t  iServiceId,
char **  oShortNameStrP
 

Return the short name of the given a service (e.g: "SMS").

Parameters:
[in] iServiceId The serviceId that is unique among all services.
[out] oShortNameStrP A localized string with the short name of the given service identifier. 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_service_get_version alp_postal_service_id_t  iServiceId,
alp_postal_service_version_t oServiceVersionP
 

Return the version of a service.

Parameters:
[in] iServiceId The serviceId that is unique among all services.
[out] oServiceVersionP the current service version.
Returns:
Returns an error code.

alp_status_t alp_postal_service_is_address_supported alp_postal_service_id_t  iServiceId,
char *  iAddressStrP,
bool *  oSupportedP
 

Check if a row address will be understood by the given service. e.g: john@hotmail.com for the sms service will return false.

Parameters:
[in] iServiceId The serviceId that is unique among all services.
[in] iAddressStrP An address in a string format format (e.g: john@hotmail.com).
[out] oSupportedP False if not supported, true otherwise.
Returns:
Returns an error code.

alp_status_t alp_postal_service_open alp_postal_service_id_t  iServiceId  ) 
 

Open the given Postal service.

Parameters:
[in] iServiceId The serviceId to be opened.
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.