mediaplayer_button()

Deprecated: Register a button to a forwarding action.

Synopsis:

#include <bps/mediaplayer.h>
 
BPS_API int mediaplayer_button(int button1,
                               int button2,
                               int length,
                               int action,
                               const char *path,
                               char **id) BPS_DEPRECATED

Since:

BlackBerry 10.2.0

Arguments:

button1

The first button. This must be one of the values of the media_button_t enumeration. This value cannot be MEDIA_BUTTON_NONE.

button2

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.

length

The length of the button press. Use one of the values of the media_button_length_t enumeration.

action

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.

path

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.

id

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.

Library:

libbps (For the qcc command, use the -l bps option to link against this library)

Description:

Deprecated:

Use mediaplayer_register_button() instead.

The mediaplayer_button() function registers a button to a forwarding action.

Returns:

BPS_SUCCESS when the function completes successfully, BPS_FAILURE with errno value set otherwise.