Fix as Tizen coding rule. 27/55127/1 accepted/tizen/mobile/20151222.090557 accepted/tizen/tv/20151222.090617 accepted/tizen/wearable/20151222.090633 submit/tizen/20151222.062826 submit/tizen_common/20151229.142028 submit/tizen_common/20151229.144031 submit/tizen_common/20151229.154718
authorpr.jung <pr.jung@samsung.com>
Tue, 22 Dec 2015 06:21:05 +0000 (15:21 +0900)
committerpr.jung <pr.jung@samsung.com>
Tue, 22 Dec 2015 06:22:19 +0000 (15:22 +0900)
Change-Id: I8a07e55244c1dd6a55dd23e153e20ca48ef13d99
Signed-off-by: pr.jung <pr.jung@samsung.com>
src/callback.c
src/dbus.c
src/device.c
src/display.c
src/haptic.c
src/led.c
src/power.c

index b9867da..8958be4 100644 (file)
@@ -104,7 +104,7 @@ static void display_changed_cb(keynode_t *key, void *data)
 
        val = vconf_keynode_get_int(key);
 
-       switch(val) {
+       switch (val) {
        case 1: state = DISPLAY_STATE_NORMAL;
                        break;
        case 2: state = DISPLAY_STATE_SCREEN_DIM;
@@ -159,7 +159,7 @@ static int register_signal(const char *bus_name,
        GDBusConnection *conn;
        int id;
 
-#if !GLIB_CHECK_VERSION(2,35,0)
+#if !GLIB_CHECK_VERSION(2, 35, 0)
        g_type_init();
 #endif
 
index f5fda67..497096f 100644 (file)
@@ -90,7 +90,7 @@ int dbus_method_sync(const char *dest, const char *path,
        GVariant *output;
        int result;
 
-#if !GLIB_CHECK_VERSION(2,35,0)
+#if !GLIB_CHECK_VERSION(2, 35, 0)
        g_type_init();
 #endif
 
@@ -180,7 +180,7 @@ int dbus_method_async_with_reply(const char *dest, const char *path,
        struct pending_call_data *pdata;
        int result;
 
-#if !GLIB_CHECK_VERSION(2,35,0)
+#if !GLIB_CHECK_VERSION(2, 35, 0)
        g_type_init();
 #endif
 
index a58f2d1..0eca063 100644 (file)
@@ -30,7 +30,7 @@
                                return DEVICE_ERROR_NOT_SUPPORTED;      \
                        return DEVICE_ERROR_OPERATION_FAILED;   \
                }       \
-       } while(0)
+       } while (0)
 
 int device_get_display_numbers(int* device_number)
 {
@@ -117,15 +117,14 @@ static void battery_changed_inside_cb(keynode_t* key, void* user_data)
 
        if (keyname != NULL && changed_callback != NULL && strcmp(keyname, VCONFKEY_SYSMAN_BATTERY_CAPACITY) == 0) {
                int percent = 0;
-               if (vconf_get_int(VCONFKEY_SYSMAN_BATTERY_CAPACITY, &percent) == 0) {
+               if (vconf_get_int(VCONFKEY_SYSMAN_BATTERY_CAPACITY, &percent) == 0)
                        changed_callback(percent, changed_callback_user_data);
-               }
        }
 }
 
 int device_battery_set_cb(device_battery_cb callback, void* user_data)
 {
-       // VCONFKEY_SYSMAN_BATTERY_CAPACITY
+       /* VCONFKEY_SYSMAN_BATTERY_CAPACITY */
        int err;
        if (callback == NULL)
                return DEVICE_ERROR_INVALID_PARAMETER;
@@ -163,19 +162,19 @@ int device_battery_get_warning_status(device_battery_warn_e *status)
        if (err < 0)
                return DEVICE_ERROR_OPERATION_FAILED;
 
-       if (value == VCONFKEY_SYSMAN_BAT_POWER_OFF) {
+       if (value == VCONFKEY_SYSMAN_BAT_POWER_OFF)
                *status = DEVICE_BATTERY_WARN_EMPTY;
-       } else if (value == VCONFKEY_SYSMAN_BAT_CRITICAL_LOW) {
+       else if (value == VCONFKEY_SYSMAN_BAT_CRITICAL_LOW)
                *status = DEVICE_BATTERY_WARN_CRITICAL;
-       } else if (value == VCONFKEY_SYSMAN_BAT_WARNING_LOW) {
+       else if (value == VCONFKEY_SYSMAN_BAT_WARNING_LOW)
                *status = DEVICE_BATTERY_WARN_LOW;
-       } else if (value == VCONFKEY_SYSMAN_BAT_NORMAL) {
+       else if (value == VCONFKEY_SYSMAN_BAT_NORMAL)
                *status = DEVICE_BATTERY_WARN_NORMAL;
-       } else if (value == VCONFKEY_SYSMAN_BAT_FULL) {
+       else if (value == VCONFKEY_SYSMAN_BAT_FULL)
                *status = DEVICE_BATTERY_WARN_FULL;
-       } else {
+       else
                return DEVICE_ERROR_OPERATION_FAILED;
-       }
+
 
        return DEVICE_ERROR_NONE;
 }
@@ -189,15 +188,14 @@ static void battery_warn_changed_inside_cb(keynode_t* key, void* user_data)
 
        if (keyname != NULL && warn_changed_callback != NULL && strcmp(keyname, VCONFKEY_SYSMAN_BATTERY_STATUS_LOW) == 0) {
                int bat_state = 0;
-               if (vconf_get_int(VCONFKEY_SYSMAN_BATTERY_STATUS_LOW, &bat_state) == 0) {
+               if (vconf_get_int(VCONFKEY_SYSMAN_BATTERY_STATUS_LOW, &bat_state) == 0)
                        warn_changed_callback(bat_state-1, warn_changed_callback_user_data);
-               }
        }
 }
 
 int device_battery_warning_set_cb(device_battery_warn_cb callback, void* user_data)
 {
-       // VCONFKEY_SYSMAN_BATTERY_STATUS_LOW
+       /* VCONFKEY_SYSMAN_BATTERY_STATUS_LOW */
        int err;
 
        if (callback == NULL)
index 7cc728e..ee89036 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.
  */
 
 
index b7d8b58..5543c8f 100644 (file)
 #define METHOD_STOP_DEVICE                     "StopDevice"
 #define METHOD_VIBRATE_MONOTONE                "VibrateMonotone"
 
-enum feedback_e
-{
+enum feedback_e {
        HAPTIC_FEEDBACK_MIN = 0,
        HAPTIC_FEEDBACK_MAX = 100,
 };
 
-enum priority_e
-{
+enum priority_e {
        HAPTIC_PRIORITY_MIN = 0,
        HAPTIC_PRIORITY_MIDDLE,
        HAPTIC_PRIORITY_HIGH,
index f0245b3..fd97551 100644 (file)
--- a/src/led.c
+++ b/src/led.c
@@ -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.
  */
 
 
index 9fcd05f..8fee499 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.
  */