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.
Typedef Documentation
Called when the status of the media key is changed.
- Since :
- 2.3
- 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
Enumeration for media keys.
- Since :
- 2.3
- Enumerator:
MEDIA_KEY_PLAY |
Play key
|
MEDIA_KEY_STOP |
Stop key
|
MEDIA_KEY_PAUSE |
Pause key
|
MEDIA_KEY_PREVIOUS |
Previous key
|
MEDIA_KEY_NEXT |
Next key
|
MEDIA_KEY_FASTFORWARD |
Fastforward key
|
MEDIA_KEY_REWIND |
Rewind key
|
MEDIA_KEY_PLAYPAUSE |
Playpause key
|
MEDIA_KEY_MEDIA |
Media key for earjack
|
MEDIA_KEY_UNKNOWN |
Unknown key
|
Enumeration for error codes of a media key.
- Since :
- 2.3
- Enumerator:
MEDIA_KEY_ERROR_NONE |
Successful
|
MEDIA_KEY_ERROR_INVALID_PARAMETER |
Invalid parameter
|
MEDIA_KEY_ERROR_OPERATION_FAILED |
Reserve/Release failed
|
Enumeration for event statuses of a media key.
- Since :
- 2.3
- Enumerator:
MEDIA_KEY_STATUS_PRESSED |
Pressed status
|
MEDIA_KEY_STATUS_RELEASED |
Released status
|
MEDIA_KEY_STATUS_UNKNOWN |
Unknown status
|
Function Documentation
Unregisters the change event callback function.
- Since :
- 2.3
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
- See also:
- media_key_reserve()
Registers a change event callback for all media keys.
- Since :
- 2.3
- 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:
-
- See also:
- media_key_release()