X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fapplist.hpp;h=bb80961ff67d7dbb2cd0db82dea3706f87365879;hb=7f6ceaf920b5cb0d5984b8e8294f8ce0f52dfbbb;hp=cab3595062791bc1d8adee82c987bcfdf8155da9;hpb=dfe4aee045113eceaeabd327291f94583e7b13d3;p=apps%2Fagl-service-windowmanager.git diff --git a/src/applist.hpp b/src/applist.hpp index cab3595..bb80961 100644 --- a/src/applist.hpp +++ b/src/applist.hpp @@ -21,7 +21,7 @@ #include #include //#include -#include "windowmanager-client.hpp" +#include "wm-client.hpp" #include "request.hpp" namespace wm @@ -39,37 +39,39 @@ class AppList // Client Database Interface void addClient(const std::string &appid, const std::string &role); + void addClient(const std::string &appid, unsigned layer, unsigned surface, const std::string &role); void removeClient(const std::string &appid); - bool contains(const std::string &appid); - int countClient(); + bool contains(const std::string &appid) const; + int countClient() const; std::shared_ptr lookUpClient(const std::string &appid); + void removeSurface(unsigned surface); // Request Interface - unsigned currentSequenceNumber(); - unsigned getSequenceNumber(const std::string &appid); + unsigned currentRequestNumber() const; + unsigned getRequestNumber(const std::string &appid) const; unsigned addAllocateRequest(WMRequest req); /* TODO: consider, which is better WMClient or std::string appid? if appid is key to manage resources, it is better to select std::string otherwise WMClient is better, IMO */ - bool requestFinished(); + bool requestFinished() const; bool setAction(unsigned req_num, const struct WMAction &action); bool setAction(unsigned req_num, const std::string &appid, const std::string &role, const std::string &area, bool visible = true); bool setEndDrawFinished(unsigned req_num, const std::string &appid, const std::string &role); bool endDrawFullfilled(unsigned req_num); void removeRequest(unsigned req_num); void next(); - bool haveRequest(); + bool haveRequest() const; struct WMTrigger getRequest(unsigned req_num); const std::vector &getActions(unsigned req_num); - void client_dump(); - void req_dump(); + void clientDump(); + void reqDump(); private: std::vector req_list; - std::unordered_map> client_list; - unsigned current_seq; + std::unordered_map> app2client; + unsigned current_req; }; } // namespace wm