summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorGilbok Lee <gilbok.lee@samsung.com>2018-08-21 15:51:35 +0900
committerGilbok Lee <gilbok.lee@samsung.com>2018-08-22 11:56:58 +0900
commitd15d19531cf004eea3b846d50c62c0faf857c9d1 (patch)
treef6697b6a4997206da29023fd05fae6c19da5b23a /src/include
parent849b12262d04198843c060e808a3b9275dc04a18 (diff)
downloadlibmm-radio-d15d19531cf004eea3b846d50c62c0faf857c9d1.tar.gz
libmm-radio-d15d19531cf004eea3b846d50c62c0faf857c9d1.tar.bz2
libmm-radio-d15d19531cf004eea3b846d50c62c0faf857c9d1.zip
Using radio-hal-interface in mm-hal-interfacesubmit/tizen/20180822.040030
[Version] 0.2.43 [Profile] Mobile, Wearable [Issue Type] Refactoring Change-Id: I21587a1d405436abe624c925eb0bd20fd744ee36
Diffstat (limited to 'src/include')
-rw-r--r--src/include/radio_hal_interface.h61
-rw-r--r--src/include/tizen-radio.h307
2 files changed, 0 insertions, 368 deletions
diff --git a/src/include/radio_hal_interface.h b/src/include/radio_hal_interface.h
deleted file mode 100644
index cb4a1d0..0000000
--- a/src/include/radio_hal_interface.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * radio_hal_interface.h
- *
- * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <stdint.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include "tizen-radio.h"
-
-typedef enum _seek_direction_type {
- SEEK_DIRECTION_UP, /**< Seek upward */
- SEEK_DIRECTION_DOWN /**< Seek downward */
-} seek_direction_type_t;
-
-typedef struct _radio_hal_interface {
- void *dl_handle;
- void *rh_handle;
- radio_interface_t intf;
-} radio_hal_interface;
-
-int radio_hal_interface_init(radio_hal_interface **handle);
-int radio_hal_interface_deinit(radio_hal_interface *handle);
-int radio_hal_open(radio_hal_interface *handle);
-int radio_hal_prepare(radio_hal_interface *handle);
-int radio_hal_unprepare(radio_hal_interface *handle);
-int radio_hal_close(radio_hal_interface *handle);
-int radio_hal_start(radio_hal_interface *handle);
-int radio_hal_stop(radio_hal_interface *handle);
-int radio_hal_seek(radio_hal_interface *handle, seek_direction_type_t direction);
-int radio_hal_get_frequency(radio_hal_interface *handle, uint32_t *frequency);
-int radio_hal_set_frequency(radio_hal_interface *handle, uint32_t frequency);
-int radio_hal_get_signal_strength(radio_hal_interface *handle, int32_t *strength);
-int radio_hal_mute(radio_hal_interface *handle);
-int radio_hal_unmute(radio_hal_interface *handle);
-int radio_hal_set_volume(radio_hal_interface *handle, float volume);
-int radio_hal_get_volume(radio_hal_interface *handle, float *volume);
-int radio_hal_set_media_volume(radio_hal_interface *handle, uint32_t level);
-
-
-#ifdef __cplusplus
-}
-#endif
diff --git a/src/include/tizen-radio.h b/src/include/tizen-radio.h
deleted file mode 100644
index 494df04..0000000
--- a/src/include/tizen-radio.h
+++ /dev/null
@@ -1,307 +0,0 @@
-/*
- * tizen-radio.h
- *
- * Copyright (c) 2016 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-#ifndef __TIZEN_RADIO_HAL_H__
-#define __TIZEN_RADIO_HAL_H__
-
-#include <stdint.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-/**
- * @file tizen-radio.h
- * @brief This file contains the Tizen radio HAL API, related structures and enumerations.
- * @since_tizen 3.0
- */
-
-/**
- * @addtogroup TIZEN_RADIO_HAL_MODULE
- * @{
- */
-
-/**
- * @brief Enumeration for the radio error.
- * @since_tizen 3.0
- */
-typedef enum radio_error {
- RADIO_ERROR_NONE,
- RADIO_ERROR_INVALID_PARAMETER,
- RADIO_ERROR_INVALID_OPERATION,
- RADIO_ERROR_PERMISSION_DENIED,
- RADIO_ERROR_NOT_SUPPORTED,
- RADIO_ERROR_OUT_OF_MEMORY,
- RADIO_ERROR_DEVICE_NOT_PREPARED,
- RADIO_ERROR_DEVICE_NOT_OPENED,
- RADIO_ERROR_DEVICE_NOT_FOUND,
- RADIO_ERROR_NO_ANTENNA,
- RADIO_ERROR_INTERNAL,
- RADIO_ERROR_NOT_IMPLEMENTED,
- RADIO_ERROR_UNKNOWN
-} radio_error_t;
-
-/**
- * @brief Enumeration for the radio seek direction.
- * @since_tizen 3.0
- */
-typedef enum radio_seek_direction_type {
- RADIO_SEEK_DIRECTION_UP, /**< Seek upward */
- RADIO_SEEK_DIRECTION_DOWN /**< Seek downward */
-} radio_seek_direction_type_t;
-
-typedef struct radio_interface {
- /* create & destroy */
- radio_error_t (*init)(void **radio_hanle);
- radio_error_t (*deinit)(void *radio_handle);
- radio_error_t (*prepare)(void *radio_handle);
- radio_error_t (*unprepare)(void *radio_handle);
- radio_error_t (*open)(void *radio_handle);
- radio_error_t (*close)(void *radio_handle);
- radio_error_t (*start)(void *radio_handle);
- radio_error_t (*stop)(void *radio_handle);
- radio_error_t (*seek)(void *radio_handle, radio_seek_direction_type_t direction);
- radio_error_t (*get_frequency)(void *radio_handle, uint32_t *frequency);
- radio_error_t (*set_frequency)(void *radio_handle, uint32_t frequency);
- radio_error_t (*mute)(void *radio_handle);
- radio_error_t (*unmute)(void *radio_handle);
- radio_error_t (*get_signal_strength)(void *radio_handle, int32_t *strength);
- radio_error_t (*get_volume)(void *radio_handle, float *volume);
- radio_error_t (*set_volume)(void *radio_handle, float volume);
- radio_error_t (*set_media_volume)(void *radio_handle, uint32_t level);
-} radio_interface_t;
-
-/**
- * @brief Initializes new handle of radio HAL.
- * @since_tizen 3.0
- * @param[out] radio_handle A newly returned the radio HAL handle
- * @return @c 0 on success, otherwise a negative error value
- * @retval #RADIO_ERROR_NONE Successful
- * @retval #RADIO_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #RADIO_ERROR_OUT_OF_MEMORY Out of memory
- * @retval #RADIO_ERROR_INVALID_OPERATION Invalid operation
- * @see radio_deinit()
- */
-radio_error_t radio_init(void **radio_handle);
-
-/**
- * @brief Deinitializes handle of radio HAL.
- * @since_tizen 3.0
- * @param[in] radio_handle The radio HAL handle
- * @return @c 0 on success, otherwise a negative error value
- * @retval #RADIO_ERROR_NONE Successful
- * @retval #RADIO_ERROR_INVALID_PARAMETER Invalid parameter
- * @see radio_init()
- */
-radio_error_t radio_deinit(void *radio_handle);
-
-/**
- * @brief Prepare the device of radio.
- * @since_tizen 3.0
- * @param[in] radio_handle The radio HAL handle
- * @return @c 0 on success, otherwise a negative error value
- * @retval #RADIO_ERROR_NONE Successful
- * @retval #RADIO_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #RADIO_ERROR_INVALID_OPERATION Invalid operation
- * @see radio_unprepare()
- */
-radio_error_t radio_prepare(void *radio_handle);
-
-/**
- * @brief Unprepare the device of radio.
- * @since_tizen 3.0
- * @param[in] radio_handle The radio HAL handle
- * @return @c 0 on success, otherwise a negative error value
- * @retval #RADIO_ERROR_NONE Successful
- * @retval #RADIO_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #RADIO_ERROR_INVALID_OPERATION Invalid operation
- * @see radio_prepare()
- */
-radio_error_t radio_unprepare(void *radio_handle);
-
-/**
- * @brief Opens the device of radio.
- * @since_tizen 3.0
- * @param[in] radio_handle The radio HAL handle
- * @return @c 0 on success, otherwise a negative error value
- * @retval #RADIO_ERROR_NONE Successful
- * @retval #RADIO_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #RADIO_ERROR_DEVICE_NOT_FOUND Failed to find radio device
- * @retval #RADIO_ERROR_INVALID_OPERATION Invalid operation
- * @retval #RADIO_ERROR_PERMISSION_DENIED The access to the resources can not be granted.
- * @retval #RADIO_ERROR_DEVICE_NOT_PREPARED Not prepared the radio device
- * @see radio_close()
- */
-radio_error_t radio_open(void *radio_handle);
-
-/**
- * @brief Closes the device of radio.
- * @since_tizen 3.0
- * @param[in] radio_handle The radio HAL handle
- * @return @c 0 on success, otherwise a negative error value
- * @retval #RADIO_ERROR_NONE Successful
- * @retval #RADIO_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #RADIO_ERROR_DEVICE_NOT_OPENED The radio device is not opened.
- * @retval #RADIO_ERROR_INVALID_OPERATION Invalid operation
- * @see radio_open()
- */
-radio_error_t radio_close(void *radio_handle);
-
-/**
- * @brief Starts the device of radio.
- * @since_tizen 3.0
- * @param[in] radio_handle The radio HAL handle
- * @return @c 0 on success, otherwise a negative error value
- * @retval #RADIO_ERROR_NONE Successful
- * @retval #RADIO_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #RADIO_ERROR_DEVICE_NOT_OPENED The radio device is not opened.
- * @see radio_stop()
- */
-radio_error_t radio_start(void *radio_handle);
-
-/**
- * @brief Stops the device of radio.
- * @since_tizen 3.0
- * @param[in] radio_handle The radio HAL handle
- * @return @c 0 on success, otherwise a negative error value
- * @retval #RADIO_ERROR_NONE Successful
- * @retval #RADIO_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #RADIO_ERROR_DEVICE_NOT_OPENED The radio device is not opened.
- * @see radio_start()
- */
-radio_error_t radio_stop(void *radio_handle);
-
-/**
- * @brief Seeks (up or down) the effective frequency of the radio.
- * @since_tizen 3.0
- * @param[in] radio_handle The radio HAL handle
- * @param[in] direction The seek direction type (up or down)
- * @return @c 0 on success, otherwise a negative error value
- * @retval #RADIO_ERROR_NONE Successful
- * @retval #RADIO_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #RADIO_ERROR_DEVICE_NOT_OPENED The radio device is not opened
- * @retval #RADIO_ERROR_INVALID_OPERATION Invalid operation
- */
-radio_error_t radio_seek(void *radio_handle, radio_seek_direction_type_t direction);
-
-/**
- * @brief Gets the radio frequency.
- * @since_tizen 3.0
- * @param[in] radio_handle The radio HAL handle
- * @param[out] frequency The current frequency (khz)
- * @return @c 0 on success, otherwise a negative error value
- * @retval #RADIO_ERROR_NONE Successful
- * @retval #RADIO_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #RADIO_ERROR_INVALID_OPERATION Invalid operation
- */
-radio_error_t radio_get_frequency(void *radio_handle, uint32_t *frequency);
-
-/**
- * @brief Sets the radio frequency.
- * @since_tizen 3.0
- * @param[in] radio_handle The radio HAL handle
- * @param[in] frequency The frequency to set (khz)
- * @return @c 0 on success, otherwise a negative error value
- * @retval #RADIO_ERROR_NONE Successful
- * @retval #RADIO_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #RADIO_ERROR_INVALID_OPERATION Invalid operation
- */
-radio_error_t radio_set_frequency(void *radio_handle, uint32_t frequency);
-
-/**
- * @brief Sets the radio's mute
- * @since_tizen 3.0
- * @param[in] radio_handle The radio HAL handle
- * @return @c 0 on success, otherwise a negative error value
- * @retval #RADIO_ERROR_NONE Successful
- * @retval #RADIO_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #RADIO_ERROR_INVALID_OPERATION Invalid operation
- */
-radio_error_t radio_mute(void *radio_handle);
-
-/**
- * @brief Unsets the radio's mute
- * @since_tizen 3.0
- * @param[in] radio_handle The radio HAL handle
- * @return @c 0 on success, otherwise a negative error value
- * @retval #RADIO_ERROR_NONE Successful
- * @retval #RADIO_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #RADIO_ERROR_INVALID_OPERATION Invalid operation
- */
-radio_error_t radio_unmute(void *radio_handle);
-
-/**
- * @brief Gets the current signal strength of the radio
- * @since_tizen 3.0
- * @param[in] radio_handle The radio HAL handle
- * @param[out] strength The current signal strength (dBm)
- * @return @c 0 on success, otherwise a negative error value
- * @retval #RADIO_ERROR_NONE Successful
- * @retval #RADIO_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #RADIO_ERROR_INVALID_OPERATION Invalid operation
- */
-radio_error_t radio_get_signal_strength(void *radio_handle, int32_t *strength);
-
-/**
- * @brief Gets the radio's current volume.
- * @since_tizen 3.0
- * @param[in] radio_handle The radio HAL handle
- * @param[out] volume The current radio volume (0.0 ~ 1.0)
- * @return @c 0 on success, otherwise a negative error value
- * @retval #RADIO_ERROR_NONE Successful
- * @retval #RADIO_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #RADIO_ERROR_INVALID_OPERATION Invalid operation
- */
-radio_error_t radio_get_volume(void *radio_handle, float *volume);
-
-/**
- * @brief Sets the current radio's volume.
- * @since_tizen 3.0
- * @param[in] radio_handle The radio HAL handle
- * @param[in] volume The radio volume to set (0.0 ~ 1.0)
- * @return @c 0 on success, otherwise a negative error value
- * @retval #RADIO_ERROR_NONE Successful
- * @retval #RADIO_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #RADIO_ERROR_INVALID_OPERATION Invalid operation
- */
-radio_error_t radio_set_volume(void *radio_handle, float volume);
-
-/**
- * @brief Sets the current media volume level(system media volume).
- * @since_tizen 3.0
- * @param[in] radio_handle The radio HAL handle
- * @param[in] level The media volume level to set
- * @return @c 0 on success, otherwise a negative error value
- * @retval #RADIO_ERROR_NONE Successful
- * @retval #RADIO_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #RADIO_ERROR_INVALID_OPERATION Invalid operation
- */
-radio_error_t radio_set_media_volume(void *radio_handle, uint32_t level);
-
-
-/**
- * @}
- */
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* __TIZEN_RADIO_HAL_H__ */
-