Move notification_get_text_input_max_length to internal 51/89151/2
authorMyungki Lee <mk5004.lee@samsung.com>
Thu, 22 Sep 2016 11:50:44 +0000 (20:50 +0900)
committerMyungki Lee <mk5004.lee@samsung.com>
Thu, 22 Sep 2016 12:01:59 +0000 (21:01 +0900)
- Fix typo
- change range to check event_type

Change-Id: I32af45dd74a5a4e9586ad6af71a78d6d40bc5f5a
Signed-off-by: Myungki Lee <mk5004.lee@samsung.com>
include/notification.h
src/notification.c
src/notification_internal.c

index ed95895..f9ba754 100755 (executable)
@@ -1628,12 +1628,12 @@ int notification_get_noti_block_state(notification_block_state_e *state);
                return;
        }
 
-       noti_err = app_control_set_app_id(app_contorl, appid);
+       noti_err = app_control_set_app_id(app_control, appid);
        if (noti_err != APP_CONTROL_ERROR_NONE) {
                return;
        }
 
-       noti_err = app_control_set_operation(app_contorl, APP_CONTROL_OPERATION_DEFAULT);
+       noti_err = app_control_set_operation(app_control, APP_CONTROL_OPERATION_DEFAULT);
        if (noti_err != APP_CONTROL_ERROR_NONE) {
                return;
        }
index eacf907..b1d84fd 100755 (executable)
@@ -1154,7 +1154,7 @@ EXPORT_API int notification_set_event_handler(notification_h noti, notification_
        }
 
        if (event_type < NOTIFICATION_EVENT_TYPE_CLICK_ON_BUTTON_1
-               || event_type > NOTIFICATION_EVENT_TYPE_CLICK_ON_THUMBNAIL) {
+               || event_type >= NOTIFICATION_EVENT_TYPE_MAX) {
                NOTIFICATION_ERR("NOTIFICATION_ERROR_INVALID_PARAMETER");
                err = NOTIFICATION_ERROR_INVALID_PARAMETER;
                goto out;
@@ -1193,7 +1193,7 @@ EXPORT_API int notification_get_event_handler(notification_h noti, notification_
        }
 
        if (event_type < NOTIFICATION_EVENT_TYPE_CLICK_ON_BUTTON_1
-               || event_type > NOTIFICATION_EVENT_TYPE_CLICK_ON_THUMBNAIL) {
+               || event_type >= NOTIFICATION_EVENT_TYPE_MAX) {
                NOTIFICATION_ERR("NOTIFICATION_ERROR_INVALID_PARAMETER");
                err = NOTIFICATION_ERROR_INVALID_PARAMETER;
                goto out;
@@ -1916,13 +1916,3 @@ EXPORT_API int notification_set_text_input(notification_h noti, int text_input_m
 
        return NOTIFICATION_ERROR_NONE;
 }
-
-EXPORT_API int notification_get_text_input_max_length(notification_h noti, int *text_input_max_length)
-{
-       if (noti == NULL || text_input_max_length == NULL)
-               return NOTIFICATION_ERROR_INVALID_PARAMETER;
-
-       *text_input_max_length = noti->text_input_max_length;
-
-       return NOTIFICATION_ERROR_NONE;
-}
index bfbae65..d1b8344 100755 (executable)
@@ -1401,3 +1401,13 @@ EXPORT_API int notification_set_hide_timeout(notification_h noti, int timeout)
 
        return NOTIFICATION_ERROR_NONE;
 }
+
+EXPORT_API int notification_get_text_input_max_length(notification_h noti, int *text_input_max_length)
+{
+       if (noti == NULL || text_input_max_length == NULL)
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
+
+       *text_input_max_length = noti->text_input_max_length;
+
+       return NOTIFICATION_ERROR_NONE;
+}