Deprecated: Register a button to a forwarding action.
#include <bps/mediaplayer.h>
BPS_API int mediaplayer_button(int button1,
int button2,
int length,
int action,
const char *path,
char **id) BPS_DEPRECATED
BlackBerry 10.2.0
The first button. This must be one of the values of the media_button_t enumeration. This value cannot be MEDIA_BUTTON_NONE.
The optional second button. This must be one of the values of the media_button_t enumeration. If the value is not MEDIA_BUTTON_NONE, the function registers the action to be taken when the user presses button1 and button2 simultaneously.
The length of the button press. Use one of the values of the media_button_length_t enumeration.
The action. Use one of the values of the media_action_t enumeration. If you use a value of MEDIA_ACTION_FORWARD, the button notifications are forwarded to the application as MEDIAPLAYER_BUTTON events and the path argument should not be specified. Use of MEDIA_ACTION_LAUNCH is deprecated and the registration will fail.
The path. This is only required when action is MEDIA_ACTION_LAUNCH, not required otherwise. However, use of MEDIA_ACTION_LAUNCH is deprecated and the registration will fail.
When this is not a NULL value, the ID used in the button request is returned when the function completes. The caller must free this buffer using the bps_free() function. The same ID is also delivered in the corresponding MEDIAPLAYER_BUTTON_RESULT event.
Deprecated:
Use mediaplayer_register_button() instead.
The mediaplayer_button() function registers a button to a forwarding action.
BPS_SUCCESS when the function completes successfully, BPS_FAILURE with errno value set otherwise.