Apply cpu priority inheritance
[platform/core/appfw/pkgmgr-info.git] / src / client / pkginfo_client.hh
index e838d38..67d50d0 100644 (file)
@@ -15,16 +15,34 @@ namespace pkgmgr_client {
 
 class PkgInfoClient {
  public:
-  PkgInfoClient(std::shared_ptr<pkgmgr_common::parcel::AbstractParcelable> parcel,
+  class CPUInheritanceInvoker {
+   public:
+    CPUInheritanceInvoker();
+    ~CPUInheritanceInvoker();
+    void SetCPUInheritance();
+    void ClearCPUInheritance();
+
+   private:
+    bool set_complete_;
+  };
+
+  PkgInfoClient(
+      std::shared_ptr<pkgmgr_common::parcel::AbstractParcelable> parcel,
       uid_t uid, pkgmgr_common::ReqType req_type);
+  ~PkgInfoClient() = default;
   bool SendRequest();
   std::shared_ptr<pkgmgr_common::parcel::AbstractParcelable> GetResultParcel();
 
  private:
+  bool RequestHandlerDirectAccess(const std::vector<uint8_t>& raw);
+
   std::shared_ptr<pkgmgr_common::parcel::AbstractParcelable> parcel_;
+  std::shared_ptr<pkgmgr_common::parcel::AbstractParcelable> result_parcel_;
   std::unique_ptr<pkgmgr_common::socket::ClientSocket> socket_;
   uid_t uid_;
   pkgmgr_common::ReqType req_type_;
+  bool is_offline_;
+  CPUInheritanceInvoker cpu_inheritance_invoker_;
 };
 
 }  // namespace pkgmgr_client