SOUND_DEVICE_STATE_ACTIVATED, /**< Activated state */
} sound_device_state_e;
-/**
- * @brief Enumeration for Bluetooth sound device modes.
- * @since_tizen 3.0
- *
- * @remarks This enumeration is only for Bluetooth devices.\n
- * These values can be combined with bitwise 'or'.
- */
-
-typedef enum {
- SOUND_DEVICE_BLUETOOTH_MODE_MEDIA = 0x01, /**< Media mode (for music, system, and so on) */
- SOUND_DEVICE_BLUETOOTH_MODE_VOICE = 0x02, /**< Voice mode (for call, voip, voice-recognition, and so on) */
-} sound_device_bluetooth_mode_e;
-
/**
* @brief Enumeration for sound device mask.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
typedef enum {
SOUND_DEVICE_CHANGED_INFO_STATE, /**< State of the device was changed */
SOUND_DEVICE_CHANGED_INFO_IO_DIRECTION, /**< IO direction of the device was changed */
- SOUND_DEVICE_CHANGED_INFO_BT_AVAIL_MODES /**< Available modes of a Bluetooth device were changed (Since 3.0) */
} sound_device_changed_info_e;
/**
*/
int sound_manager_get_device_state(sound_device_h device, sound_device_state_e *state);
-/**
- * @brief Gets the available modes of a Bluetooth device.
- * @since_tizen 3.0
- *
- * @remarks This function is only for Bluetooth devices.
- *
- * @param[in] device The device of #SOUND_DEVICE_BLUETOOTH type
- * @param[out] modes The available modes of the Bluetooth device, values of #sound_device_bluetooth_mode_e combined with bitwise 'or'
- * @return @c 0 on success,
- * otherwise a negative error value
- * @retval #SOUND_MANAGER_ERROR_NONE Success
- * @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
- * @see sound_manager_get_device_list()
- * @see sound_manager_get_next_device()
- * @see sound_manager_get_prev_device()
- * @see sound_manager_get_device_type()
- * @see sound_manager_get_device_io_direction()
- * @see sound_manager_get_device_id()
- * @see sound_manager_get_device_name()
- * @see sound_manager_free_device_list()
- */
-int sound_manager_get_bt_device_avail_modes(sound_device_h device, int *modes);
-
/**
* @brief Registers a callback function to be invoked when the state of connection of a sound device was changed.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
return _convert_sound_manager_error_code(__func__, ret);
}
-int sound_manager_get_bt_device_avail_modes(sound_device_h device, int *modes)
-{
- int ret = MM_ERROR_NONE;
- sound_device_type_e device_type;
- mm_sound_device_type_e mm_sound_device_type;
-
- if (!device || !modes)
- return _convert_sound_manager_error_code(__func__, MM_ERROR_INVALID_ARGUMENT);
-
- ret = mm_sound_get_device_type(device, (mm_sound_device_type_e*)&mm_sound_device_type);
- if (ret == MM_ERROR_NONE)
- _convert_device_type(mm_sound_device_type, &device_type);
- if (ret != MM_ERROR_NONE)
- goto LEAVE;
- if (device_type != SOUND_DEVICE_BLUETOOTH_MEDIA && device_type != SOUND_DEVICE_BLUETOOTH_VOICE) {
- ret = MM_ERROR_INVALID_ARGUMENT;
- goto LEAVE;
- }
-
- /* temporary code, this API should be removed */
- *modes = SOUND_DEVICE_BLUETOOTH_MODE_MEDIA | SOUND_DEVICE_BLUETOOTH_MODE_VOICE;
-
-LEAVE:
- return _convert_sound_manager_error_code(__func__, ret);
-}
-
int sound_manager_set_device_connected_cb(sound_device_mask_e device_mask, sound_device_connected_cb callback, void *user_data)
{
int ret = MM_ERROR_NONE;