Internal Notifications
[Protocol Common Services]


Detailed Description

Postal Notification APIs and Definition.


POSTAL SERVICES NOTIFICATION DEFINITION MACRO

Macros to define Postal Services notifications.

#define ALP_POSTAL_NOTIFICATION(service_id, service_class_id, notification_id)

POSTAL SERVICES NOTIFICATIONS HELPER MACROS

Macros to access notification information.

#define ALP_POSTAL_NOTIFICATION_GET_NUMBER(notification)   (alp_postal_notification_number_t)((notification & ALP_POSTAL_NOTIFICATION_MASK_NUMBER))
 Get the notification number.
#define ALP_POSTAL_NOTIFICATION_GET_SERVICE_CLASS_ID(notification)   (alp_postal_service_class_id_t)((notification & ALP_POSTAL_NOTIFICATION_MASK_SERVICE_CLASS_ID) >> 16)
 Get the notification service class identifer.
#define ALP_POSTAL_NOTIFICATION_GET_SERVICE_ID(notification)   (alp_postal_service_id_t)((notification & ALP_POSTAL_NOTIFICATION_MASK_SERVICE_ID) >> 24)
 Get the notification service identifier.

POSTAL SERVICES NOTIFICATION MASKS

Defines Postal Services notifications masks to access notification information.

#define ALP_POSTAL_NOTIFICATION_MASK_NUMBER   ((alp_postal_notification_mask_t)0x0000FFFF)
 Number.
#define ALP_POSTAL_NOTIFICATION_MASK_SERVICE_CLASS_ID   ((alp_postal_notification_mask_t)0x00FF0000)
 Service Class Id.
#define ALP_POSTAL_NOTIFICATION_MASK_SERVICE_ID   ((alp_postal_notification_mask_t)0xFF000000)
 Service Id.

Defines

#define ALP_POSTAL_NOTIFICATION_INVALID_ID   ((alp_postal_notification_id_t)0)
 Invalid Notification ID definition.

Typedefs

typedef uint32_t alp_postal_notification_id_t
 Notification Id type.
typedef uint32_t alp_postal_notification_mask_t
 Postal notification mask type.
typedef alp_postal_number_id_t alp_postal_notification_number_t
 Postal Notification number type.

Functions

alp_status_t alp_postal_notification_add_observer (alp_postal_notification_id_t iNotificationId, void *iCallbackFuncP)
 Add a notification observer CallBack. Client Callback will be called within its own execution context upon the reception.
alp_status_t alp_postal_notification_remove_observer (alp_postal_notification_id_t iNotificationId)
 Remove a notification observer CallBack.


Define Documentation

#define ALP_POSTAL_NOTIFICATION service_id,
service_class_id,
notification_id   ) 
 

Value:

(alp_postal_notification_id_t) \
                        ((((alp_postal_service_id_t)service_id)<<24) \
                        | (((alp_postal_service_class_id_t)service_class_id)<<16) \
                        | ((alp_postal_notification_number_t)notification_id))

#define ALP_POSTAL_NOTIFICATION_GET_NUMBER notification   )     (alp_postal_notification_number_t)((notification & ALP_POSTAL_NOTIFICATION_MASK_NUMBER))
 

Get the notification number.

#define ALP_POSTAL_NOTIFICATION_GET_SERVICE_CLASS_ID notification   )     (alp_postal_service_class_id_t)((notification & ALP_POSTAL_NOTIFICATION_MASK_SERVICE_CLASS_ID) >> 16)
 

Get the notification service class identifer.

#define ALP_POSTAL_NOTIFICATION_GET_SERVICE_ID notification   )     (alp_postal_service_id_t)((notification & ALP_POSTAL_NOTIFICATION_MASK_SERVICE_ID) >> 24)
 

Get the notification service identifier.

#define ALP_POSTAL_NOTIFICATION_INVALID_ID   ((alp_postal_notification_id_t)0)
 

Invalid Notification ID definition.

#define ALP_POSTAL_NOTIFICATION_MASK_NUMBER   ((alp_postal_notification_mask_t)0x0000FFFF)
 

Number.

#define ALP_POSTAL_NOTIFICATION_MASK_SERVICE_CLASS_ID   ((alp_postal_notification_mask_t)0x00FF0000)
 

Service Class Id.

#define ALP_POSTAL_NOTIFICATION_MASK_SERVICE_ID   ((alp_postal_notification_mask_t)0xFF000000)
 

Service Id.


Typedef Documentation

typedef uint32_t alp_postal_notification_id_t
 

Notification Id type.

typedef uint32_t alp_postal_notification_mask_t
 

Postal notification mask type.

typedef alp_postal_number_id_t alp_postal_notification_number_t
 

Postal Notification number type.


Function Documentation

alp_status_t alp_postal_notification_add_observer alp_postal_notification_id_t  iNotificationId,
void *  iCallbackFuncP
 

Add a notification observer CallBack. Client Callback will be called within its own execution context upon the reception.

Parameters:
[in] iNotificationId Identifier of the notification upon reception of which the given CallBack function will be called.
[in] iCallbackFuncP CallBack function that will be called upon the reception of the given notification identifier.
Returns:
Returns an error code.

alp_status_t alp_postal_notification_remove_observer alp_postal_notification_id_t  iNotificationId  ) 
 

Remove a notification observer CallBack.

Parameters:
[in] iNotificationId a Notification identifier on which an observer Callback has been set previous, and now need to be removed.
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.