Merge branch 'master' of github.sec.samsung.net:appfw/pkgmgr-info into tizen
[platform/core/appfw/pkgmgr-info.git] / src / common / parcel / query_parcelable.cc
index b34e1e8..40fa0fa 100644 (file)
@@ -27,13 +27,12 @@ namespace parcel {
 
 QueryParcelable::QueryParcelable()
     : AbstractParcelable(0, ParcelableType::Query),
-    db_type_(AbstractDBHandler::DBType::DB_TYPE_NONE),
-    op_type_(AbstractDBHandler::OperationType::OPERATION_TYPE_NONE) {}
+    db_type_(DBType::DB_TYPE_NONE),
+    op_type_(DBOperationType::OPERATION_TYPE_NONE) {}
 
 QueryParcelable::QueryParcelable(uid_t uid,
     const std::pair<int, std::vector<const char*>>& query_args,
-    AbstractDBHandler::DBType db_type,
-    AbstractDBHandler::OperationType op_type)
+    DBType db_type, DBOperationType op_type)
     : AbstractParcelable(uid, ParcelableType::Query),
     db_type_(db_type), op_type_(op_type) {
   query_args_.emplace_back(CreateQueryArgs(query_args));
@@ -41,8 +40,7 @@ QueryParcelable::QueryParcelable(uid_t uid,
 
 QueryParcelable::QueryParcelable(uid_t uid,
     const std::vector<std::pair<int, std::vector<const char*>>>& query_args,
-    AbstractDBHandler::DBType db_type,
-    AbstractDBHandler::OperationType op_type)
+    DBType db_type, DBOperationType op_type)
     : AbstractParcelable(uid, ParcelableType::Query),
     db_type_(db_type), op_type_(op_type) {
   for (const auto& arg : query_args)
@@ -70,8 +68,8 @@ void QueryParcelable::WriteToParcel(tizen_base::Parcel* parcel) const {
     for (const auto& args : query_info.second)
       WriteString(parcel, args);
   }
-  WriteInt(parcel, db_type_);
-  WriteInt(parcel, op_type_);
+  WriteInt(parcel, static_cast<int>(db_type_));
+  WriteInt(parcel, static_cast<int>(op_type_));
 }
 
 void QueryParcelable::ReadFromParcel(tizen_base::Parcel* parcel) {
@@ -94,20 +92,20 @@ void QueryParcelable::ReadFromParcel(tizen_base::Parcel* parcel) {
     query_args_.push_back(QueryArgs(index, std::move(args)));
   }
   ReadInt(parcel, &db_type);
-  db_type_ = static_cast<AbstractDBHandler::DBType>(db_type);
+  db_type_ = static_cast<DBType>(db_type);
   ReadInt(parcel, &op_type);
-  op_type_ = static_cast<AbstractDBHandler::OperationType>(op_type);
+  op_type_ = static_cast<DBOperationType>(op_type);
 }
 
 std::vector<QueryArgs> QueryParcelable::ExtractQueryArgs() {
   return std::move(query_args_);
 }
 
-AbstractDBHandler::DBType QueryParcelable::GetDBType() {
+DBType QueryParcelable::GetDBType() {
   return db_type_;
 }
 
-AbstractDBHandler::OperationType QueryParcelable::GetOpType() {
+DBOperationType QueryParcelable::GetOpType() {
   return op_type_;
 }