summaryrefslogtreecommitdiffstats
path: root/policy_manager/policy_manager.cpp
AgeCommit message (Collapse)AuthorFilesLines
2018-11-30Migrates bindings v3Tadao Tanikawa1-3/+3
This patch migrates biding API of WM to v3. Change-Id: I2f2b23a8af437a414e2a00d629d3e72d0614eb72 Signed-off-by: Tadao Tanikawa <tanikawa.tadao@jp.panasonic.com>
2018-10-15Migrate hmi-debug into utilKazumasa Mitsunari1-93/+93
Migrate hmi-debug into util for * simplicity * remove warnings error `-Wunused-function` Change-Id: I7d061849429e5d50cc7d19d2051c7f5d0f0ef169 Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
2018-08-31Fix Window Manager crush when application terminatedKazumasa Mitsunari1-13/+8
Fix Window Manager crush when applicaiton terminated caused by wrong handling of sd_event_source. v2. Add error check just in case Bug-AGL: SPEC-1696 Change-Id: I639a60015cde46fca6bc5a3f6e8037afd8d79330 Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
2018-08-15Readd Policy Manager as pluginYuta Doi1-0/+1356
This patch reverts commit c6f9a9b8468b3746a3dec7ee2a0b7d84ec9fb44a and update it. Policy Manager decides next layout by inputed event and current state based on the policy table. And Policy Manager is plugin for Window Manager. Therefore the OEMs can replace it. This patch provides Policy Manager I/F as reference implementation and does not have policy table. Therefore Policy Manager updates each layers to draw the applications in requested area in accordance with just like activate/deactivate request. [APIs of Policy Manager class] - int initialize(void) Initialize Policy Manger. in: none out: 0(success), -1(error) - void registerCallback(CallbackTable callback_table) Register callback functions. in: the pointers of callback handlers out: none "CallbackTable" type is as follows: typedef struct { Handler onStateTransitioned; Handler onError; } CallbackTable; "Handler" type is as follows: using Handler = std::function<void(json_object *)>; - int setInputEventData(json_object *json_in) Set input event data for the policy table. in: input event data as json_object out: 0(success), -1(error) - int executeStateTransition(void) Execute state transition by using set input event data. in: none out: 0(success), -1(error) - void undoState(void) Undo state only once per once state transition. in: none out: none [Callbacks of Policy Manager class] - void onStateTransitioned(json_object *json_out) When state transition succeeds, this callback is called. The argument json_out has the state after transition. - void onError(json_object *json_out) When state transition fails, this callback is called. The argument json_out has the error information like message, inputed event datas and etc.. Bug-AGL: SPEC-1537 Change-Id: Ib8c71f2e544cb90b6763d07fad56dc1c453e9a97 Signed-off-by: Yuta Doi <yuta-d@witz-inc.co.jp>