Tizen Native API
3.0
|
The Media key API contains the media key library.
Required Header
#include <media_key.h>
Overview
The Media key API provides functions for getting the status of the media key when the key is changed.
Functions | |
int | media_key_reserve (media_key_event_cb callback, void *user_data) |
Registers a change event callback for all media keys. | |
int | media_key_release (void) |
Unregisters the change event callback function. | |
Typedefs | |
typedef void(* | media_key_event_cb )(media_key_e key, media_key_event_e status, void *user_data) |
Called when the status of the media key is changed. |
Typedef Documentation
typedef void(* media_key_event_cb)(media_key_e key, media_key_event_e status, void *user_data) |
Called when the status of the media key is changed.
- Since :
- 2.3.1
- Parameters:
-
[in] key The key whose status is changed [in] status The status of the key [in] user_data The user data passed from the callback registration function
- Precondition:
- media_key_reserve() will invoke this callback function.
- See also:
- media_key_reserve()
- media_key_release()
Enumeration Type Documentation
enum media_key_e |
Enumeration for media keys.
- Since :
- 2.3.1
- Enumerator:
enum media_key_error_e |
enum media_key_event_e |
Function Documentation
int media_key_release | ( | void | ) |
Unregisters the change event callback function.
- Since :
- 2.3.1
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
MEDIA_KEY_ERROR_NONE Successful MEDIA_KEY_ERROR_INVALID_PARAMETER Invalid parameter MEDIA_KEY_ERROR_OPERATION_FAILED Release key failed
- See also:
- media_key_reserve()
int media_key_reserve | ( | media_key_event_cb | callback, |
void * | user_data | ||
) |
Registers a change event callback for all media keys.
- Since :
- 2.3.1
- Parameters:
-
[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:
-
MEDIA_KEY_ERROR_NONE Successful MEDIA_KEY_ERROR_INVALID_PARAMETER Invalid parameter MEDIA_KEY_ERROR_OPERATION_FAILED Reserve key failed
- See also:
- media_key_release()