fix coding rule error 18/149718/2
authorYoungjae Shin <yj99.shin@samsung.com>
Wed, 13 Sep 2017 02:58:23 +0000 (11:58 +0900)
committerYoungjae Shin <yj99.shin@samsung.com>
Wed, 13 Sep 2017 23:16:59 +0000 (08:16 +0900)
Change-Id: I0e36295d694bbe2aa0d899ba11ff57765e556a9d

alarm-manager.c
include/alarm-internal.h
include/alarm.h
src/alarm-lib.c

index 7877fc8..c65a5b9 100644 (file)
@@ -212,24 +212,24 @@ static profile_t _get_profile()
 
        system_info_get_platform_string("http://tizen.org/feature/profile", &profileName);
        switch (*profileName) {
-               case 'm':
-               case 'M':
-                       saved = PROFILE_MOBILE;
-                       break;
-               case 'w':
-               case 'W':
-                       saved = PROFILE_WEARABLE;
-                       break;
-               case 't':
-               case 'T':
-                       saved = PROFILE_TV;
-                       break;
-               case 'i':
-               case 'I':
-                       saved = PROFILE_IVI;
-                       break;
-               default: // common or unknown ==> ALL ARE COMMON.
-                       saved = PROFILE_COMMON;
+       case 'm':
+       case 'M':
+               saved = PROFILE_MOBILE;
+               break;
+       case 'w':
+       case 'W':
+               saved = PROFILE_WEARABLE;
+               break;
+       case 't':
+       case 'T':
+               saved = PROFILE_TV;
+               break;
+       case 'i':
+       case 'I':
+               saved = PROFILE_IVI;
+               break;
+       default: // common or unknown ==> ALL ARE COMMON.
+               saved = PROFILE_COMMON;
        }
        free(profileName);
 
@@ -801,9 +801,8 @@ static bool __alarm_update_due_time_of_all_items_in_list(double diff_time)
                                start->min = p_time->tm_min;
                                start->sec = p_time->tm_sec;
                        }
-                       if (entry->start != 0) {
+                       if (entry->start != 0)
                                entry->start = entry->due_time;
-                       }
 
                        if (entry->end != 0) {
                                entry->end += diff_time;
index ffe7a0a..b5e18fc 100644 (file)
@@ -135,9 +135,9 @@ typedef struct {
 } alarm_info_t;
 
 bool _send_alarm_create(alarm_context_t context, alarm_info_t *alarm,
-                       alarm_id_t *id, const char *dst_service_name,const char *dst_service_name_mod, int *error_code);
+                       alarm_id_t *id, const char *dst_service_name, const char *dst_service_name_mod, int *error_code);
 bool _send_alarm_create_appsvc(alarm_context_t context, alarm_info_t *alarm_info,
-                       alarm_id_t *alarm_id, bundle *b,int *error_code);
+                       alarm_id_t *alarm_id, bundle *b, int *error_code);
 bool _send_alarm_create_noti(alarm_context_t context, alarm_info_t *alarm_info,
                        alarm_id_t *alarm_id, notification_h noti, int *error_code);
 bool _send_alarm_update(alarm_context_t context, alarm_id_t alarm_id,
index d926908..dfde838 100644 (file)
@@ -164,7 +164,7 @@ extern "C" {
 typedef int alarm_id_t;
 /**
 * The prototype of alarm handler.
-* param [in]   alarm_id the id of expired alarm
+* param [in]   alarm_id the id of expired alarm
 */
 typedef int (*alarm_set_time_cb_t) (int result, void *user_param);
 
@@ -301,10 +301,10 @@ int alarmmgr_init(const char *appid);
  *
  * @param       None
  *
- * @return     None
+ * @return     None
  *
  * @pre                Alarm manager is initialized
- * @post       Alarm manager is de-initialized
+ * @post       Alarm manager is de-initialized
  * @remark An application must call this function once it is done with alarmmanger usage
  * @par Sample code:
  * @code
@@ -315,7 +315,7 @@ int alarmmgr_init(const char *appid);
        // Initialize alarmmanager
        // Set alarm
 
-        alarmmgr_fini() ;
+       alarmmgr_fini() ;
 }
  * @endcode
  */
@@ -346,13 +346,12 @@ void alarmmgr_fini();
 // Call back function
 int callback(alarm_id_t alarm_id,void* user_param)
 {
-        time_t current_time;
-        time(&current_time);
-
-        printf("Alarm[%d] has expired at %s\n", alarm_id, ctime(&current_time));
+       time_t current_time;
+       time(&current_time);
 
-        return 0;
+       printf("Alarm[%d] has expired at %s\n", alarm_id, ctime(&current_time));
 
+       return 0;
 }
 
 ...
@@ -529,7 +528,7 @@ int alarmmgr_set_time(alarm_entry_t *alarm, alarm_date_t time);
  * @post None.
  * @see None.
  * @remark     But an application does not need to specify year, month, and day field of alarm_info. If an application sets
- *                     those fields with zero, the function sets them with proper values.
+ *                     those fields with zero, the function sets them with proper values.
  *
  * @par Sample code:
  * @code
@@ -593,8 +592,8 @@ int alarmmgr_get_time(const alarm_entry_t *alarm, alarm_date_t *time);
  *                                                             ALARM_REPEAT_MODE_WEEKLY, ALARM_REPEAT_MODE_MONTHLY or ALARM_REPEAT_MODE_ANNUALLY.
  * @param      [in]    repeat_value    the ALARM_REPEAT_MODE_REPEAT mode : interval between subsequent repeats of the alarm.
  *                                                             the ALARM_REPEAT_MODE_WEEKLY mode : days of a week
- *                                                             (ALARM_WDAY_SUNDAY, ALARM_WDAY_MONDAY, ALARM_WDAY_TUESDAY,      ALARM_WDAY_WEDNESDAY,
- *                                                             ALARM_WDAY_THURSDAY,    ALARM_WDAY_FRIDAY, ALARM_WDAY_SATURDAY)
+ *                                                             (ALARM_WDAY_SUNDAY, ALARM_WDAY_MONDAY, ALARM_WDAY_TUESDAY, ALARM_WDAY_WEDNESDAY,
+ *                                                             ALARM_WDAY_THURSDAY, ALARM_WDAY_FRIDAY, ALARM_WDAY_SATURDAY)
  *                                                             the others : this parameter is ignored.
  *
  * @return     This function returns ALARMMGR_RESULT_SUCCESS on success or a negative number on failure.
@@ -653,8 +652,8 @@ int alarmmgr_set_repeat_mode(alarm_entry_t *alarm,
  *                                                                     ALARM_REPEAT_MODE_WEEKLY, ALARM_REPEAT_MODE_MONTHLY or ALARM_REPEAT_MODE_ANNUALLY.
  * @param      [out]   repeat_value    the ALARM_REPEAT_MODE_REPEAT mode : interval between subsequent repeats of the alarm.
  *                                                                     the ALARM_REPEAT_MODE_WEEKLY mode : days of a week
- *                                                                     (ALARM_WDAY_SUNDAY, ALARM_WDAY_MONDAY, ALARM_WDAY_TUESDAY,      ALARM_WDAY_WEDNESDAY,
- *                                                                     ALARM_WDAY_THURSDAY,    ALARM_WDAY_FRIDAY, ALARM_WDAY_SATURDAY)
+ *                                                                     (ALARM_WDAY_SUNDAY, ALARM_WDAY_MONDAY, ALARM_WDAY_TUESDAY, ALARM_WDAY_WEDNESDAY,
+ *                                                                     ALARM_WDAY_THURSDAY, ALARM_WDAY_FRIDAY, ALARM_WDAY_SATURDAY)
  *                                                                     the others : this parameter is ignored.
  *
  * @return     This function returns ALARMMGR_RESULT_SUCCESS on success or a negative number on failure.
@@ -705,7 +704,7 @@ int alarmmgr_get_repeat_mode(const alarm_entry_t *alarm,
  *
  * @param      [in]    alarm   alarm entry
  * @param      [in]    alarm_type      one of ALARM_TYPE_DEFAULT : After the device reboot, the alarm still works.
- *                                                     ALARM_TYPE_VOLATILE : After the device reboot, the alarm does not work.
+ *                                                     ALARM_TYPE_VOLATILE : After the device reboot, the alarm does not work.
  *
  * @return     This function returns ALARMMGR_RESULT_SUCCESS on success or a negative number on failure.
  *
@@ -807,7 +806,7 @@ int alarmmgr_get_type(const alarm_entry_t *alarm, int *alarm_type);
  *
  * @param      [in]            alarm           the entry of an alarm to be created.
  * @param      [in]            bundle_data     bundle which contains information about the destination.
- * @param      [out]           alarm_id        the id of the alarm added.
+ * @param      [out]           alarm_id        the id of the alarm added.
  *
  * @return     This function returns ALARMMGR_RESULT_SUCCESS on success or a negative number on failure.
  *
@@ -878,7 +877,7 @@ int alarmmgr_get_type(const alarm_entry_t *alarm, int *alarm_type);
 }
  * @endcode
  */
-int alarmmgr_add_alarm_appsvc_with_localtime(alarm_entry_t *alarm,void *bundle_data, alarm_id_t *alarm_id);
+int alarmmgr_add_alarm_appsvc_with_localtime(alarm_entry_t *alarm, void *bundle_data, alarm_id_t *alarm_id);
 
 /**
  * This function adds an alarm entry to the server.
@@ -964,7 +963,7 @@ int alarmmgr_add_alarm_noti_with_localtime(alarm_entry_t *alarm, notification_h
  *
  * @param      [in]            alarm           the entry of an alarm to be created.
  * @param      [in]            destination     the packname of application that the alarm will be expired.
- * @param      [out]   alarm_id                the id of the alarm added.
+ * @param      [out]   alarm_id                the id of the alarm added.
  *
  * @return     This function returns ALARMMGR_RESULT_SUCCESS on success or a negative number on failure.
  *
@@ -1054,7 +1053,7 @@ int alarmmgr_add_alarm_with_localtime(alarm_entry_t *alarm,
  * @param      [in]            trigger_at_time time interval to be triggered from now(sec). an alarm also will be expired at triggering time.
  * @param      [in]            interval                Interval between subsequent repeats of the alarm
  * @param      [in]            bundle_data             bundle which contains information about the destination.
- * @param      [out]   alarm_id                        the id of the alarm added.
+ * @param      [out]   alarm_id                        the id of the alarm added.
  *
  * @return     This function returns ALARMMGR_RESULT_SUCCESS on success or a negative number on failure.
  *
@@ -1069,7 +1068,7 @@ int alarmmgr_add_alarm_with_localtime(alarm_entry_t *alarm,
 
  ...
  {
-               int result;
+               int result;
                alarm_id_t alarm_id;
 
                bundle *b=NULL;
@@ -1115,7 +1114,7 @@ int alarmmgr_add_alarm_appsvc(int alarm_type, time_t trigger_at_time,
  * @param      [in]            trigger_at_time time interval to be triggered from now(sec). an alarm also will be expired at triggering time.
  * @param      [in]            interval                Interval between subsequent repeats of the alarm
  * @param      [in]            noti                    notification handle to be posted when the alarm is expired
- * @param      [out]   alarm_id                the id of the alarm added.
+ * @param      [out]   alarm_id                the id of the alarm added.
  *
  * @return     This function returns ALARMMGR_RESULT_SUCCESS on success or a negative number on failure.
  *
@@ -1167,7 +1166,7 @@ int alarmmgr_add_alarm_noti(int alarm_type, time_t trigger_at_time,
  * @param      [in]            trigger_at_time time interval to be triggered from now(sec). an alarm also will be expired at triggering time.
  * @param      [in]            interval                        Interval between subsequent repeats of the alarm
  * @param      [in]            destination             the packname of application that the alarm will be expired.
- * @param      [out]   alarm_id                        the id of the alarm added.
+ * @param      [out]   alarm_id                        the id of the alarm added.
  *
  * @return     This function returns ALARMMGR_RESULT_SUCCESS on success or a negative number on failure.
  *
@@ -1370,8 +1369,8 @@ int alarmmgr_enum_alarm_ids(alarm_enum_fn_t fn, void *user_param);
  * This function gets the information of the alarm assosiated with alarm_id to alarm_info. The application
  * must allocate alarm_info before calling this function.
  *
- * @param      [in]    alarm_id                the id of the alarm
- * @param      [out]   alarm   the buffer alarm informaiton will be copied to
+ * @param      [in]    alarm_id                the id of the alarm
+ * @param      [out]   alarm   the buffer alarm informaiton will be copied to
  *
  * @return                     This function returns ALARMMGR_RESULT_SUCCESS on success or a negative number on failure.
  *
@@ -1492,8 +1491,8 @@ int alarmmgr_get_alarm_noti_info(alarm_id_t alarm_id, notification_h *noti);
 /**
  * This function gets the scheduled time of the alarm assosiated with alarm_id.
  *
- * @param      [in]    alarm_id                the id of the alarm
- * @param      [out]   duetime the scheduled time of the alarm
+ * @param      [in]    alarm_id                the id of the alarm
+ * @param      [out]   duetime the scheduled time of the alarm
  *
  * @return                     This function returns ALARMMGR_RESULT_SUCCESS on success or a negative number on failure.
  *
@@ -1502,7 +1501,7 @@ int alarmmgr_get_alarm_noti_info(alarm_id_t alarm_id, notification_h *noti);
  * @see None
  * @remark  None.
  */
- int alarmmgr_get_next_duetime(alarm_id_t alarm_id, time_t *duetime);
+int alarmmgr_get_next_duetime(alarm_id_t alarm_id, time_t *duetime);
 
 /**
  * This function sets power RTC (which can power on the system).
@@ -1604,8 +1603,8 @@ int alarmmgr_set_timezone(char *tzpath_str);
  * This function sets global
  * @remarks The @a alarm_id must be id of alarm which will launch global application.
  *          The function returns an error (error code #ERR_ALARM_INVALID_ID) if it is not.
- * @param      [in]    alarm_id                the id of the alarm
- * @param      [in]    global          value to set global or not
+ * @param      [in]    alarm_id                the id of the alarm
+ * @param      [in]    global          value to set global or not
  *
  * @return     @c ALARMMGR_RESULT_SUCCESS on success,
  *                     otherwise a negative error value
@@ -1618,8 +1617,8 @@ int alarmmgr_set_global(alarm_id_t alarm_id, bool global);
 
 /**
  * This function gets global
- * @param      [in]    alarm_id                the id of the alarm
- * @param      [out]   global  Whether the alarm is global or not
+ * @param      [in]    alarm_id                the id of the alarm
+ * @param      [out]   global  Whether the alarm is global or not
  *
  * @return     @c ALARMMGR_RESULT_SUCCESS on success,
  *                     otherwise a negative error value
@@ -1637,7 +1636,7 @@ int alarmmgr_get_global(const alarm_id_t alarm_id, bool *global);
  * @param      [in]            interval                        Interval between subsequent repeats of the alarm
  * @param      [in]            handler                 The callback function invoked when the alarm is expired
  * @param      [in]            user_param              Parameters of callback function
- * @param      [out]   alarm_id                        The id of the alarm added
+ * @param      [out]   alarm_id                        The id of the alarm added
  *
  * @return     @c ALARMMGR_RESULT_SUCCESS on success,
  *                     otherwise a negative error value
@@ -1658,7 +1657,7 @@ int alarmmgr_add_alarm_withcb(int alarm_type, time_t trigger_at_time,
  * @param      [in]            interval                        Interval between subsequent repeats of the alarm
  * @param      [in]            handler                 The callback function invoked when the alarm is expired
  * @param      [in]            user_param              Parameters of callback function
- * @param      [out]   alarm_id                        The id of the alarm added
+ * @param      [out]   alarm_id                        The id of the alarm added
  *
  * @return     @c ALARMMGR_RESULT_SUCCESS on success,
  *                     otherwise a negative error value
index d380977..9a6024d 100644 (file)
@@ -80,15 +80,15 @@ guint registration_id;
 static GDBusNodeInfo *introspection_data;
 
 static const gchar introspection_xml[] =
-  "<node name='/org/tizen/alarm/client'>"
-  "  <interface name='org.tizen.alarm.client'>"
-  "    <method name='alarm_expired'>"
-  "      <arg type='i' name='alarm_id' direction='in'/>"
-  "      <arg type='i' name='msec' direction='in'/>"
-  "      <arg type='s' name='service_name' direction='in'/>"
-  "    </method>"
-  "  </interface>"
-  "</node>";
+       "<node name='/org/tizen/alarm/client'>"
+       "  <interface name='org.tizen.alarm.client'>"
+       "    <method name='alarm_expired'>"
+       "      <arg type='i' name='alarm_id' direction='in'/>"
+       "      <arg type='i' name='msec' direction='in'/>"
+       "      <arg type='s' name='service_name' direction='in'/>"
+       "    </method>"
+       "  </interface>"
+       "</node>";
 
 static const GDBusInterfaceVTable interface_vtable = {
        __handle_expiry_method_call,