Removes unnecessary code 13/91713/1 accepted/tizen/3.0/ivi/20161028.122951 accepted/tizen/3.0/mobile/20161028.122232 accepted/tizen/3.0/tv/20161028.122527 accepted/tizen/3.0/wearable/20161028.122747 accepted/tizen/common/20161011.154240 accepted/tizen/ivi/20161012.065007 accepted/tizen/mobile/20161012.064914 accepted/tizen/tv/20161012.064930 accepted/tizen/wearable/20161012.064949 submit/tizen/20161011.051336 submit/tizen_3.0/20161028.062323 submit/tizen_3.0/20161028.082323 submit/tizen_3.0_common/20161104.104000
authorseungha.son <seungha.son@samsung.com>
Tue, 11 Oct 2016 04:12:21 +0000 (13:12 +0900)
committerseungha.son <seungha.son@samsung.com>
Tue, 11 Oct 2016 04:14:08 +0000 (13:14 +0900)
 - Removes unnecessary code related with badge property
   The property is not use anywhere

Signed-off-by: seungha.son <seungha.son@samsung.com>
Change-Id: I9d841a2e4cf24293d68af838600bcc12e955d8d8

src/badge_service.c

index 7bf96a7..d667cf3 100755 (executable)
@@ -19,7 +19,6 @@
 #include <sys/smack.h>
 #include <badge.h>
 #include <badge_db.h>
-#include <badge_setting_service.h>
 #include <badge_internal.h>
 #include <tzplatform_config.h>
 
@@ -81,10 +80,6 @@ static void _badge_dbus_method_call_handler(GDBusConnection *conn,
                ret = badge_set_display_option(parameters, &reply_body, uid);
        else if (g_strcmp0(method_name, "get_disp_option") == 0)
                ret = badge_get_display_option(parameters, &reply_body, uid);
-       else if (g_strcmp0(method_name, "set_noti_property") == 0)
-               ret = badge_set_setting_property(parameters, &reply_body, uid);
-       else if (g_strcmp0(method_name, "get_noti_property") == 0)
-               ret = badge_get_setting_property(parameters, &reply_body, uid);
 
        if (ret == BADGE_ERROR_NONE) {
                DbgPrint("badge service success : %d", ret);
@@ -162,19 +157,6 @@ int badge_register_dbus_interface()
                        "          <arg type='i' name='is_display' direction='out'/>"
                        "        </method>"
 
-                       "        <method name='set_noti_property'>"
-                       "          <arg type='s' name='pkgname' direction='in'/>"
-                       "          <arg type='s' name='property' direction='in'/>"
-                       "          <arg type='s' name='value' direction='in'/>"
-                       "          <arg type='i' name='uid' direction='in'/>"
-                       "        </method>"
-
-                       "        <method name='get_noti_property'>"
-                       "          <arg type='s' name='pkgname' direction='in'/>"
-                       "          <arg type='s' name='property' direction='in'/>"
-                       "          <arg type='i' name='uid' direction='in'/>"
-                       "          <arg type='s' name='value' direction='out'/>"
-                       "        </method>"
                        "  </interface>"
                        "  </node>";
 
@@ -558,100 +540,6 @@ int badge_get_display_option(GVariant *parameters, GVariant **reply_body, uid_t
        return ret;
 }
 
-/* set_noti_property */
-int badge_set_setting_property(GVariant *parameters, GVariant **reply_body, uid_t uid)
-{
-       int ret = 0;
-       int is_display = 0;
-       char *pkgname = NULL;
-       char *property = NULL;
-       char *value = NULL;
-       GVariant *body = NULL;
-       GList *monitoring_list = NULL;
-       uid_t param_uid;
-
-       g_variant_get(parameters, "(&s&s&si)", &pkgname, &property, &value, &param_uid);
-
-       ret = _validate_and_set_param_uid_with_uid(uid, &param_uid);
-       if (ret != BADGE_ERROR_NONE)
-               return ret;
-
-       if (pkgname != NULL && property != NULL && value != NULL)
-               ret = badge_setting_db_set(pkgname, property, value, param_uid);
-       else
-               return BADGE_ERROR_INVALID_PARAMETER;
-
-       if (ret != BADGE_ERROR_NONE) {
-               ErrPrint("failed to setting db set :%d\n", ret);
-               return ret;
-       }
-
-       if (ret == BADGE_ERROR_NONE) {
-               if (strcmp(property, "OPT_BADGE") == 0) {
-                       if (strcmp(value, "ON") == 0)
-                               is_display = 1;
-                       else
-                               is_display = 0;
-
-                       body = g_variant_new("(si)", pkgname, is_display);
-                       if (body == NULL) {
-                               ErrPrint("cannot make gvariant to noti");
-                               return BADGE_ERROR_OUT_OF_MEMORY;
-                       }
-
-                       monitoring_list = (GList *)g_hash_table_lookup(_monitoring_hash, GUINT_TO_POINTER(param_uid));
-                       ret = send_notify(body, "set_disp_option_notify", monitoring_list, PROVIDER_BADGE_INTERFACE_NAME);
-                       g_variant_unref(body);
-                       if (ret != BADGE_ERROR_NONE) {
-                               ErrPrint("failed to send notify:%d\n", ret);
-                               return ret;
-                       }
-               }
-       } else {
-               ErrPrint("failed to set noti property:%d\n", ret);
-       }
-
-       *reply_body = g_variant_new("()");
-       if (*reply_body == NULL) {
-               ErrPrint("cannot make gvariant to noti");
-               return BADGE_ERROR_OUT_OF_MEMORY;
-       }
-       return ret;
-}
-
-/* get_noti_property */
-int badge_get_setting_property(GVariant *parameters, GVariant **reply_body, uid_t uid)
-{
-       int ret = 0;
-       char *pkgname = NULL;
-       char *property = NULL;
-       char *value = NULL;
-       uid_t param_uid;
-
-       g_variant_get(parameters, "(&s&si)", &pkgname, &property, &param_uid);
-
-       ret = _validate_and_set_param_uid_with_uid(uid, &param_uid);
-       if (ret != BADGE_ERROR_NONE)
-               return ret;
-
-       if (pkgname != NULL && property != NULL)
-               ret = badge_setting_db_get(pkgname, property, &value, param_uid);
-       else
-               return BADGE_ERROR_INVALID_PARAMETER;
-
-       if (ret != BADGE_ERROR_NONE) {
-               ErrPrint("failed to setting db get :%d\n", ret);
-               return ret;
-       }
-
-       *reply_body = g_variant_new("(s)", value);
-       if (*reply_body == NULL) {
-               ErrPrint("cannot make gvariant to noti");
-               return BADGE_ERROR_OUT_OF_MEMORY;
-       }
-       return ret;
-}
-
 /*!
  * MAIN THREAD
  * Do not try to do anyother operation in these functions