#include <systemd/sd-event.h>
}
-typedef struct wmClientCtxt
+typedef struct WMClientCtxt
{
std::string name;
std::string role;
- wmClientCtxt(const char *appName, const char* appRole)
+ WMClientCtxt(const char *appName, const char* appRole)
{
name = appName;
role = role;
}
-} wmClientCtxt;
+} WMClientCtxt;
struct afb_instance
{
static bool checkFirstReq(afb_req req)
{
- wmClientCtxt *ctxt = (wmClientCtxt *)afb_req_context_get(req);
+ WMClientCtxt *ctxt = (WMClientCtxt *)afb_req_context_get(req);
return (ctxt) ? false : true;
}
static void cbRemoveClientCtxt(void *data)
{
- wmClientCtxt *ctxt = (wmClientCtxt *)data;
+ WMClientCtxt *ctxt = (WMClientCtxt *)data;
if (ctxt == nullptr)
{
return;
bool isFirstReq = checkFirstReq(req);
if (!isFirstReq)
{
- wmClientCtxt *ctxt = (wmClientCtxt *)afb_req_context_get(req);
+ WMClientCtxt *ctxt = (WMClientCtxt *)afb_req_context_get(req);
HMI_DEBUG("wm", "You're %s.", ctxt->name.c_str());
if (ctxt->name != std::string(a_drawing_name))
{
if (isFirstReq)
{
- wmClientCtxt *ctxt = new wmClientCtxt(afb_req_get_application_id(req), a_drawing_name);
+ WMClientCtxt *ctxt = new WMClientCtxt(afb_req_get_application_id(req), a_drawing_name);
HMI_DEBUG("wm", "create session for %s", ctxt->name.c_str());
afb_req_session_set_LOA(req, 1);
afb_req_context_set(req, ctxt, cbRemoveClientCtxt);
return;
}
afb_req_success(req, NULL, "success");
-
- g_afb_instance->app.subscribeEventForApp(afb_req_get_application_id(req), req, event_name);
}
catch (std::exception &e)
{