- * unsubscribe
- *
- * #### Parameters
- * - request: the request to bindings
- *
- * #### Return
- * result
- *
- */
-int HS_ClientManager::unsubscribe(afb_req_t request)
-{
- const char *value = afb_req_value(request, "event");
- HMI_NOTICE("homescreen-service","value is %s", value);
- int ret = 0;
- if(value) {
- std::string appid = std::move(get_application_id(request));
- if(appid.empty()) {
- HMI_NOTICE("homescreen-service","can't get application identifier");
- return AFB_REQ_GETAPPLICATIONID_ERROR;
- }
-
- std::lock_guard<std::mutex> lock(this->mtx);
- auto ip = client_list.find(appid);
- if(ip != client_list.end()
- && ip->second->unsubscribe(request, value) != 0) {
- HMI_NOTICE("homescreen-service","unsubscribe failed");
- ret = AFB_REQ_UNSUBSCRIBE_ERROR;
- }
- }
- else {
- HMI_NOTICE("homescreen-service","Please input event name");
- ret = AFB_EVENT_BAD_REQUEST;
- }
- return ret;
-}
-
-/**
- * showWindow event