X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fapplist.cpp;fp=src%2Fapplist.cpp;h=473d68751446bbfe1305260f0f351dae04d393d4;hb=464f20cc2a960052233c4e2cbc2bd7dd3876b7f7;hp=67980f15ee0c92053d4fbfed35d03e1b33a4e7d2;hpb=d4b18f9152860b4fd8746e5098a75ad56dba1c7f;p=apps%2Fagl-service-windowmanager.git diff --git a/src/applist.cpp b/src/applist.cpp index 67980f1..473d687 100644 --- a/src/applist.cpp +++ b/src/applist.cpp @@ -81,6 +81,27 @@ void AppList::addClient(const string &appid, unsigned layer, const string &role) this->clientDump(); } +/** + * Add Client to the list + * + * This function is overload function. + * But this function just register application. + * So an application does not have role, surface, layer. + * Client need to register role and layer afterward. + * + * @param string[in] Application id. This will be the key to withdraw the information. + * @return None + * @attention This function should be called once for the app + * Caller should take care not to be called more than once. + */ +void AppList::addClient(const string &appid) +{ + std::lock_guard lock(this->mtx); + shared_ptr client = std::make_shared(appid, 0, ""); + this->app2client[appid] = client; + this->clientDump(); +} + /** * Remove WMClient from the list *