Tizen Native API
6.5
|
The Sticker Consumer API provides the functions to retrieve the sticker information.
Required Header
#include <sticker_consumer.h>
Overview
The Sticker Consumer API provides the functions to retrieve the sticker information stored by the provider application. The application that use stickers can retrieve the sticker information using group name, keyword, and so on.
Functions | |
int | sticker_consumer_create (sticker_consumer_h *consumer_handle) |
Creates a sticker consumer handle. | |
int | sticker_consumer_destroy (sticker_consumer_h consumer_handle) |
Destroys a sticker consumer handle. | |
int | sticker_consumer_data_foreach_all (sticker_consumer_h consumer_handle, int offset, int count, int *result, sticker_consumer_data_foreach_cb callback, void *user_data) |
Retrieves all sticker data in the sticker database. | |
int | sticker_consumer_data_foreach_by_keyword (sticker_consumer_h consumer_handle, int offset, int count, int *result, const char *keyword, sticker_consumer_data_foreach_cb callback, void *user_data) |
Retrieves all sticker data in the sticker database using keyword. | |
int | sticker_consumer_data_foreach_by_group (sticker_consumer_h consumer_handle, int offset, int count, int *result, const char *group, sticker_consumer_data_foreach_cb callback, void *user_data) |
Retrieves all sticker data in the sticker database using group name. | |
int | sticker_consumer_data_foreach_by_type (sticker_consumer_h consumer_handle, int offset, int count, int *result, sticker_data_uri_type_e type, sticker_consumer_data_foreach_cb callback, void *user_data) |
Retrieves all sticker data in the sticker database using URI type. | |
int | sticker_consumer_group_list_foreach_all (sticker_consumer_h consumer_handle, sticker_consumer_group_list_foreach_cb callback, void *user_data) |
Retrieves all group name in the sticker database. | |
int | sticker_consumer_keyword_list_foreach_all (sticker_consumer_h consumer_handle, sticker_consumer_keyword_list_foreach_cb callback, void *user_data) |
Retrieves all keyword in the sticker database. | |
int | sticker_consumer_data_foreach_by_display_type (sticker_consumer_h consumer_handle, int offset, int count, int *result, sticker_data_display_type_e type, sticker_consumer_data_foreach_cb callback, void *user_data) |
Retrieves all sticker data in the sticker database using display type. | |
int | sticker_consumer_group_list_foreach_by_display_type (sticker_consumer_h consumer_handle, sticker_data_display_type_e type, sticker_consumer_group_list_foreach_cb callback, void *user_data) |
Retrieves all group names assigned to stickers with a matching display type. | |
int | sticker_consumer_add_recent_data (sticker_consumer_h consumer_handle, sticker_data_h data_handle) |
Adds entry to recently used stickers list. | |
int | sticker_consumer_get_recent_data_list (sticker_consumer_h consumer_handle, int count, int *result, sticker_consumer_data_foreach_cb callback, void *user_data) |
Gets recently used stickers list. | |
int | sticker_consumer_set_event_cb (sticker_consumer_h consumer_handle, sticker_consumer_event_cb callback, void *user_data) |
Registers a callback function to be invoked when the stickers are inserted, deleted, or updated. | |
int | sticker_consumer_unset_event_cb (sticker_consumer_h consumer_handle) |
Unregisters a callback function. | |
int | sticker_consumer_group_image_list_foreach_all (sticker_consumer_h consumer_handle, sticker_consumer_group_image_list_foreach_cb callback, void *user_data) |
Retrieves images of all sticker groups in the database. | |
Typedefs | |
typedef struct sticker_consumer_s * | sticker_consumer_h |
The sticker consumer handle. | |
typedef void(* | sticker_consumer_data_foreach_cb )(sticker_data_h data_handle, void *user_data) |
Called to retrieve all sticker data in the sticker database. | |
typedef void(* | sticker_consumer_group_list_foreach_cb )(const char *group, void *user_data) |
Called to retrieve all group names in the sticker database. | |
typedef void(* | sticker_consumer_keyword_list_foreach_cb )(const char *keyword, void *user_data) |
Called to retrieve all keywords in the sticker database. | |
typedef void(* | sticker_consumer_event_cb )(sticker_consumer_event_type_e event_type, sticker_data_h data_handle, void *user_data) |
Called when the stickers are inserted, deleted, or updated. | |
typedef void(* | sticker_consumer_group_image_list_foreach_cb )(const char *group, sticker_data_uri_type_e type, const char *uri, void *user_data) |
Called to retrieve group images in the sticker database. |
Typedef Documentation
typedef void(* sticker_consumer_data_foreach_cb)(sticker_data_h data_handle, void *user_data) |
Called to retrieve all sticker data in the sticker database.
The sticker_consumer_data_foreach_all(), sticker_consumer_data_foreach_by_keyword(), sticker_consumer_data_foreach_by_group(), sticker_consumer_data_foreach_by_type() must be called to invoke this callback function, synchronously.
- Since :
- 5.5
- Remarks:
- data_handle should not be freed and can be used only in the callback. If you want to use it outside of the callback, you need to use a clone which can be obtained sticker_data_clone().
- Parameters:
-
[in] data_handle The sticker data handle [in] user_data The user data passed from the foreach function
- Precondition:
- sticker_consumer_data_foreach_all() will invoke this callback.
- sticker_consumer_data_foreach_by_keyword() will invoke this callback.
- sticker_consumer_data_foreach_by_group() will invoke this callback.
- sticker_consumer_data_foreach_by_type() will invoke this callback.
typedef void(* sticker_consumer_event_cb)(sticker_consumer_event_type_e event_type, sticker_data_h data_handle, void *user_data) |
Called when the stickers are inserted, deleted, or updated.
- Since :
- 5.5
- Remarks:
- data_handle should not be freed and can be used only in the callback. If you want to use it outside of the callback, you need to use a clone which can be obtained sticker_data_clone(). When the event_type is STICKER_CONSUMER_EVENT_TYPE_DELETE, sticker data can be obtained using data_handle, but the files have been already deleted.
- Parameters:
-
[in] event_type The event type [in] data_handle The sticker data handle [in] user_data The user data passed from sticker_consumer_set_event_cb()
- Precondition:
- The callback can be registered using sticker_consumer_set_event_cb()
typedef void(* sticker_consumer_group_image_list_foreach_cb)(const char *group, sticker_data_uri_type_e type, const char *uri, void *user_data) |
Called to retrieve group images in the sticker database.
The sticker_consumer_group_image_list_foreach_all() must be called to invoke this callback function, synchronously.
- Since :
- 6.5
- Remarks:
- group and uri should not be freed and can be used only in the callback.
- Parameters:
-
[in] group The group name of the stickers [in] type The URI type of the sticker group image URI [in] uri The URI of the sticker group image [in] user_data The user data passed from the foreach function
- Precondition:
- sticker_consumer_group_image_list_foreach_all() will invoke this callback.
typedef void(* sticker_consumer_group_list_foreach_cb)(const char *group, void *user_data) |
Called to retrieve all group names in the sticker database.
The sticker_consumer_group_list_foreach_all() must be called to invoke this callback function, synchronously.
- Since :
- 5.5
- Remarks:
- group should not be freed and can be used only in the callback.
- Parameters:
-
[in] group The group name of the sticker [in] user_data The user data passed from the foreach function
- Precondition:
- sticker_consumer_group_list_foreach_all() will invoke this callback.
typedef struct sticker_consumer_s* sticker_consumer_h |
The sticker consumer handle.
- Since :
- 5.5
typedef void(* sticker_consumer_keyword_list_foreach_cb)(const char *keyword, void *user_data) |
Called to retrieve all keywords in the sticker database.
The sticker_consumer_keyword_list_foreach_all() must be called to invoke this callback function, synchronously.
- Since :
- 5.5
- Remarks:
- keyword should not be freed and can be used only in the callback.
- Parameters:
-
[in] keyword The keyword of the sticker [in] user_data The user data passed from the foreach function
- Precondition:
- sticker_consumer_keyword_list_foreach_all() will invoke this callback.
Enumeration Type Documentation
Function Documentation
int sticker_consumer_add_recent_data | ( | sticker_consumer_h | consumer_handle, |
sticker_data_h | data_handle | ||
) |
Adds entry to recently used stickers list.
- Since :
- 5.5
- Parameters:
-
[in] consumer_handle The sticker consumer handle [in] data_handle The sticker data handle
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
STICKER_ERROR_NONE Successful STICKER_ERROR_NOT_SUPPORTED Not supported STICKER_ERROR_INVALID_PARAMETER Invalid parameter STICKER_ERROR_OPERATION_FAILED Operation failed
int sticker_consumer_create | ( | sticker_consumer_h * | consumer_handle | ) |
Creates a sticker consumer handle.
- Since :
- 5.5
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/mediastorage
- Remarks:
- If the function succeeds, consumer_handle must be released with sticker_consumer_destroy().
- Parameters:
-
[out] consumer_handle The sticker consumer handle
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
STICKER_ERROR_NONE Successful STICKER_ERROR_NOT_SUPPORTED Not supported STICKER_ERROR_PERMISSION_DENIED Permission denied STICKER_ERROR_INVALID_PARAMETER Invalid parameter STICKER_ERROR_OUT_OF_MEMORY Out of memory STICKER_ERROR_OPERATION_FAILED Operation failed
- See also:
- sticker_consumer_destroy()
int sticker_consumer_data_foreach_all | ( | sticker_consumer_h | consumer_handle, |
int | offset, | ||
int | count, | ||
int * | result, | ||
sticker_consumer_data_foreach_cb | callback, | ||
void * | user_data | ||
) |
Retrieves all sticker data in the sticker database.
If you set the offset as 10
and count as 10
, then only retrieved data from 10
to 19
will be invoked.
- Since :
- 5.5
- Remarks:
- It is not an error if result is smaller than count.
- Parameters:
-
[in] consumer_handle The sticker consumer handle [in] offset The start position (Starting from zero) [in] count The number of stickers to be retrieved with respect to the offset [out] result The number of stickers retrieved (zero indicates that no data was found) [in] callback The callback function to invoke [in] user_data The user data to be passed to the callback function
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
STICKER_ERROR_NONE Successful STICKER_ERROR_NOT_SUPPORTED Not supported STICKER_ERROR_INVALID_PARAMETER Invalid parameter STICKER_ERROR_OUT_OF_MEMORY Out of memory STICKER_ERROR_OPERATION_FAILED Operation failed
- Postcondition:
- This function invokes sticker_consumer_data_foreach_cb() repeatedly for getting data.
- See also:
- sticker_consumer_data_foreach_cb()
int sticker_consumer_data_foreach_by_display_type | ( | sticker_consumer_h | consumer_handle, |
int | offset, | ||
int | count, | ||
int * | result, | ||
sticker_data_display_type_e | type, | ||
sticker_consumer_data_foreach_cb | callback, | ||
void * | user_data | ||
) |
Retrieves all sticker data in the sticker database using display type.
If you set the offset as 10
and count as 10
, then only retrieved data from 10
to 19
will be invoked.
- Since :
- 5.5
- Remarks:
- It is not an error if result is smaller than count.
- Parameters:
-
[in] consumer_handle The sticker consumer handle [in] offset The start position (Starting from zero) [in] count The number of stickers to be retrieved with respect to the offset [out] result The number of stickers retrieved (zero indicates that no data was found) [in] type The display type of the sticker for getting sticker data [in] callback The callback function to invoke [in] user_data The user data to be passed to the callback function
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
STICKER_ERROR_NONE Successful STICKER_ERROR_NOT_SUPPORTED Not supported STICKER_ERROR_INVALID_PARAMETER Invalid parameter STICKER_ERROR_OUT_OF_MEMORY Out of memory STICKER_ERROR_OPERATION_FAILED Operation failed
- Postcondition:
- This function invokes sticker_consumer_data_foreach_cb() repeatedly for getting data.
- See also:
- sticker_consumer_data_foreach_cb()
int sticker_consumer_data_foreach_by_group | ( | sticker_consumer_h | consumer_handle, |
int | offset, | ||
int | count, | ||
int * | result, | ||
const char * | group, | ||
sticker_consumer_data_foreach_cb | callback, | ||
void * | user_data | ||
) |
Retrieves all sticker data in the sticker database using group name.
If you set the offset as 10
and count as 10
, then only retrieved data from 10
to 19
will be invoked.
- Since :
- 5.5
- Remarks:
- It is not an error if result is smaller than count.
- Parameters:
-
[in] consumer_handle The sticker consumer handle [in] offset The start position (Starting from zero) [in] count The number of stickers to be retrieved with respect to the offset [out] result The number of stickers retrieved (zero indicates that no data was found) [in] group The group name of the sticker for getting sticker data [in] callback The callback function to invoke [in] user_data The user data to be passed to the callback function
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
STICKER_ERROR_NONE Successful STICKER_ERROR_NOT_SUPPORTED Not supported STICKER_ERROR_INVALID_PARAMETER Invalid parameter STICKER_ERROR_OUT_OF_MEMORY Out of memory STICKER_ERROR_OPERATION_FAILED Operation failed
- Postcondition:
- This function invokes sticker_consumer_data_foreach_cb() repeatedly for getting data.
- See also:
- sticker_consumer_data_foreach_cb()
int sticker_consumer_data_foreach_by_keyword | ( | sticker_consumer_h | consumer_handle, |
int | offset, | ||
int | count, | ||
int * | result, | ||
const char * | keyword, | ||
sticker_consumer_data_foreach_cb | callback, | ||
void * | user_data | ||
) |
Retrieves all sticker data in the sticker database using keyword.
If you set the offset as 10
and count as 10
, then only retrieved data from 10
to 19
will be invoked.
- Since :
- 5.5
- Remarks:
- It is not an error if result is smaller than count.
- Parameters:
-
[in] consumer_handle The sticker consumer handle [in] offset The start position (Starting from zero) [in] count The number of stickers to be retrieved with respect to the offset [out] result The number of stickers retrieved (zero indicates that no data was found) [in] keyword The keyword of the sticker for getting sticker data [in] callback The callback function to invoke [in] user_data The user data to be passed to the callback function
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
STICKER_ERROR_NONE Successful STICKER_ERROR_NOT_SUPPORTED Not supported STICKER_ERROR_INVALID_PARAMETER Invalid parameter STICKER_ERROR_OUT_OF_MEMORY Out of memory STICKER_ERROR_OPERATION_FAILED Operation failed
- Postcondition:
- This function invokes sticker_consumer_data_foreach_cb() repeatedly for getting data.
- See also:
- sticker_consumer_data_foreach_cb()
int sticker_consumer_data_foreach_by_type | ( | sticker_consumer_h | consumer_handle, |
int | offset, | ||
int | count, | ||
int * | result, | ||
sticker_data_uri_type_e | type, | ||
sticker_consumer_data_foreach_cb | callback, | ||
void * | user_data | ||
) |
Retrieves all sticker data in the sticker database using URI type.
If you set the offset as 10
and count as 10
, then only retrieved data from 10
to 19
will be invoked.
- Since :
- 5.5
- Remarks:
- It is not an error if result is smaller than count.
- Parameters:
-
[in] consumer_handle The sticker consumer handle [in] offset The start position (Starting from zero) [in] count The number of stickers to be retrieved with respect to the offset [out] result The number of stickers retrieved (zero indicates that no data was found) [in] type The URI type of the sticker for getting sticker data [in] callback The callback function to invoke [in] user_data The user data to be passed to the callback function
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
STICKER_ERROR_NONE Successful STICKER_ERROR_NOT_SUPPORTED Not supported STICKER_ERROR_INVALID_PARAMETER Invalid parameter STICKER_ERROR_OUT_OF_MEMORY Out of memory STICKER_ERROR_OPERATION_FAILED Operation failed
- Postcondition:
- This function invokes sticker_consumer_data_foreach_cb() repeatedly for getting data.
- See also:
- sticker_consumer_data_foreach_cb()
int sticker_consumer_destroy | ( | sticker_consumer_h | consumer_handle | ) |
Destroys a sticker consumer handle.
- Since :
- 5.5
- Parameters:
-
[in] consumer_handle The sticker consumer handle
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
STICKER_ERROR_NONE Successful STICKER_ERROR_NOT_SUPPORTED Not supported STICKER_ERROR_INVALID_PARAMETER Invalid parameter STICKER_ERROR_OPERATION_FAILED Operation failed
- See also:
- sticker_consumer_create()
int sticker_consumer_get_recent_data_list | ( | sticker_consumer_h | consumer_handle, |
int | count, | ||
int * | result, | ||
sticker_consumer_data_foreach_cb | callback, | ||
void * | user_data | ||
) |
Gets recently used stickers list.
The most recently used stickers are delivered in order.
- Since :
- 5.5
- Remarks:
- It is not an error if result is smaller than count.
- Parameters:
-
[in] consumer_handle The sticker consumer handle [in] count The number of stickers that you want to receive. If -1, the number of stickers is not restricted [out] result The number of stickers received (zero indicates that no data was found) [in] callback The callback function to invoke [in] user_data The user data to be passed to the callback function
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
STICKER_ERROR_NONE Successful STICKER_ERROR_NOT_SUPPORTED Not supported STICKER_ERROR_INVALID_PARAMETER Invalid parameter STICKER_ERROR_OUT_OF_MEMORY Out of memory STICKER_ERROR_OPERATION_FAILED Operation failed
- Postcondition:
- This function invokes sticker_consumer_data_foreach_cb() repeatedly for getting data.
int sticker_consumer_group_image_list_foreach_all | ( | sticker_consumer_h | consumer_handle, |
sticker_consumer_group_image_list_foreach_cb | callback, | ||
void * | user_data | ||
) |
Retrieves images of all sticker groups in the database.
- Since :
- 6.5
- Parameters:
-
[in] consumer_handle The sticker consumer handle [in] callback The callback function to invoke [in] user_data The user data to be passed to the callback function
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
STICKER_ERROR_NONE Successful STICKER_ERROR_NOT_SUPPORTED Not supported STICKER_ERROR_INVALID_PARAMETER Invalid parameter STICKER_ERROR_OPERATION_FAILED Operation failed
- Postcondition:
- This function invokes sticker_consumer_group_image_list_foreach_cb() repeatedly for getting data.
int sticker_consumer_group_list_foreach_all | ( | sticker_consumer_h | consumer_handle, |
sticker_consumer_group_list_foreach_cb | callback, | ||
void * | user_data | ||
) |
Retrieves all group name in the sticker database.
- Since :
- 5.5
- Parameters:
-
[in] consumer_handle The sticker consumer handle [in] callback The callback function to invoke [in] user_data The user data to be passed to the callback function
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
STICKER_ERROR_NONE Successful STICKER_ERROR_NOT_SUPPORTED Not supported STICKER_ERROR_INVALID_PARAMETER Invalid parameter STICKER_ERROR_OPERATION_FAILED Operation failed
- Postcondition:
- This function invokes sticker_consumer_group_list_foreach_cb() repeatedly for getting data.
int sticker_consumer_group_list_foreach_by_display_type | ( | sticker_consumer_h | consumer_handle, |
sticker_data_display_type_e | type, | ||
sticker_consumer_group_list_foreach_cb | callback, | ||
void * | user_data | ||
) |
Retrieves all group names assigned to stickers with a matching display type.
- Since :
- 5.5
- Parameters:
-
[in] consumer_handle The sticker consumer handle [in] type The display type of the sticker for getting sticker data [in] callback The callback function to invoke [in] user_data The user data to be passed to the callback function
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
STICKER_ERROR_NONE Successful STICKER_ERROR_NOT_SUPPORTED Not supported STICKER_ERROR_INVALID_PARAMETER Invalid parameter STICKER_ERROR_OPERATION_FAILED Operation failed
- Postcondition:
- This function invokes sticker_consumer_group_list_foreach_cb() repeatedly for getting data.
int sticker_consumer_keyword_list_foreach_all | ( | sticker_consumer_h | consumer_handle, |
sticker_consumer_keyword_list_foreach_cb | callback, | ||
void * | user_data | ||
) |
Retrieves all keyword in the sticker database.
- Since :
- 5.5
- Parameters:
-
[in] consumer_handle The sticker consumer handle [in] callback The callback function to invoke [in] user_data The user data to be passed to the callback function
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
STICKER_ERROR_NONE Successful STICKER_ERROR_NOT_SUPPORTED Not supported STICKER_ERROR_INVALID_PARAMETER Invalid parameter STICKER_ERROR_OPERATION_FAILED Operation failed
- Postcondition:
- This function invokes sticker_consumer_keyword_list_foreach_cb() repeatedly for getting data.
int sticker_consumer_set_event_cb | ( | sticker_consumer_h | consumer_handle, |
sticker_consumer_event_cb | callback, | ||
void * | user_data | ||
) |
Registers a callback function to be invoked when the stickers are inserted, deleted, or updated.
- Since :
- 5.5
- Parameters:
-
[in] consumer_handle The sticker consumer handle [in] callback The callback function to invoke [in] user_data The user data to be passed to the callback function
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
STICKER_ERROR_NONE Successful STICKER_ERROR_NOT_SUPPORTED Not supported STICKER_ERROR_INVALID_PARAMETER Invalid parameter STICKER_ERROR_OPERATION_FAILED Operation failed
int sticker_consumer_unset_event_cb | ( | sticker_consumer_h | consumer_handle | ) |
Unregisters a callback function.
- Since :
- 5.5
- Parameters:
-
[in] consumer_handle The sticker consumer handle
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
STICKER_ERROR_NONE Successful STICKER_ERROR_NOT_SUPPORTED Not supported STICKER_ERROR_INVALID_PARAMETER Invalid parameter STICKER_ERROR_OPERATION_FAILED Operation failed