Fix the Tizen30 C API Coding Style 50/63850/1 accepted/tizen/common/20160414.143652 accepted/tizen/mobile/20160405.013349 accepted/tizen/tv/20160405.013609 accepted/tizen/wearable/20160405.013743 submit/tizen_common/20160413.090423 submit/tizen_mobile/20160328.074017 submit/tizen_tv/20160328.074007 submit/tizen_wearable/20160328.074609
authorcookie <cookie@samsung.com>
Mon, 28 Mar 2016 05:52:39 +0000 (14:52 +0900)
committercookie <cookie@samsung.com>
Mon, 28 Mar 2016 05:52:39 +0000 (14:52 +0900)
Change-Id: Ib3e27c5f3059730c5a17bd9da8fea75e1da97523
Signed-off-by: cookie <cookie@samsung.com>
include/download.h
src/download-wrapping.c

index 453bfb1..2a79ba3 100755 (executable)
@@ -42,8 +42,7 @@ extern "C"
  * @brief Enumeration for error codes of URL download.
  * @since_tizen 2.3
  */
-typedef enum
-{
+typedef enum {
     DOWNLOAD_ERROR_NONE = TIZEN_ERROR_NONE,                                 /**< Successful */
     DOWNLOAD_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER,       /**< Invalid parameter */
     DOWNLOAD_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY,               /**< Out of memory */
@@ -78,8 +77,7 @@ typedef enum
  * @brief Enumeration for download states.
  * @since_tizen 2.3
  */
-typedef enum
-{
+typedef enum {
     DOWNLOAD_STATE_NONE,         /**< Unhandled exception */
     DOWNLOAD_STATE_READY,        /**< Ready to download */
     DOWNLOAD_STATE_QUEUED,       /**< Queued to start downloading */
@@ -94,8 +92,7 @@ typedef enum
  * @brief Enumeration for network type for downloading.
  * @since_tizen 2.3
  */
-typedef enum
-{
+typedef enum {
     DOWNLOAD_NETWORK_DATA_NETWORK, /**< Download is available through data network */
     DOWNLOAD_NETWORK_WIFI,         /**< Download is available through WiFi */
     DOWNLOAD_NETWORK_WIFI_DIRECT,  /**< Download is available through WiFi-Direct */
@@ -110,8 +107,7 @@ typedef enum
  * @see download_set_notification_type()
  * @see download_get_notification_type()
  */
-typedef enum
-{
+typedef enum {
     DOWNLOAD_NOTIFICATION_TYPE_NONE = 0,       /**< Do not register notification */
     DOWNLOAD_NOTIFICATION_TYPE_COMPLETE_ONLY,  /**< Completion notification for success state and failed state */
     DOWNLOAD_NOTIFICATION_TYPE_ALL             /**< All download notifications for ongoing state, success state and failed state */
@@ -125,8 +121,7 @@ typedef enum
  * @see download_set_notification_app_control()
  * @see download_get_notification_app_control()
  */
-typedef enum
-{
+typedef enum {
     DOWNLOAD_NOTIFICATION_APP_CONTROL_TYPE_ONGOING = 0,  /**< App control action for failed and ongoing notification */
     DOWNLOAD_NOTIFICATION_APP_CONTROL_TYPE_COMPLETE,     /**< App control action for completed notification */
     DOWNLOAD_NOTIFICATION_APP_CONTROL_TYPE_FAILED        /**< App control action for failed notification*/
index 0afada1..8802ecd 100755 (executable)
@@ -105,33 +105,28 @@ int download_set_network_type(int download_id,
        system_info_get_platform_bool (WIFI_FEATURE, &bIsWifiFeatureSupported);
        system_info_get_platform_bool (WIFI_DIRECT_FEATURE, &bIsWifiDirectFeatureSupported);
 
-       switch (net_type)
-       {
-               case DOWNLOAD_NETWORK_DATA_NETWORK:
-                       if ( !bIsTelephonyFeatureSupported )
-                       {
-                               return DOWNLOAD_ERROR_NOT_SUPPORTED;
-                       }
-                       break;
-               case DOWNLOAD_NETWORK_WIFI:
-                       if ( !bIsWifiFeatureSupported )
-                       {
-                               return DOWNLOAD_ERROR_NOT_SUPPORTED;
-                       }
-                       break;
-               case DOWNLOAD_NETWORK_WIFI_DIRECT:
-                       if ( !bIsWifiDirectFeatureSupported )
-                       {
-                               return DOWNLOAD_ERROR_NOT_SUPPORTED;
-                       }
-                       break;
-               case DOWNLOAD_NETWORK_ALL:
-                       if ( !bIsTelephonyFeatureSupported && !bIsWifiFeatureSupported && !bIsWifiDirectFeatureSupported )
-                       {
-                               return DOWNLOAD_ERROR_NOT_SUPPORTED;
-                       }
-                       break;
-       }
+        switch (net_type) {
+            case DOWNLOAD_NETWORK_DATA_NETWORK:
+                if (!bIsTelephonyFeatureSupported) {
+                    return DOWNLOAD_ERROR_NOT_SUPPORTED;
+                }
+                break;
+            case DOWNLOAD_NETWORK_WIFI:
+                if (!bIsWifiFeatureSupported) {
+                    return DOWNLOAD_ERROR_NOT_SUPPORTED;
+                }
+            break;
+            case DOWNLOAD_NETWORK_WIFI_DIRECT:
+                if (!bIsWifiDirectFeatureSupported) {
+                    return DOWNLOAD_ERROR_NOT_SUPPORTED;
+                }
+            break;
+            case DOWNLOAD_NETWORK_ALL:
+                if (!bIsTelephonyFeatureSupported && !bIsWifiFeatureSupported && !bIsWifiDirectFeatureSupported) {
+                    return DOWNLOAD_ERROR_NOT_SUPPORTED;
+                }
+            break;
+        }
 
        return dp_interface_set_network_type(download_id, (int)net_type);
 }