Set LOA level for some verbs
authorKazumasa Mitsunari <knimitz@witz-inc.co.jp>
Mon, 14 May 2018 00:03:32 +0000 (09:03 +0900)
committerKazumasa Mitsunari <knimitz@witz-inc.co.jp>
Mon, 14 May 2018 00:16:51 +0000 (09:16 +0900)
Window Manager client needs to get authority to call some verbs.

Change-Id: I48fe9922b35c6b1e6f59d68f1966d7f5a2c75beb
Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
src/main.cpp

index 2f813a3..3828afd 100644 (file)
@@ -620,11 +620,11 @@ void windowmanager_debug_terminate(afb_req req) noexcept {
 const struct afb_verb_v2 windowmanager_verbs[] = {
    { "requestsurface", windowmanager_requestsurface, nullptr, nullptr, AFB_SESSION_NONE },
    { "requestsurfacexdg", windowmanager_requestsurfacexdg, nullptr, nullptr, AFB_SESSION_NONE },
-   { "activatesurface", windowmanager_activatesurface, nullptr, nullptr, AFB_SESSION_NONE },
-   { "deactivatesurface", windowmanager_deactivatesurface, nullptr, nullptr, AFB_SESSION_NONE },
-   { "enddraw", windowmanager_enddraw, nullptr, nullptr, AFB_SESSION_NONE },
+   { "activatesurface", windowmanager_activatesurface, nullptr, nullptr, AFB_SESSION_LOA_1 },
+   { "deactivatesurface", windowmanager_deactivatesurface, nullptr, nullptr, AFB_SESSION_LOA_1 },
+   { "enddraw", windowmanager_enddraw, nullptr, nullptr, AFB_SESSION_LOA_1 },
    { "getdisplayinfo", windowmanager_getdisplayinfo_thunk, nullptr, nullptr, AFB_SESSION_NONE },
-   { "getareainfo", windowmanager_getareainfo_thunk, nullptr, nullptr, AFB_SESSION_NONE },
+   { "getareainfo", windowmanager_getareainfo_thunk, nullptr, nullptr, AFB_SESSION_LOA_1 },
    { "wm_subscribe", windowmanager_wm_subscribe, nullptr, nullptr, AFB_SESSION_NONE },
    { "list_drawing_names", windowmanager_list_drawing_names, nullptr, nullptr, AFB_SESSION_NONE },
    { "ping", windowmanager_ping, nullptr, nullptr, AFB_SESSION_NONE },