X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fmain.cpp;h=25fbf2aeed239b5bb64c3544378c5dd6598ea3e1;hb=bbf684fb596414141190958dbd0b0abcc0f7f6d3;hp=ef07e26a26459d3a4b1d113a2a4fc23e80a6b353;hpb=af1b212d5af5b22051f1cd54028eb8f7e6a2297b;p=apps%2Fagl-service-windowmanager.git diff --git a/src/main.cpp b/src/main.cpp index ef07e26..25fbf2a 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -31,16 +31,16 @@ extern "C" #include } -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; + role = appRole; } -} wmClientCtxt; +} WMClientCtxt; struct afb_instance { @@ -180,13 +180,13 @@ int binding_init() noexcept 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; @@ -232,7 +232,7 @@ void windowmanager_requestsurface(afb_req req) noexcept 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)) { @@ -247,7 +247,7 @@ void windowmanager_requestsurface(afb_req req) noexcept 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); @@ -364,7 +364,8 @@ void windowmanager_activatesurface(afb_req req) noexcept } catch (std::exception &e) { - HMI_WARNING("wm", "failed", "Uncaught exception while calling activatesurface: %s", e.what()); + HMI_WARNING("wm", "failed: Uncaught exception while calling activatesurface: %s", e.what()); + g_afb_instance->app.exeptionProcessForTransition(); return; } } @@ -404,7 +405,8 @@ void windowmanager_deactivatesurface(afb_req req) noexcept } catch (std::exception &e) { - HMI_WARNING("wm", "Uncaught exception while calling deactivatesurface: %s", e.what()); + HMI_WARNING("wm", "failed: Uncaught exception while calling deactivatesurface: %s", e.what()); + g_afb_instance->app.exeptionProcessForTransition(); return; } } @@ -436,7 +438,8 @@ void windowmanager_enddraw(afb_req req) noexcept } catch (std::exception &e) { - HMI_WARNING("wm", "failed", "Uncaught exception while calling enddraw: %s", e.what()); + HMI_WARNING("wm", "failed: Uncaught exception while calling enddraw: %s", e.what()); + g_afb_instance->app.exeptionProcessForTransition(); return; } }