Tizen Native API
9.0
|
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:
- http://tizen.org/feature/network.telephony
- http://tizen.org/feature/network.telephony.sms
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) TIZEN_DEPRECATED_API |
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) TIZEN_DEPRECATED_API |
Unregisters the WAP push incoming callback function. | |
int | messages_push_register (messages_service_h service, const char *content_type, const char *app_id) TIZEN_DEPRECATED_API |
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) TIZEN_DEPRECATED_API |
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) TIZEN_DEPRECATED_API |
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
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.
- Deprecated:
- Deprecated since 8.0.
- 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
Function Documentation
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.
- Deprecated:
- Deprecated since 8.0.
- 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:
-
MESSAGES_ERROR_NONE Successful MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter MESSAGES_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method MESSAGES_ERROR_NOT_SUPPORTED Not supported
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.
- Deprecated:
- Deprecated since 8.0.
- 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:
-
MESSAGES_ERROR_NONE Successful MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter MESSAGES_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method MESSAGES_ERROR_NOT_SUPPORTED Not supported
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.
- Deprecated:
- Deprecated since 8.0.
- 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:
-
MESSAGES_ERROR_NONE Successful MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter MESSAGES_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method MESSAGES_ERROR_NOT_SUPPORTED Not supported
int messages_push_remove_incoming_cb | ( | messages_service_h | service, |
const char * | app_id | ||
) |
Unregisters the WAP push incoming callback function.
- Deprecated:
- Deprecated since 8.0.
- 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:
-
MESSAGES_ERROR_NONE Successful MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter MESSAGES_ERROR_NOT_SUPPORTED Not supported
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.
- Deprecated:
- Deprecated since 8.0.
- 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:
-
MESSAGES_ERROR_NONE Successful MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter MESSAGES_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method MESSAGES_ERROR_NOT_SUPPORTED Not supported