packagekit: we don't need PackageKit_Package_Info enum accepted/tizen/mobile/20151222.225239 accepted/tizen/tv/20151222.225255 accepted/tizen/wearable/20151222.225318 submit/tizen/20151222.151736
authorGwanglim Lee <gl77.lee@samsung.com>
Tue, 22 Dec 2015 15:17:18 +0000 (00:17 +0900)
committerGwanglim Lee <gl77.lee@samsung.com>
Tue, 22 Dec 2015 15:17:18 +0000 (00:17 +0900)
Change-Id: I5e4e9aeac5e2b3d3352f8c2aa6c43c1f2e83f830

src/modules/packagekit/e_mod_packagekit.c
src/modules/packagekit/e_mod_packagekit.h

index e7ad73b648d689f94f1d046789fe49534285f93e..a1856a68a6911236be72998658e2c2de32703e1c 100644 (file)
@@ -23,23 +23,6 @@ packagekit_icon_update(E_PackageKit_Module_Context *ctxt,
      state = "packagekit,state,error";
    else
      {
-        EINA_LIST_FOREACH(ctxt->packages, l, pkg)
-          {
-             switch (pkg->info)
-               {
-                  case PK_INFO_ENUM_LOW:
-                  case PK_INFO_ENUM_ENHANCEMENT:
-                  case PK_INFO_ENUM_NORMAL:
-                  case PK_INFO_ENUM_BUGFIX:
-                  case PK_INFO_ENUM_IMPORTANT:
-                  case PK_INFO_ENUM_SECURITY:
-                     count++;
-                     break;
-                  default:
-                     break;
-               }
-          }
-
         if (count > 0)
           state = "packagekit,state,updates";
         else
@@ -108,23 +91,6 @@ packagekit_popup_update(E_PackageKit_Instance *inst)
 
    EINA_LIST_FOREACH(ctxt->packages, l, pkg)
      {
-        switch (pkg->info)
-          {
-             case PK_INFO_ENUM_LOW:
-               emblem_name = "e/modules/packagekit/icon/low"; break;
-             case PK_INFO_ENUM_ENHANCEMENT:
-               emblem_name = "e/modules/packagekit/icon/enhancement"; break;
-             case PK_INFO_ENUM_NORMAL:
-               emblem_name = "e/modules/packagekit/icon/normal"; break;
-             case PK_INFO_ENUM_BUGFIX:
-               emblem_name = "e/modules/packagekit/icon/bugfix"; break;
-             case PK_INFO_ENUM_IMPORTANT:
-               emblem_name = "e/modules/packagekit/icon/important"; break;
-             case PK_INFO_ENUM_SECURITY:
-               emblem_name = "e/modules/packagekit/icon/security"; break;
-             default:
-               emblem_name = NULL; break;
-          }
         if (emblem_name)
           {
              // try to find a desktop file that match the executable or the name
@@ -309,7 +275,6 @@ _signal_package_cb(void *data, const Eldbus_Message *msg)
 {  /* Package ('u'info, 's'package_id, 's'summary) */
    const char *error, *error_msg, *pkg_id, *summary, *info_str;
    E_PackageKit_Module_Context *ctxt = data;
-   PackageKit_Package_Info info;
    unsigned num_elements = 0;
    char **splitted;
    Eina_Bool ret;
@@ -321,8 +286,6 @@ _signal_package_cb(void *data, const Eldbus_Message *msg)
      }
    if (PKITV07)
      ret = eldbus_message_arguments_get(msg, "sss", &info_str, &pkg_id, &summary);
-   else
-     ret = eldbus_message_arguments_get(msg, "uss", &info, &pkg_id, &summary);
    if (!ret)
      {
         _store_error(ctxt, "could not get package arguments");
@@ -330,8 +293,6 @@ _signal_package_cb(void *data, const Eldbus_Message *msg)
      }
    if (PKITV07)
      { DBG("PKGKIT: Package: (%s) %s [ %s ]", info_str, pkg_id, summary); }
-   else
-     { DBG("PKGKIT: Package: (%d) %s [ %s ]", info, pkg_id, summary); }
 
    splitted = eina_str_split_full(pkg_id, ";", 2, &num_elements);
    if (num_elements == 2)
@@ -340,20 +301,6 @@ _signal_package_cb(void *data, const Eldbus_Message *msg)
         pkg->name = eina_stringshare_add(splitted[0]);
         pkg->version = eina_stringshare_add(splitted[1]);
         pkg->summary = eina_stringshare_add(summary);
-        if (PKITV07)
-          {
-             if (!info_str) pkg->info = PK_INFO_ENUM_NORMAL;
-             else if (!strcmp(info_str, "normal"))      pkg->info = PK_INFO_ENUM_NORMAL;
-             else if (!strcmp(info_str, "security"))    pkg->info = PK_INFO_ENUM_SECURITY;
-             else if (!strcmp(info_str, "blocked"))     pkg->info = PK_INFO_ENUM_BLOCKED;
-             else if (!strcmp(info_str, "low"))         pkg->info = PK_INFO_ENUM_LOW;
-             else if (!strcmp(info_str, "enhancement")) pkg->info = PK_INFO_ENUM_ENHANCEMENT;
-             else if (!strcmp(info_str, "bugfix"))      pkg->info = PK_INFO_ENUM_BUGFIX;
-             else if (!strcmp(info_str, "important"))   pkg->info = PK_INFO_ENUM_IMPORTANT;
-             else pkg->info = PK_INFO_ENUM_UNKNOWN;
-          }
-        else
-          pkg->info = info;
         ctxt->packages = eina_list_append(ctxt->packages, pkg);
      }
    if (splitted)
index b6795b4c8ec85bf8625ba1b307ed1b0e31d13d16..c42db6b24771a876b836dc66f208bf551791d4cf 100644 (file)
@@ -8,35 +8,6 @@
 #define PKITV07 (ctxt->v_maj == 0) && (ctxt->v_min == 7)
 #define PKITV08 (ctxt->v_maj == 0) && (ctxt->v_min == 8)
 
-typedef enum {
-   PK_INFO_ENUM_UNKNOWN,
-   PK_INFO_ENUM_INSTALLED,
-   PK_INFO_ENUM_AVAILABLE,
-   PK_INFO_ENUM_LOW,
-   PK_INFO_ENUM_ENHANCEMENT,
-   PK_INFO_ENUM_NORMAL,
-   PK_INFO_ENUM_BUGFIX,
-   PK_INFO_ENUM_IMPORTANT,
-   PK_INFO_ENUM_SECURITY,
-   PK_INFO_ENUM_BLOCKED,
-   PK_INFO_ENUM_DOWNLOADING,
-   PK_INFO_ENUM_UPDATING,
-   PK_INFO_ENUM_INSTALLING,
-   PK_INFO_ENUM_REMOVING,
-   PK_INFO_ENUM_CLEANUP,
-   PK_INFO_ENUM_OBSOLETING,
-   PK_INFO_ENUM_COLLECTION_INSTALLED,
-   PK_INFO_ENUM_COLLECTION_AVAILABLE,
-   PK_INFO_ENUM_FINISHED,
-   PK_INFO_ENUM_REINSTALLING,
-   PK_INFO_ENUM_DOWNGRADING,
-   PK_INFO_ENUM_PREPARING,
-   PK_INFO_ENUM_DECOMPRESSING,
-   PK_INFO_ENUM_UNTRUSTED,
-   PK_INFO_ENUM_TRUSTED,
-   PK_INFO_ENUM_LAST,
-} PackageKit_Package_Info;
-
 typedef struct _PackageKit_Config
 {
    int update_interval;
@@ -80,7 +51,6 @@ typedef struct _E_PackageKit_Package
    const char *name;
    const char *summary;
    const char *version;
-   PackageKit_Package_Info info;
 } E_PackageKit_Package;