X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fapplist.cpp;h=473d68751446bbfe1305260f0f351dae04d393d4;hb=464f20cc2a960052233c4e2cbc2bd7dd3876b7f7;hp=17b47e3e580f71578b45b5c6efe2722f937305f7;hpb=010ca3f3459a52e44deb5e70e94e9cd394814e3e;p=apps%2Fagl-service-windowmanager.git diff --git a/src/applist.cpp b/src/applist.cpp index 17b47e3..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 * @@ -310,6 +331,10 @@ const vector &AppList::getActions(unsigned req_num, bool* found } } HMI_SEQ_ERROR(req_num, "Couldn't get action with the request : %d", req_num); + { + static vector empty; + return empty; + } } /**