#ifndef CLIENT_PKGINFO_CLIENT_HH_
#define CLIENT_PKGINFO_CLIENT_HH_
+#include "abstract_parcelable.hh"
+#include "client_socket.hh"
+#include "request_type.hh"
+
#include <string>
namespace pkgmgr_client {
class PkgInfoClient {
public:
- std::string GetResult();
+ 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