Apply tizen C coding rule 08/64108/2 accepted/tizen/common/20160405.133446 accepted/tizen/ivi/20160406.013856 accepted/tizen/mobile/20160406.013817 accepted/tizen/wearable/20160406.013834 submit/tizen/20160405.084516
authorGilbok Lee <gilbok.lee@samsung.com>
Wed, 30 Mar 2016 05:58:22 +0000 (14:58 +0900)
committerGilbok Lee <gilbok.lee@samsung.com>
Thu, 31 Mar 2016 04:46:54 +0000 (13:46 +0900)
Change-Id: I954d354a3f85917283aa882ddd7f17c947014cb6
Signed-off-by: Gilbok Lee <gilbok.lee@samsung.com>
include/radio.h
include/radio_private.h
test/radio_test_type.h

index b7d78e4..5caba4d 100755 (executable)
@@ -44,8 +44,7 @@ typedef struct radio_s *radio_h;
  * @brief Enumeration of radio state.
  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
  */
-typedef enum
-{
+typedef enum {
        RADIO_STATE_READY,                      /**< Ready to play or scan */
        RADIO_STATE_PLAYING,            /**< Playing the audio from the tuner */
        RADIO_STATE_SCANNING,           /**< Scanning/Searching for the next station signal that starts from a given starting frequency */
@@ -55,8 +54,7 @@ typedef enum
  * @brief Enumeration of error codes for the radio.
  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
  */
-typedef enum
-{
+typedef enum {
        RADIO_ERROR_NONE                        = TIZEN_ERROR_NONE,                                                             /**< Successful */
        RADIO_ERROR_OUT_OF_MEMORY           = TIZEN_ERROR_OUT_OF_MEMORY,                                /**< Out of memory */
        RADIO_ERROR_INVALID_PARAMETER  = TIZEN_ERROR_INVALID_PARAMETER,                 /**< Invalid parameter */
@@ -72,17 +70,16 @@ typedef enum
  * @brief Enumeration of radio interrupted type.
  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
  */
-typedef enum
-{
-       RADIO_INTERRUPTED_COMPLETED = 0,                                        /**< Interrupt completed */
-       RADIO_INTERRUPTED_BY_MEDIA,                                             /**< Interrupted by a non-resumable media application */
-       RADIO_INTERRUPTED_BY_CALL,                                              /**< Interrupted by an incoming call */
-       RADIO_INTERRUPTED_BY_EARJACK_UNPLUG,                    /**< Interrupted by unplugging headphones */
-       RADIO_INTERRUPTED_BY_RESOURCE_CONFLICT,         /**< Interrupted by a resource conflict */
-       RADIO_INTERRUPTED_BY_ALARM,                                             /**< Interrupted by an alarm */
-       RADIO_INTERRUPTED_BY_EMERGENCY,                         /**< Interrupted by an emergency */
-       RADIO_INTERRUPTED_BY_RESUMABLE_MEDIA,                   /**< Interrupted by a resumable media application */
-       RADIO_INTERRUPTED_BY_NOTIFICATION,                              /**< Interrupted by a notification */
+typedef enum {
+       RADIO_INTERRUPTED_COMPLETED = 0,                                        /**< Interrupt completed */
+       RADIO_INTERRUPTED_BY_MEDIA,                                             /**< Interrupted by a non-resumable media application */
+       RADIO_INTERRUPTED_BY_CALL,                                              /**< Interrupted by an incoming call */
+       RADIO_INTERRUPTED_BY_EARJACK_UNPLUG,                    /**< Interrupted by unplugging headphones */
+       RADIO_INTERRUPTED_BY_RESOURCE_CONFLICT,         /**< Interrupted by a resource conflict */
+       RADIO_INTERRUPTED_BY_ALARM,                                             /**< Interrupted by an alarm */
+       RADIO_INTERRUPTED_BY_EMERGENCY,                         /**< Interrupted by an emergency */
+       RADIO_INTERRUPTED_BY_RESUMABLE_MEDIA,                   /**< Interrupted by a resumable media application */
+       RADIO_INTERRUPTED_BY_NOTIFICATION,                              /**< Interrupted by a notification */
 } radio_interrupted_code_e;
 
 /**
@@ -231,7 +228,7 @@ int radio_stop(radio_h radio);
  * @post It invokes radio_seek_completed_cb() when the seek completes.
  * @see radio_seek_down()
  */
-int radio_seek_up(radio_h radio,radio_seek_completed_cb callback, void *user_data );
+int radio_seek_up(radio_h radio, radio_seek_completed_cb callback, void *user_data);
 
 /**
  * @brief Seeks down the effective frequency of the radio, asynchronously.
@@ -250,7 +247,7 @@ int radio_seek_up(radio_h radio,radio_seek_completed_cb callback, void *user_dat
  * @post It invokes radio_seek_completed_cb() when the seek completes.
  * @see radio_seek_up()
  */
-int radio_seek_down(radio_h radio,radio_seek_completed_cb callback, void *user_data );
+int radio_seek_down(radio_h radio, radio_seek_completed_cb callback, void *user_data);
 
 /**
  * @brief Sets the radio frequency.
index b128372..edb4a3e 100644 (file)
@@ -11,7 +11,7 @@
 * 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. 
+* limitations under the License.
 */
 
 #ifndef __TIZEN_MEDIA_RADIO_PRIVATE_H__
@@ -30,12 +30,12 @@ typedef enum {
        _RADIO_EVENT_TYPE_SEEK_FINISH,
        _RADIO_EVENT_TYPE_INTERRUPT,
        _RADIO_EVENT_TYPE_NUM
-}_radio_event_e;
+} _radio_event_e;
 
-typedef struct _radio_s{
+typedef struct _radio_s {
        MMHandleType mm_handle;
-       const voiduser_cb[_RADIO_EVENT_TYPE_NUM];
-       voiduser_data[_RADIO_EVENT_TYPE_NUM];
+       const void *user_cb[_RADIO_EVENT_TYPE_NUM];
+       void *user_data[_RADIO_EVENT_TYPE_NUM];
        radio_state_e state;
        bool mute;
 } radio_s;
@@ -44,4 +44,4 @@ typedef struct _radio_s{
 }
 #endif
 
-#endif //__TIZEN_MEDIA_RADIO_PRIVATE_H__
+#endif /* __TIZEN_MEDIA_RADIO_PRIVATE_H__ */
index 39d5e0b..ff91cfe 100755 (executable)
@@ -36,13 +36,9 @@ typedef struct __test_item {
 
 #define RADIO_TEST__(x_test)   \
                ret = x_test    \
-               if ( ! ret )    \
-               {       \
+               if (!ret) {     \
                        printf("PASS : %s -- %s:%d\n", #x_test, __FILE__, __LINE__);    \
-               }       \
-               else    \
-               {       \
+               } else {        \
                        printf("FAIL : %s ERR-CODE : 0x%x -- %s:%d\n", #x_test, ret, __FILE__, __LINE__);       \
                }
-
 #endif /* MM_RADIO_TEST_TYPE_H_ */