Arrange naming of pkgid and appid 88/132388/3
authorSeungha Son <seungha.son@samsung.com>
Wed, 31 May 2017 06:29:10 +0000 (15:29 +0900)
committerSon seungha <seungha.son@samsung.com>
Thu, 8 Jun 2017 04:00:36 +0000 (04:00 +0000)
Signed-off-by: Seungha Son <seungha.son@samsung.com>
Change-Id: Iaba85348f484624e92b045923e91816d87b92cf7

include/notification_service.h
src/notification_service.c
src/service_common.c

index d2cd57f..4519141 100755 (executable)
@@ -34,7 +34,7 @@ int notification_load_noti_by_priv_id(GVariant *parameters, GVariant **reply_bod
 int notification_load_grouping_list(GVariant *parameters, GVariant **reply_body, uid_t uid);
 int notification_load_detail_list(GVariant *parameters, GVariant **reply_body, uid_t uid);
 int notification_get_setting_array(GVariant *parameters, GVariant **reply_body, uid_t uid);
-int notification_get_setting_by_appid(GVariant *parameters, GVariant **reply_body, uid_t uid);
+int notification_get_setting_by_app_id(GVariant *parameters, GVariant **reply_body, uid_t uid);
 int notification_load_system_setting(GVariant *parameters, GVariant **reply_body, uid_t uid);
 int notification_add_noti_template(GVariant *parameters, GVariant **reply_body, uid_t uid);
 int notification_get_noti_template(GVariant *parameters, GVariant **reply_body, pid_t pid, uid_t uid);
@@ -47,6 +47,6 @@ int notification_send_noti_event_by_priv_id(GVariant *parameters, GVariant **rep
 int notification_check_event_receiver(GVariant *parameters, GVariant **reply_body);
 int notification_reset_event_receiver(GVariant *parameters, GVariant **reply_body, const char *sender);
 int notification_register_dbus_interface();
-int notification_delete_noti_by_appid(const char *appid, uid_t uid);
+int notification_delete_noti_by_app_id(const char *app_id, uid_t uid);
 
 /* End of a file */
index edf1971..89c7d28 100755 (executable)
@@ -145,8 +145,8 @@ static void _noti_dbus_method_call_handler(GDBusConnection *conn,
                ret = notification_load_detail_list(parameters, &reply_body, uid);
        else if (g_strcmp0(method_name, "get_setting_array") == 0)
                ret = notification_get_setting_array(parameters, &reply_body, uid);
-       else if (g_strcmp0(method_name, "get_setting_by_appid") == 0)
-               ret = notification_get_setting_by_appid(parameters, &reply_body, uid);
+       else if (g_strcmp0(method_name, "get_setting_by_app_id") == 0)
+               ret = notification_get_setting_by_app_id(parameters, &reply_body, uid);
        else if (g_strcmp0(method_name, "load_system_setting") == 0)
                ret = notification_load_system_setting(parameters, &reply_body, uid);
        else if (g_strcmp0(method_name, "save_as_template") == 0)
@@ -214,28 +214,28 @@ int notification_register_dbus_interface()
                        "        </method>"
 
                        "        <method name='del_noti_single'>"
-                       "          <arg type='s' name='pkgname' direction='in'/>"
+                       "          <arg type='s' name='app_id' direction='in'/>"
                        "          <arg type='i' name='priv_id' direction='in'/>"
                        "          <arg type='i' name='uid' direction='in'/>"
                        "          <arg type='i' name='priv_id' direction='out'/>"
                        "        </method>"
 
                        "        <method name='del_noti_multiple'>"
-                       "          <arg type='s' name='pkgname' direction='in'/>"
+                       "          <arg type='s' name='app_id' direction='in'/>"
                        "          <arg type='i' name='priv_id' direction='in'/>"
                        "          <arg type='i' name='uid' direction='in'/>"
                        "          <arg type='i' name='priv_id' direction='out'/>"
                        "        </method>"
 
                        "        <method name='load_noti_by_tag'>"
-                       "          <arg type='s' name='pkgname' direction='in'/>"
+                       "          <arg type='s' name='app_id' direction='in'/>"
                        "          <arg type='s' name='tag' direction='in'/>"
                        "          <arg type='i' name='uid' direction='in'/>"
                        "          <arg type='v' name='noti' direction='out'/>"
                        "        </method>"
 
                        "        <method name='load_noti_by_priv_id'>"
-                       "          <arg type='s' name='pkgname' direction='in'/>"
+                       "          <arg type='s' name='app_id' direction='in'/>"
                        "          <arg type='i' name='priv_id' direction='in'/>"
                        "          <arg type='i' name='uid' direction='in'/>"
                        "          <arg type='v' name='noti' direction='out'/>"
@@ -249,7 +249,7 @@ int notification_register_dbus_interface()
                        "        </method>"
 
                        "        <method name='load_noti_detail_list'>"
-                       "          <arg type='s' name='pkgname' direction='in'/>"
+                       "          <arg type='s' name='app_id' direction='in'/>"
                        "          <arg type='i' name='group_id' direction='in'/>"
                        "          <arg type='i' name='priv_id' direction='in'/>"
                        "          <arg type='i' name='count' direction='in'/>"
@@ -259,7 +259,7 @@ int notification_register_dbus_interface()
 
                        "        <method name='get_noti_count'>"
                        "          <arg type='i' name='type' direction='in'/>"
-                       "          <arg type='s' name='pkgname' direction='in'/>"
+                       "          <arg type='s' name='app_id' direction='in'/>"
                        "          <arg type='i' name='group_id' direction='in'/>"
                        "          <arg type='i' name='priv_id' direction='in'/>"
                        "          <arg type='i' name='uid' direction='in'/>"
@@ -268,7 +268,7 @@ int notification_register_dbus_interface()
 
                        "        <method name='update_noti_setting'>"
                        "          <arg type='s' name='pkgname' direction='in'/>"
-                       "          <arg type='s' name='appid' direction='in'/>"
+                       "          <arg type='s' name='app_id' direction='in'/>"
                        "          <arg type='i' name='allow_to_notify' direction='in'/>"
                        "          <arg type='i' name='do_not_disturb_except' direction='in'/>"
                        "          <arg type='i' name='visibility_class' direction='in'/>"
@@ -296,8 +296,8 @@ int notification_register_dbus_interface()
                        "          <arg type='a(v)' name='setting_arr' direction='out'/>"
                        "        </method>"
 
-                       "        <method name='get_setting_by_appid'>"
-                       "          <arg type='s' name='appid' direction='in'/>"
+                       "        <method name='get_setting_by_app_id'>"
+                       "          <arg type='s' name='app_id' direction='in'/>"
                        "          <arg type='i' name='uid' direction='in'/>"
                        "          <arg type='v' name='setting' direction='out'/>"
                        "        </method>"
@@ -318,13 +318,13 @@ int notification_register_dbus_interface()
                        "        </method>"
 
                        "        <method name='create_from_package_template'>"
-                       "          <arg type='s' name='appid' direction='in'/>"
+                       "          <arg type='s' name='app_id' direction='in'/>"
                        "          <arg type='s' name='name' direction='in'/>"
                        "          <arg type='v' name='noti' direction='out'/>"
                        "        </method>"
 
                        "        <method name='get_noti_block_state'>"
-                       "          <arg type='s' name='appid' direction='in'/>"
+                       "          <arg type='s' name='app_id' direction='in'/>"
                        "          <arg type='i' name='uid' direction='in'/>"
                        "          <arg type='v' name='state' direction='out'/>"
                        "        </method>"
@@ -735,19 +735,19 @@ int notification_load_noti_by_tag(GVariant *parameters, GVariant **reply_body, u
 {
        int ret;
        char *tag = NULL;
-       char *pkgname = NULL;
+       char *app_id = NULL;
        notification_h noti;
        uid_t param_uid;
 
        noti = notification_create(NOTIFICATION_TYPE_NOTI);
        if (noti != NULL) {
-               g_variant_get(parameters, "(&s&si)", &pkgname, &tag, &param_uid);
+               g_variant_get(parameters, "(&s&si)", &app_id, &tag, &param_uid);
                ret = _validate_and_set_param_uid_with_uid(uid, &param_uid);
                if (ret != NOTIFICATION_ERROR_NONE)
                        goto out;
 
-               DbgPrint("_load_noti_by_tag pkgname : %s, tag : %s ", pkgname, tag);
-               ret = notification_noti_get_by_tag(noti, pkgname, tag, param_uid);
+               DbgPrint("_load_noti_by_tag app_id : %s, tag : %s ", app_id, tag);
+               ret = notification_noti_get_by_tag(noti, app_id, tag, param_uid);
                if (ret != NOTIFICATION_ERROR_NONE) {
                        ErrPrint("There is no notification that is matched tag [%s]", tag);
                        goto out;
@@ -776,18 +776,18 @@ int notification_load_noti_by_priv_id(GVariant *parameters, GVariant **reply_bod
 {
        int ret;
        int priv_id = NOTIFICATION_PRIV_ID_NONE;
-       char *pkgname = NULL;
+       char *app_id = NULL;
        notification_h noti;
        uid_t param_uid;
 
        noti = notification_create(NOTIFICATION_TYPE_NOTI);
        if (noti != NULL) {
-               g_variant_get(parameters, "(&sii)", &pkgname, &priv_id, &param_uid);
+               g_variant_get(parameters, "(&sii)", &app_id, &priv_id, &param_uid);
                ret = _validate_and_set_param_uid_with_uid(uid, &param_uid);
                if (ret != NOTIFICATION_ERROR_NONE)
                        goto out;
 
-               DbgPrint("load_noti_by_priv_id pkgname : %s, priv_id : %d ", pkgname, priv_id);
+               DbgPrint("load_noti_by_priv_id app_id : %s, priv_id : %d ", app_id, priv_id);
                ret = notification_noti_get_by_priv_id(noti, priv_id);
                if (ret != NOTIFICATION_ERROR_NONE)
                        goto out;
@@ -895,8 +895,8 @@ int notification_get_setting_array(GVariant *parameters, GVariant **reply_body,
 
                        if (temp->package_name)
                                free(temp->package_name);
-                       if (temp->appid)
-                               free(temp->appid);
+                       if (temp->app_id)
+                               free(temp->app_id);
                }
                free(setting_array);
        }
@@ -910,7 +910,7 @@ int notification_get_setting_array(GVariant *parameters, GVariant **reply_body,
        return ret;
 }
 
-static bool __init_setting_handle_by_appid(const char *appid, notification_setting_h *setting, uid_t uid)
+static bool __init_setting_handle_by_app_id(const char *app_id, notification_setting_h *setting, uid_t uid)
 {
        bool ret = false;
        int ret_pkgmgr;
@@ -918,18 +918,18 @@ static bool __init_setting_handle_by_appid(const char *appid, notification_setti
        notification_setting_h ret_setting = NULL;
        pkgmgrinfo_appinfo_h handle = NULL;
 
-       if (appid == NULL || setting == NULL)
+       if (app_id == NULL || setting == NULL)
                return false;
 
-       ret_pkgmgr = pkgmgrinfo_appinfo_get_appinfo(appid, &handle);
+       ret_pkgmgr = pkgmgrinfo_appinfo_get_appinfo(app_id, &handle);
        if (ret_pkgmgr != PMINFO_R_OK) {
-               ErrPrint("failed to pkgmgrinfo_appinfo_get_appinfo [%s][%d]", appid, ret);
+               ErrPrint("failed to pkgmgrinfo_appinfo_get_appinfo [%s][%d]", app_id, ret);
                goto out;
        }
 
        ret_pkgmgr = pkgmgrinfo_appinfo_get_pkgname(handle, &pkgname);
        if (ret_pkgmgr != PMINFO_R_OK) {
-               ErrPrint("failed to pkgmgrinfo_appinfo_get_pkgname [%s][%d]", appid, ret);
+               ErrPrint("failed to pkgmgrinfo_appinfo_get_pkgname [%s][%d]", app_id, ret);
                goto out;
        }
 
@@ -940,7 +940,7 @@ static bool __init_setting_handle_by_appid(const char *appid, notification_setti
        }
 
        ret_setting->package_name = strdup(pkgname);
-       ret_setting->appid = strdup(appid);
+       ret_setting->app_id = strdup(app_id);
        ret_setting->allow_to_notify = 1;
        ret_setting->do_not_disturb_except = 0;
        ret_setting->visibility_class = 0;
@@ -958,25 +958,25 @@ out:
        return ret;
 }
 
-/* get_setting_by_appid */
-int notification_get_setting_by_appid(GVariant *parameters, GVariant **reply_body, uid_t uid)
+/* get_setting_by_app_id */
+int notification_get_setting_by_app_id(GVariant *parameters, GVariant **reply_body, uid_t uid)
 {
        bool err;
        int ret;
        GVariant *body;
-       char *appid = NULL;
+       char *app_id = NULL;
        notification_setting_h setting = NULL;
        uid_t param_uid;
 
-       g_variant_get(parameters, "(&si)", &appid, &param_uid);
+       g_variant_get(parameters, "(&si)", &app_id, &param_uid);
        ret = _validate_and_set_param_uid_with_uid(uid, &param_uid);
        if (ret != NOTIFICATION_ERROR_NONE)
                return ret;
-       DbgPrint("get setting by appid : %s uid : %d", appid, param_uid);
+       DbgPrint("get setting by app_id : %s uid : %d", app_id, param_uid);
 
-       ret = noti_setting_service_get_setting_by_appid(appid, &setting, param_uid);
+       ret = noti_setting_service_get_setting_by_app_id(app_id, &setting, param_uid);
        if (ret == NOTIFICATION_ERROR_NOT_EXIST_ID) {
-               err = __init_setting_handle_by_appid(appid, &setting, param_uid);
+               err = __init_setting_handle_by_app_id(app_id, &setting, param_uid);
                if (err == false)
                        return NOTIFICATION_ERROR_IO_ERROR;
                ret = NOTIFICATION_ERROR_NONE;
@@ -1044,20 +1044,20 @@ int notification_load_detail_list(GVariant *parameters, GVariant **reply_body, u
        notification_list_h get_list = NULL;
        notification_list_h list_iter;
        GVariantBuilder *builder;
-       char *pkgname = NULL;
+       char *app_id = NULL;
        int group_id = NOTIFICATION_GROUP_ID_NONE;
        int priv_id = NOTIFICATION_PRIV_ID_NONE;
        int count = 0;
        uid_t param_uid;
 
-       g_variant_get(parameters, "(&siiii)", &pkgname, &group_id, &priv_id, &count, &param_uid);
+       g_variant_get(parameters, "(&siiii)", &app_id, &group_id, &priv_id, &count, &param_uid);
        ret = _validate_and_set_param_uid_with_uid(uid, &param_uid);
        if (ret != NOTIFICATION_ERROR_NONE)
                return ret;
-       DbgPrint("load detail list pkgname : %s, group_id : %d, priv_id : %d, count : %d ",
-                       pkgname, group_id, priv_id, count);
+       DbgPrint("load detail list app_id : %s, group_id : %d, priv_id : %d, count : %d ",
+                       app_id, group_id, priv_id, count);
 
-       ret = notification_noti_get_detail_list(pkgname, group_id, priv_id,
+       ret = notification_noti_get_detail_list(app_id, group_id, priv_id,
                        count, &get_list, param_uid);
        if (ret != NOTIFICATION_ERROR_NONE)
                return ret;
@@ -1153,15 +1153,15 @@ int notification_del_noti_single(GVariant *parameters, GVariant **reply_body, ui
        int ret;
        int num_changes = 0;
        int priv_id = NOTIFICATION_PRIV_ID_NONE;
-       char *pkgname = NULL;
+       char *app_id = NULL;
        GVariant *body = NULL;
        uid_t param_uid;
 
-       g_variant_get(parameters, "(&sii)", &pkgname, &priv_id, &param_uid);
+       g_variant_get(parameters, "(&sii)", &app_id, &priv_id, &param_uid);
        ret = _validate_and_set_param_uid_with_uid(uid, &param_uid);
        if (ret != NOTIFICATION_ERROR_NONE)
                return ret;
-       ret = notification_noti_delete_by_priv_id_get_changes(pkgname, priv_id, &num_changes, param_uid);
+       ret = notification_noti_delete_by_priv_id_get_changes(app_id, priv_id, &num_changes, param_uid);
        DbgPrint("priv_id: [%d] num_delete:%d\n", priv_id, num_changes);
        if (ret != NOTIFICATION_ERROR_NONE) {
                ErrPrint("failed to delete a notification:%d %d\n", ret, num_changes);
@@ -1199,7 +1199,7 @@ int notification_del_noti_single(GVariant *parameters, GVariant **reply_body, ui
 int notification_del_noti_multiple(GVariant *parameters, GVariant **reply_body, uid_t uid)
 {
        int ret;
-       char *pkgname = NULL;
+       char *app_id = NULL;
        notification_type_e type = NOTIFICATION_TYPE_NONE;
        int num_deleted = 0;
        int *list_deleted = NULL;
@@ -1208,13 +1208,13 @@ int notification_del_noti_multiple(GVariant *parameters, GVariant **reply_body,
        int i;
        uid_t param_uid;
 
-       g_variant_get(parameters, "(&sii)", &pkgname, &type, &param_uid);
-       DbgPrint("pkgname: [%s] type: [%d]\n", pkgname, type);
+       g_variant_get(parameters, "(&sii)", &app_id, &type, &param_uid);
+       DbgPrint("app_id: [%s] type: [%d]\n", app_id, type);
        ret = _validate_and_set_param_uid_with_uid(uid, &param_uid);
        if (ret != NOTIFICATION_ERROR_NONE)
                return ret;
 
-       ret = notification_noti_delete_all(type, pkgname, &num_deleted, &list_deleted, param_uid);
+       ret = notification_noti_delete_all(type, app_id, &num_deleted, &list_deleted, param_uid);
 
        DbgPrint("ret: [%d] num_deleted: [%d]\n", ret, num_deleted);
 
@@ -1264,20 +1264,20 @@ int notification_get_noti_count(GVariant *parameters, GVariant **reply_body, uid
 {
        int ret;
        notification_type_e type = NOTIFICATION_TYPE_NONE;
-       char *pkgname = NULL;
+       char *app_id = NULL;
        int group_id = NOTIFICATION_GROUP_ID_NONE;
        int priv_id = NOTIFICATION_PRIV_ID_NONE;
        int noti_count = 0;
        uid_t param_uid;
 
-       g_variant_get(parameters, "(i&siii)", &type, &pkgname, &group_id, &priv_id, &param_uid);
+       g_variant_get(parameters, "(i&siii)", &type, &app_id, &group_id, &priv_id, &param_uid);
        ret = _validate_and_set_param_uid_with_uid(uid, &param_uid);
        if (ret != NOTIFICATION_ERROR_NONE) {
                ErrPrint("_validate_uid fail ret : %d", ret);
                return NOTIFICATION_ERROR_IO_ERROR;
        }
 
-       ret = notification_noti_get_count(type, pkgname, group_id, priv_id,
+       ret = notification_noti_get_count(type, app_id, group_id, priv_id,
                        &noti_count, param_uid);
        if (ret != NOTIFICATION_ERROR_NONE) {
                ErrPrint("failed to get count : %d\n", ret);
@@ -1298,7 +1298,7 @@ int notification_update_noti_setting(GVariant *parameters, GVariant **reply_body
 {
        int ret;
        char *pkgname = NULL;
-       char *appid = NULL;
+       char *app_id = NULL;
        int allow_to_notify = 0;
        int do_not_disturb_except = 0;
        int visivility_class = 0;
@@ -1313,7 +1313,7 @@ int notification_update_noti_setting(GVariant *parameters, GVariant **reply_body
 
        g_variant_get(parameters, "(&s&siiiiii)",
                        &pkgname,
-                       &appid,
+                       &app_id,
                        &allow_to_notify,
                        &do_not_disturb_except,
                        &visivility_class,
@@ -1325,10 +1325,10 @@ int notification_update_noti_setting(GVariant *parameters, GVariant **reply_body
        if (ret != NOTIFICATION_ERROR_NONE)
                return ret;
 
-       DbgPrint("package_name: [%s] appid: [%s] allow_to_notify: [%d] do_not_disturb_except: [%d] visivility_class: [%d] pop_up_notification: [%d] lock_screen_content_level: [%d]\n",
-                       pkgname, appid, allow_to_notify, do_not_disturb_except, visivility_class, pop_up_notification, lock_screen_content_level);
+       DbgPrint("package_name: [%s] app_id: [%s] allow_to_notify: [%d] do_not_disturb_except: [%d] visivility_class: [%d] pop_up_notification: [%d] lock_screen_content_level: [%d]\n",
+                       pkgname, app_id, allow_to_notify, do_not_disturb_except, visivility_class, pop_up_notification, lock_screen_content_level);
 
-       ret = notification_setting_db_update(pkgname, appid, allow_to_notify, do_not_disturb_except, visivility_class,
+       ret = notification_setting_db_update(pkgname, app_id, allow_to_notify, do_not_disturb_except, visivility_class,
                                             pop_up_notification, lock_screen_content_level, param_uid);
        if (ret != NOTIFICATION_ERROR_NONE) {
                ErrPrint("failed to setting db update : %d\n", ret);
@@ -1737,7 +1737,7 @@ out:
 int notification_get_noti_template(GVariant *parameters, GVariant **reply_body, pid_t pid, uid_t uid)
 {
        int ret;
-       char appid[BUF_LEN] = {0, };
+       char app_id[BUF_LEN] = {0, };
        char *template_name = NULL;
        notification_h noti;
 
@@ -1745,14 +1745,14 @@ int notification_get_noti_template(GVariant *parameters, GVariant **reply_body,
        if (noti != NULL) {
                g_variant_get(parameters, "(&s)", &template_name);
 
-               ret = aul_app_get_appid_bypid_for_uid(pid, appid, sizeof(appid), uid);
+               ret = aul_app_get_appid_bypid_for_uid(pid, app_id, sizeof(app_id), uid);
                if (ret != AUL_R_OK) {
-                       ErrPrint("failed to get appid:%d", ret);
+                       ErrPrint("failed to get app_id:%d", ret);
                        ret = NOTIFICATION_ERROR_INVALID_PARAMETER;
                        goto out;
                }
 
-               ret = notification_noti_get_package_template(noti, appid, template_name);
+               ret = notification_noti_get_package_template(noti, app_id, template_name);
                if (ret != NOTIFICATION_ERROR_NONE) {
                        DbgPrint("failed to get template:%d", ret);
                        goto out;
@@ -1778,15 +1778,15 @@ out:
 int notification_get_noti_package_template(GVariant *parameters, GVariant **reply_body, uid_t uid)
 {
        int ret;
-       char *pkgname = NULL;
+       char *app_id = NULL;
        char *template_name = NULL;
        notification_h noti;
 
        noti = notification_create(NOTIFICATION_TYPE_NOTI);
        if (noti != NULL) {
-               g_variant_get(parameters, "(&s&s)", &pkgname, &template_name);
+               g_variant_get(parameters, "(&s&s)", &app_id, &template_name);
 
-               ret = notification_noti_get_package_template(noti, pkgname, template_name);
+               ret = notification_noti_get_package_template(noti, app_id, template_name);
                if (ret != NOTIFICATION_ERROR_NONE) {
                        ErrPrint("failed to get template:%d", ret);
                        goto out;
@@ -1815,11 +1815,11 @@ int notification_get_block_state(GVariant *parameters, GVariant **reply_body, ui
        int dnd;
        int dnd_except;
        int allow_to_notify;
-       char *appid;
+       char *app_id;
        uid_t param_uid;
        GVariant *body = NULL;
 
-       g_variant_get(parameters, "(&si)", &appid, &param_uid);
+       g_variant_get(parameters, "(&si)", &app_id, &param_uid);
 
        ret = _validate_and_set_param_uid_with_uid(uid, &param_uid);
        if (ret != NOTIFICATION_ERROR_NONE) {
@@ -1832,7 +1832,7 @@ int notification_get_block_state(GVariant *parameters, GVariant **reply_body, ui
                need_to_reload_pkginfo_for_notification = 0;
        }
 
-       ret = notification_get_dnd_and_allow_to_notify(appid, &dnd, &dnd_except, &allow_to_notify, param_uid);
+       ret = notification_get_dnd_and_allow_to_notify(app_id, &dnd, &dnd_except, &allow_to_notify, param_uid);
        if (ret != NOTIFICATION_ERROR_NONE) {
                ErrPrint("failed to get_dnd_and_allow_to_notify : %d\n", ret);
                return ret;
@@ -2138,7 +2138,7 @@ int notification_reset_event_receiver(GVariant *parameters, GVariant **reply_bod
        return NOTIFICATION_ERROR_NONE;
 }
 
-HAPI int notification_delete_noti_by_appid(const char *appid, uid_t uid)
+HAPI int notification_delete_noti_by_app_id(const char *app_id, uid_t uid)
 {
        GVariant *deleted_noti_list;
        GVariantBuilder *builder;
@@ -2147,7 +2147,7 @@ HAPI int notification_delete_noti_by_appid(const char *appid, uid_t uid)
        int ret;
        int i;
 
-       ret = notification_noti_delete_all(NOTIFICATION_TYPE_NONE, appid, &num_deleted, &list_deleted, uid);
+       ret = notification_noti_delete_all(NOTIFICATION_TYPE_NONE, app_id, &num_deleted, &list_deleted, uid);
        if (ret != NOTIFICATION_ERROR_NONE) {
                ErrPrint("failed to delete notifications:%d\n", ret);
                goto out;
@@ -2184,7 +2184,7 @@ static void _notification_data_init(void)
 {
        int property = 0;
        int priv_id = 0;
-       char *noti_pkgname = NULL;
+       char *app_id = NULL;
        notification_h noti = NULL;
        notification_list_h noti_list = NULL;
        notification_list_h noti_list_head = NULL;
@@ -2197,13 +2197,13 @@ static void _notification_data_init(void)
                noti = notification_list_get_data(noti_list);
                if (noti) {
                        notification_get_id(noti, NULL, &priv_id);
-                       notification_get_pkgname(noti, &noti_pkgname);
+                       notification_get_pkgname(noti, &app_id);
                        notification_get_property(noti, &property);
                        notification_get_type(noti, &noti_type);
 
                        if (noti_type == NOTIFICATION_TYPE_ONGOING
                            || property & NOTIFICATION_PROP_VOLATILE_DISPLAY) {
-                               notification_noti_delete_by_priv_id(noti_pkgname, priv_id);
+                               notification_noti_delete_by_priv_id(app_id, priv_id);
                        }
                }
                noti_list = notification_list_get_next(noti_list);
index e57e89a..e088186 100755 (executable)
@@ -471,19 +471,19 @@ static int _package_uninstall_cb(uid_t uid, const char *pkgname, enum pkgmgr_sta
        return 0;
 }
 
-static int _app_enabled_cb(uid_t uid, const char *appid, enum pkgmgr_status status, double value, void *data)
+static int _app_enabled_cb(uid_t uid, const char *app_id, enum pkgmgr_status status, double value, void *data)
 {
        if (status == PKGMGR_STATUS_END)
-               notification_setting_db_update_app_disabled(appid, false, uid);
+               notification_setting_db_update_app_disabled(app_id, false, uid);
 
        return 0;
 }
 
-static int _app_disabled_cb(uid_t uid, const char *appid, enum pkgmgr_status status, double value, void *data)
+static int _app_disabled_cb(uid_t uid, const char *app_id, enum pkgmgr_status status, double value, void *data)
 {
        if (status == PKGMGR_STATUS_END) {
-               notification_delete_noti_by_appid(appid, uid);
-               notification_setting_db_update_app_disabled(appid, true, uid);
+               notification_delete_noti_by_app_id(app_id, uid);
+               notification_setting_db_update_app_disabled(app_id, true, uid);
        }
 
        return 0;