aboutsummaryrefslogtreecommitdiffstats
path: root/src/policy_manager/stm/zipc/src/StateTransitionor/AppsLayer/ZAPL_Apps_func.c
diff options
context:
space:
mode:
authorYuta Doi <yuta-d@witz-inc.co.jp>2018-07-11 16:21:37 +0900
committerYuta Doi <yuta-d@witz-inc.co.jp>2018-07-12 00:27:30 +0000
commit67f414f67ee22ddf40003d1be3fa1d0cb13deb8f (patch)
tree407f01c2af124c97f38d79403b808828b6ea527f /src/policy_manager/stm/zipc/src/StateTransitionor/AppsLayer/ZAPL_Apps_func.c
parent99b6f4d2fcd421d3a760a88a67e511fb6fc98068 (diff)
Add policy table generated by ZIPC for EXAMPLE
To PolicyManager, add the source code of policy table which is generated by ZIPC for EXAMPLE. If use this example, please comment out line 84 and uncomment line 85 in CMakeLists.txt as follows: #set(USE_STM_NAME stub) set(USE_STM_NAME zipc) If try to show split layout, please rename from roles.db.split to roles.db in src/policy_manager/db/. Bug-AGL: SPEC-1537 Change-Id: I4b35f148313e0c5a12c59ed1c2f8eb6fbcf3ea6b Signed-off-by: Yuta Doi <yuta-d@witz-inc.co.jp>
Diffstat (limited to 'src/policy_manager/stm/zipc/src/StateTransitionor/AppsLayer/ZAPL_Apps_func.c')
-rw-r--r--src/policy_manager/stm/zipc/src/StateTransitionor/AppsLayer/ZAPL_Apps_func.c128
1 files changed, 128 insertions, 0 deletions
diff --git a/src/policy_manager/stm/zipc/src/StateTransitionor/AppsLayer/ZAPL_Apps_func.c b/src/policy_manager/stm/zipc/src/StateTransitionor/AppsLayer/ZAPL_Apps_func.c
new file mode 100644
index 0000000..b42df05
--- /dev/null
+++ b/src/policy_manager/stm/zipc/src/StateTransitionor/AppsLayer/ZAPL_Apps_func.c
@@ -0,0 +1,128 @@
+/************************************************************/
+/* ZAPL_Apps_func.c */
+/* Function and variable source file */
+/* ZIPC Designer Version 1.2.0 */
+/************************************************************/
+#include "../ZST_include.h"
+
+/*************************************************************
+ Function definition
+*************************************************************/
+
+/*
+ * @name stm_apl_start_activity_none
+ */
+void stm_apl_start_activity_none() {
+ g_stm_crr_state.layer[StmLayerNoApps].state = StmLayoutNoNone;
+ g_stm_crr_state.layer[StmLayerNoApps].changed = STM_TRUE;
+}
+
+/*
+ * @name stm_apl_start_activity_map
+ */
+void stm_apl_start_activity_map() {
+ g_stm_crr_state.layer[StmLayerNoApps].state = StmLayoutNoMapNml;
+ g_stm_crr_state.layer[StmLayerNoApps].changed = STM_TRUE;
+
+ if ((g_stm_event == StmEvtNoActivate)
+ && (g_stm_category == StmCtgNoMap)) {
+ g_stm_map_is_activated = STM_TRUE;
+ }
+}
+
+/*
+ * @name stm_apl_start_activity_map_split
+ */
+void stm_apl_start_activity_map_split() {
+ g_stm_crr_state.layer[StmLayerNoApps].state = StmLayoutNoMapSpl;
+ g_stm_crr_state.layer[StmLayerNoApps].changed = STM_TRUE;
+
+ if ((g_stm_event == StmEvtNoActivate)
+ && (g_stm_category == StmCtgNoMap)) {
+ g_stm_map_is_activated = STM_TRUE;
+ }
+}
+
+/*
+ * @name stm_apl_start_activity_map_fullscreen
+ */
+void stm_apl_start_activity_map_fullscreen() {
+ g_stm_crr_state.layer[StmLayerNoApps].state = StmLayoutNoMapFll;
+ g_stm_crr_state.layer[StmLayerNoApps].changed = STM_TRUE;
+
+ if ((g_stm_event == StmEvtNoActivate)
+ && (g_stm_category == StmCtgNoMap)) {
+ g_stm_map_is_activated = STM_TRUE;
+ }
+}
+
+/*
+ * @name stm_apl_start_activity_splitable_normal
+ */
+void stm_apl_start_activity_splitable_normal() {
+ g_stm_crr_state.layer[StmLayerNoApps].state = StmLayoutNoSplNml;
+ g_stm_crr_state.layer[StmLayerNoApps].changed = STM_TRUE;
+}
+
+/*
+ * @name stm_apl_start_activity_splitable_split
+ */
+void stm_apl_start_activity_splitable_split() {
+ g_stm_crr_state.layer[StmLayerNoApps].state = StmLayoutNoSplSpl;
+ g_stm_crr_state.layer[StmLayerNoApps].changed = STM_TRUE;
+}
+
+/*
+ * @name stm_apl_start_activity_general
+ */
+void stm_apl_start_activity_general() {
+ g_stm_crr_state.layer[StmLayerNoApps].state = StmLayoutNoGenNml;
+ g_stm_crr_state.layer[StmLayerNoApps].changed = STM_TRUE;
+}
+
+/*
+ * @name stm_apl_start_activity_system
+ */
+void stm_apl_start_activity_system() {
+ g_stm_crr_state.layer[StmLayerNoApps].state = StmLayoutNoSysNml;
+ g_stm_crr_state.layer[StmLayerNoApps].changed = STM_TRUE;
+}
+
+/*
+ * @name stm_apl_event_restriction_mode_off
+ */
+void stm_apl_event_restriction_mode_off() {
+ g_stm_crr_state.layer[StmLayerNoApps].state = g_prv_apps_state_rest_mode_1;
+ g_stm_crr_state.layer[StmLayerNoApps].changed = STM_TRUE;
+}
+
+/*
+ * @name stm_apl_event_restriction_mode_2_on
+ */
+void stm_apl_event_restriction_mode_2_on() {
+ g_prv_apps_state_rest_mode_1 = g_stm_prv_state.layer[StmLayerNoApps].state;
+}
+
+/*
+ * @name stm_apl_initialize_variable
+ */
+void stm_apl_initialize_variable() {
+ g_stm_prv_state.layer[StmLayerNoApps].state = StmLayoutNoNone;
+ g_stm_prv_state.layer[StmLayerNoApps].changed = STM_FALSE;
+
+ g_stm_crr_state.layer[StmLayerNoApps].state = StmLayoutNoNone;
+ g_stm_crr_state.layer[StmLayerNoApps].changed = STM_FALSE;
+}
+
+/*
+ * @name stm_apl_start_stm
+ */
+void stm_apl_start_stm() {
+ if (g_stm_event == StmEvtNoUndo) {
+ // nop
+ }
+ else {
+ g_stm_prv_state.layer[StmLayerNoApps].state = g_stm_crr_state.layer[StmLayerNoApps].state;
+ }
+ g_stm_crr_state.layer[StmLayerNoApps].changed = STM_FALSE;
+}