The WAP PUSH API provides functions to add/remove incoming callback for WAP Push messages and register current application to push server.
Required Header
#include <messages.h>
Overview
The WAP PUSH API provides the following functionalities:
- Adding/Removing incoming callback for WAP Push messages
- Managing the registration
Related Features
This API is related with the following features:
It is recommended to design feature related codes in your application for reliability.
You can check if a device supports the related features for this API by using System Information, thereby controlling the procedure of your application.
To ensure your application is only running on the device with specific features, please define the features in your manifest file using the manifest editor in the SDK.
More details on featuring your application can be found from Feature Element.
Functions |
int | messages_push_add_incoming_cb (messages_service_h service, const char *app_id, messages_push_incoming_cb callback, void *user_data) |
| Registers a callback to be invoked when an WAP Push message is received.
|
int | messages_push_remove_incoming_cb (messages_service_h service, const char *app_id) |
| Unregisters the WAP push incoming callback function.
|
int | messages_push_register (messages_service_h service, const char *content_type, const char *app_id) |
| Registers an application to the mapping table of the WAP Push service.
|
int | messages_push_deregister (messages_service_h service, const char *content_type, const char *app_id) |
| De-registers an application from the mapping table of the WAP Push service.
|
int | messages_push_reregister (messages_service_h service, const char *content_type, const char *app_id, const char *dst_content_type, const char *dst_app_id) |
| Re-registers an application to the mapping table of the WAP Push service.
|
Typedefs |
typedef void(* | messages_push_incoming_cb )(const char *header, const char *body, int body_length, void *user_data) |
| Called when an incoming push message is received.
|
Typedef Documentation
Called when an incoming push message is received.
- Since :
- 2.3
- Parameters:
-
[in] | header | The header of the push message |
[in] | body | The body of the push message
It is not a null-terminated string |
[in] | body_length | The length of body |
[in] | user_data | The user data to be passed to the callback function |
- Precondition:
- You register this callback using messages_push_set_incoming_cb() for getting an incoming message.
- See also:
- messages_push_set_incoming_cb()
-
messages_push_unset_incoming_cb()
Function Documentation
Registers a callback to be invoked when an WAP Push message is received.
- Since :
- 2.3
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/message.read
- Parameters:
-
[in] | service | The message service handle |
[in] | app_id | The "X-WAP-Application-ID" to indicate a destination WAP Push application ID |
[in] | callback | The callback function |
[in] | user_data | The user data to be passed to the callback function |
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
De-registers an application from the mapping table of the WAP Push service.
- Since :
- 2.3
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/message.write
- Parameters:
-
[in] | service | The message service handle |
[in] | content_type | The MIME content type of the content |
[in] | app_id | The "X-WAP-Application-ID" to indicate a destination WAP Push application ID |
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
Registers an application to the mapping table of the WAP Push service.
- Since :
- 2.3
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/message.write
- Parameters:
-
[in] | service | The message service handle |
[in] | content_type | The MIME content type of the content |
[in] | app_id | The "X-WAP-Application-ID" to indicate a destination WAP Push application ID |
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
Unregisters the WAP push incoming callback function.
- Since :
- 2.3
- Parameters:
-
[in] | service | The message service handle |
[in] | app_id | The "X-WAP-Application-ID" to indicate a destination WAP Push application ID |
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
Re-registers an application to the mapping table of the WAP Push service.
- Since :
- 2.3
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/message.write
- Parameters:
-
[in] | service | The message service handle |
[in] | content_type | An element of the composite key for searching registered entry
The MIME content type of the content |
[in] | app_id | The composite key for searching mapping information
The "X-WAP-Application-ID" to indicate a destination WAP Push application ID |
[in] | dst_content_type | The MIME content type of the content |
[in] | dst_app_id | The "X-WAP-Application-ID" to indicate a destination WAP Push application ID |
- Returns:
0
on success, otherwise a negative error value
- Return values:
-