Revert "[MDE Compatibility][Common changes for set-get active account]" 38/186738/1
authorrandeep singh <randeep.s@samsung.com>
Tue, 14 Aug 2018 03:38:06 +0000 (03:38 +0000)
committerrandeep singh <randeep.s@samsung.com>
Tue, 14 Aug 2018 03:38:06 +0000 (03:38 +0000)
This reverts commit 75149b94bc6301c1aadb38157e7f535d2680a8ea.

Change-Id: I18af70f48300c6ff0ee83b8731937c52d9e0056d

common/account_mgr.xml
common/include/account-private.h
common/include/account_db_helper.h
common/src/account_db_helper.c
common/src/account_ipc_marshal.c
packaging/account-common.spec

index 417754b..0278c68 100644 (file)
       <arg type="i" name="sync_status" direction="in" />
       <arg type="i" name="uid" direction="in" />
     </method>
-    <method name="account_update_state_by_id">
-      <arg type="i" name="account_db_id" direction="in" />
-      <arg type="i" name="account_state" direction="in" />
-      <arg type="i" name="uid" direction="in" />
-    </method>
     <method name="account_type_query_provider_feature_by_app_id">
       <arg type="s" name="app_id" direction="in" />
       <arg type="i" name="uid" direction="in" />
index d0c9416..ba8a626 100644 (file)
@@ -105,14 +105,14 @@ extern "C"
 #define EMAIL_PKG_NAME                 "email-setting-efl"
 #define EXCHANGE_PKG_NAME              "activesync-ui"
 #define IMS_SERVICE_PKG_NAME           "ims-service"
-#define SAMSUNGACCOUNTFRONT_PKG_NAME   "com.samsung.samsung-account-front"
-#define SAMSUNGACCOUNT_PKG_NAME                "com.samsung.samsungaccount"
+#define SAMSUNGACCOUNTFRONT_PKG_NAME  "com.samsung.samsung-account-front"
+#define SAMSUNGACCOUNT_PKG_NAME  "com.samsung.samsungaccount"
 #define CHATON_PKG_NAME                        "xnq5eh9vop.ChatON"
-#define DROPBOX_PKG_NAME               "com.samsung.dropbox"
-#define SYNCHRONISE_PKG_NAME           "setting-synchronise-efl"
+#define DROPBOX_PKG_NAME  "com.samsung.dropbox"
+#define SYNCHRONISE_PKG_NAME "setting-synchronise-efl"
 
 #define USER_TXT_CNT 5
-#define USER_INT_CNT 4
+#define USER_INT_CNT 5
 
 
 /* account uri list */
@@ -157,7 +157,6 @@ typedef struct _account_s {
        int auth_type;
        int secret;
        int sync_support;
-       int is_active;
        int user_data_int[USER_INT_CNT];
        char *user_data_txt[USER_TXT_CNT];
        GSList *capablity_list;
@@ -235,7 +234,7 @@ typedef enum {
        ACCOUNT_FIELD_USER_INT_1,
        ACCOUNT_FIELD_USER_INT_2,
        ACCOUNT_FIELD_USER_INT_3,
-       ACCOUNT_FIELD_IS_ACTIVE,
+       ACCOUNT_FIELD_USER_INT_4,
        ACCOUNT_DB_FIELD_END
 } ACCOUNT_DB_IDX;
 
index 5b91ae7..6e38801 100644 (file)
@@ -47,7 +47,7 @@
 "int_custom1 INTEGER, "\
 "int_custom2 INTEGER, "\
 "int_custom3 INTEGER, "\
-"is_active INTEGER "\
+"int_custom4 INTEGER "\
 ");"
 
 /* CAPABILITY_TABLE */
index 6840458..3ef3a72 100644 (file)
@@ -521,16 +521,12 @@ int _account_convert_account_to_sql(account_s *account, account_stmt hstmt, char
                ACCOUNT_RETURN_VAL((SQLITE_OK == rc), {}, rc, ("_account_query_bind_text() failed::user_data_txt, account_id [%d]", account->id));
        }
 
-       /* 13. user integer*/
+       /* 13. user integer     */
        for (i = 0; i < USER_INT_CNT; i++) {
                rc = _account_query_bind_int(hstmt, count++, account->user_data_int[i]);
                ACCOUNT_RETURN_VAL((SQLITE_OK == rc), {}, rc, ("_account_query_bind_int() failed::user_data_int, account_id [%d]", account->id));
        }
 
-       /* 14. is_active */
-       rc = _account_query_bind_int(hstmt, count++, account->is_active);
-       ACCOUNT_RETURN_VAL((SQLITE_OK == rc), {}, rc, ("_account_query_bind_int() failed::is_active, account_id [%d]", account->id));
-
        _INFO("_account_convert_account_to_sql end");
 
        return count;
@@ -592,8 +588,7 @@ void _account_convert_column_to_account(account_stmt hstmt, account_s *account_r
        account_record->user_data_int[1] = _account_query_table_column_int(hstmt, ACCOUNT_FIELD_USER_INT_1);
        account_record->user_data_int[2] = _account_query_table_column_int(hstmt, ACCOUNT_FIELD_USER_INT_2);
        account_record->user_data_int[3] = _account_query_table_column_int(hstmt, ACCOUNT_FIELD_USER_INT_3);
-
-       account_record->is_active = _account_query_table_column_int(hstmt, ACCOUNT_FIELD_IS_ACTIVE);
+       account_record->user_data_int[4] = _account_query_table_column_int(hstmt, ACCOUNT_FIELD_USER_INT_4);
 }
 
 void _account_convert_column_to_capability(account_stmt hstmt, account_capability_s *capability_record)
index 3642340..668554b 100644 (file)
@@ -35,7 +35,6 @@
 #define ACCOUNT_DATA_KEY_AUTH_TYPE "auth_type"
 #define ACCOUNT_DATA_KEY_SECRET "secret"
 #define ACCOUNT_DATA_KEY_SYNC_SUPPORT "sync_support"
-#define ACCOUNT_DATA_KEY_IS_ACTIVE "is_active"
 #define ACCOUNT_DATA_KEY_USER_DATA_INT "user_data_int"
 #define ACCOUNT_DATA_KEY_USER_DATA_TXT "user_data_txt"
 #define ACCOUNT_DATA_KEY_CAPABILITY_LIST "capability_list"
@@ -295,8 +294,6 @@ GVariant *marshal_account(const account_s* account)
                                marshal_user_int_array((const int *) in_data->user_data_int));
        }
 
-       g_variant_builder_add(&builder, "{sv}", ACCOUNT_DATA_KEY_IS_ACTIVE, g_variant_new_int32(in_data->is_active));
-
        for (i = 0; i < USER_TXT_CNT; i++) {
                GVariant *variant = marshal_user_txt_array((char *const *)in_data->user_data_txt);
                if (variant) {
@@ -370,13 +367,10 @@ account_s* get_unmarshal_data(GVariantIter *iterator)
                        int i;
                        int *tmp_user_ints = unmarshal_user_int_array(value);
                        if (tmp_user_ints != NULL) {
-                               for (i = 0; i < USER_INT_CNT; i++) {
+                               for (i = 0; i < USER_INT_CNT; i++)
                                        account->user_data_int[i] = tmp_user_ints[i];
-                               }
                        }
                        _ACCOUNT_FREE(tmp_user_ints);
-               } else if (!strcmp(key, ACCOUNT_DATA_KEY_IS_ACTIVE)) {
-                       account->is_active = g_variant_get_int32(value);
                } else if (!strcmp(key, ACCOUNT_DATA_KEY_USER_DATA_TXT)) {
                        int i;
                        char **tmp_user_txts = unmarshal_user_txt_array(value);
@@ -507,7 +501,8 @@ GVariant *marshal_account_type_list(GSList *account_type_list)
 
        for (iter = account_type_list; iter != NULL; iter = g_slist_next(iter)) {
                account_type_data = (account_type_s *)(iter->data);
-               g_variant_builder_add_value(&builder,
+               g_variant_builder_add_value(
+                               &builder,
                                marshal_account_type((account_type_s *)account_type_data));
        }
 
@@ -539,7 +534,6 @@ account_s *create_empty_account_instance(void)
        data->auth_type = 0;
        data->secret = 0;
        data->sync_support = false;
-       data->is_active = 0;
        data->capablity_list = NULL;
        data->account_list = NULL;
        data->custom_list = NULL;
index e9e91eb..1475907 100644 (file)
@@ -1,6 +1,6 @@
 Name:       account-common
 Summary:    Account common library
-Version:    0.1.15
+Version:    0.1.14
 Release:    1
 Group:      Social & Content/API
 License:    Apache-2.0