Fix inconsistency between cache and database
[platform/core/appfw/pkgmgr-info.git] / src / common / request_type.cc
index e80c500..da674ad 100644 (file)
@@ -41,4 +41,13 @@ const char* ReqTypeToString(ReqType type) {
   return convertArray[type];
 }
 
+bool IsDbWriteRequest(ReqType type) {
+  if (type == pkgmgr_common::ReqType::SET_PKG_INFO ||
+      type == pkgmgr_common::ReqType::SET_CERT_INFO ||
+      type == pkgmgr_common::ReqType::WRITE_QUERY)
+    return true;
+
+  return false;
+}
+
 }  // namespace pkgmgr_common