each plugin install own rule file
authorYoungjae Shin <yj99.shin@samsung.com>
Wed, 7 Aug 2019 06:12:59 +0000 (15:12 +0900)
committerYoungjae Shin <yj99.shin@samsung.com>
Thu, 19 Mar 2020 04:30:19 +0000 (13:30 +0900)
appfw/CMakeLists.txt
appfw/tizen_appfw_rule.xml [new file with mode: 0644]
bluetooth/CMakeLists.txt
bluetooth/tizen_bt_rule.xml [new file with mode: 0644]
packaging/modes-plugins.spec
vconf/CMakeLists.txt
vconf/tizen_vconf_rule.xml [new file with mode: 0644]
wifi/CMakeLists.txt
wifi/tizen_wifi_rule.xml [new file with mode: 0644]
xml/tizen_action_rule.xml [deleted file]

index de7593f28bec477d19322fe25755474c825b5fcc..98cb64205ac9e239c7c1bf1a5dee2f784e976441 100644 (file)
@@ -10,3 +10,4 @@ ADD_LIBRARY(${APPFW_PLUGIN} SHARED ${APPFW_SRCS})
 TARGET_LINK_LIBRARIES(${APPFW_PLUGIN} ${appfw_pkgs_LIBRARIES})
 SET_TARGET_PROPERTIES(${APPFW_PLUGIN} PROPERTIES NO_SONAME 1 )
 INSTALL(TARGETS ${APPFW_PLUGIN} DESTINATION ${MODES_PLUGIN_DEFAULT_DIR})
+INSTALL(FILES tizen_appfw_rule.xml DESTINATION ${MODES_ACTIONRULE_DEFAULT_DIR})
diff --git a/appfw/tizen_appfw_rule.xml b/appfw/tizen_appfw_rule.xml
new file mode 100644 (file)
index 0000000..c35d564
--- /dev/null
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<tizenModes xmlns="http://www.tizen.org" version="5.5">
+  <actionRule>
+    <rule name="appfw.launch" type="string" since="5.5" plugin="appfw">
+      <defaultVal>0</defaultVal>
+      <desc>Launch App</desc>
+      <domain>App Framework</domain>
+    </rule>
+  </actionRule>
+</tizenModes>
index 1866f615519d560159021f014947e880238297bd..77b6b216c6f73b4ece1b7b9925daccbb0bb0a362 100644 (file)
@@ -10,3 +10,4 @@ ADD_LIBRARY(${BT_PLUGIN} SHARED ${BT_SRCS})
 TARGET_LINK_LIBRARIES(${BT_PLUGIN} ${bluetooth_pkgs_LIBRARIES})
 SET_TARGET_PROPERTIES(${BT_PLUGIN} PROPERTIES NO_SONAME 1 )
 INSTALL(TARGETS ${BT_PLUGIN} DESTINATION ${MODES_PLUGIN_DEFAULT_DIR})
+INSTALL(FILES tizen_bt_rule.xml DESTINATION ${MODES_ACTIONRULE_DEFAULT_DIR})
diff --git a/bluetooth/tizen_bt_rule.xml b/bluetooth/tizen_bt_rule.xml
new file mode 100644 (file)
index 0000000..4a1ae3a
--- /dev/null
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<tizenModes xmlns="http://www.tizen.org" version="5.5">
+  <actionRule>
+    <rule name="bluetooth.power" type="bool" since="5.5" plugin="bluetooth">
+      <alias name="on">1</alias>
+      <alias name="off">0</alias>
+      <defaultVal>0</defaultVal>
+      <desc>bluetooth On/Off</desc>
+      <domain>Network &amp; Connectivity</domain>
+    </rule>
+    <rule name="bluetooth.audioConnect" type="string" since="5.5" plugin="bluetooth">
+      <defaultVal>0:0:0:0:0:0</defaultVal>
+      <desc>bluetooth Audio Connect</desc>
+      <domain>Network &amp; Connectivity</domain>
+    </rule>
+  </actionRule>
+</tizenModes>
index 9c9f7c8cc128e3ecca77eb2e91bffae85c243822..f73143864b7cf1a96f5f199264248a30503a1ae6 100644 (file)
@@ -53,19 +53,16 @@ MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
        -DCMAKE_VERBOSE_MAKEFILE=OFF \
        -DTEST_INSTALL_DIR:PATH=%{modes_test_dir} \
        -DMODES_PLUGIN_DEFAULT_DIR:PATH=%{modes_plugin_dir} \
+       -DMODES_ACTIONRULE_DEFAULT_DIR:PATH=%{modes_data_dir}/rule \
        -DBUILD_GCOV=%{?gcov:1}%{!?gcov:0} \
        -DSTDOUT_LOG=%{?stdlog:1}%{!?stdlog:0}
 make %{?_smp_mflags}
 
 %install
 %make_install
-mkdir -p %{buildroot}%{modes_data_dir}/rule
-install -m 0644 xml/*_rule.xml %{buildroot}%{modes_data_dir}/rule/
 
 %check
-pushd xml
-xmllint --noout --schema %{modes_data_dir}/xsd/tizen_action_rule.xsd tizen_action_rule.xml
-popd
+xmllint --noout --schema %{modes_data_dir}/schema/tizen_action_rule.xsd %{buildroot}%{modes_data_dir}/rule/tizen_*_rule.xml
 
 %post -p /sbin/ldconfig
 %postun -p /sbin/ldconfig
index 63e241182c2382785f2ba0fa4b883a8606b8d405..6a83822523959d328d3b2a84cc118ea2148b8d53 100644 (file)
@@ -18,3 +18,4 @@ ADD_LIBRARY(${VCONF_PLUGIN} SHARED ${VCONF_SRCS})
 TARGET_LINK_LIBRARIES(${VCONF_PLUGIN} ${vconf_pkgs_LIBRARIES})
 SET_TARGET_PROPERTIES(${VCONF_PLUGIN} PROPERTIES NO_SONAME 1 )
 INSTALL(TARGETS ${VCONF_PLUGIN} DESTINATION ${MODES_PLUGIN_DEFAULT_DIR})
+INSTALL(FILES tizen_vconf_rule.xml DESTINATION ${MODES_ACTIONRULE_DEFAULT_DIR})
diff --git a/vconf/tizen_vconf_rule.xml b/vconf/tizen_vconf_rule.xml
new file mode 100644 (file)
index 0000000..c386944
--- /dev/null
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<tizenModes xmlns="http://www.tizen.org" version="5.5">
+  <actionRule>
+    <rule name="vconf.db.setting.psmode" type="int" since="5.5" plugin="vconf">
+      <alias name="SETTING_PSMODE_NORMAL">0</alias>
+      <alias name="SETTING_PSMODE_POWERFUL">1</alias>
+      <alias name="SETTING_PSMODE_ADVISOR">1</alias>
+      <alias name="SETTING_PSMODE_SURVIVAL">2</alias>
+      <alias name="SETTING_PSMODE_EMERGENCY">2</alias>
+      <alias name="SETTING_PSMODE_WEARABLE">3</alias>
+      <alias name="SETTING_PSMODE_WEARABLE_ENHANCED">4</alias>
+      <alias name="SETTING_PSMODE_MAX">0</alias>
+      <defaultVal>0</defaultVal>
+      <conflict>sensord.changeAccuracy</conflict>
+      <desc>test</desc>
+      <domain>System</domain>
+    </rule>
+    <rule name="vconf.db.bluetooth.status" type="int" since="5.5" plugin="vconf">
+      <alias name="VCONFKEY_BT_STATUS_OFF">0</alias>
+      <alias name="VCONFKEY_BT_STATUS_ON">1</alias>
+      <alias name="VCONFKEY_BT_STATUS_BT_VISIBLE">2</alias>
+      <alias name="VCONFKEY_BT_STATUS_TRANSFER">4</alias>
+      <defaultVal>0</defaultVal>
+      <desc>test</desc>
+      <domain>Network &amp; Connectivity</domain>
+    </rule>
+  </actionRule>
+</tizenModes>
index 573375e96613566fa431fa09a8ca5945ab1734aa..8ab197e4f3b9a2340152cfe331a3e34376ab0ec0 100644 (file)
@@ -18,3 +18,4 @@ ADD_LIBRARY(${WIFI_PLUGIN} SHARED ${WIFI_SRCS})
 TARGET_LINK_LIBRARIES(${WIFI_PLUGIN} ${wifi_pkgs_LIBRARIES})
 SET_TARGET_PROPERTIES(${WIFI_PLUGIN} PROPERTIES NO_SONAME 1 )
 INSTALL(TARGETS ${WIFI_PLUGIN} DESTINATION ${MODES_PLUGIN_DEFAULT_DIR})
+INSTALL(FILES tizen_wifi_rule.xml DESTINATION ${MODES_ACTIONRULE_DEFAULT_DIR})
diff --git a/wifi/tizen_wifi_rule.xml b/wifi/tizen_wifi_rule.xml
new file mode 100644 (file)
index 0000000..f82bc5a
--- /dev/null
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<tizenModes xmlns="http://www.tizen.org" version="5.5">
+  <actionRule>
+    <rule name="wifi.power" type="bool" since="5.5" plugin="wifi-manager">
+      <alias name="on">1</alias>
+      <alias name="off">0</alias>
+      <defaultVal>0</defaultVal>
+      <desc>wifi On/Off</desc>
+      <domain>Network &amp; Connectivity</domain>
+    </rule>
+  </actionRule>
+</tizenModes>
diff --git a/xml/tizen_action_rule.xml b/xml/tizen_action_rule.xml
deleted file mode 100644 (file)
index 4b1b558..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<tizenModes xmlns="http://www.tizen.org" version="5.5">
-  <actionRule>
-    <rule name="wifi.power" type="bool" since="5.5" plugin="wifi-manager">
-      <alias name="on">1</alias>
-      <alias name="off">0</alias>
-      <defaultVal>0</defaultVal>
-      <desc>wifi On/Off</desc>
-      <domain>Network &amp; Connectivity</domain>
-    </rule>
-    <rule name="bluetooth.power" type="bool" since="5.5" plugin="bluetooth">
-      <alias name="on">1</alias>
-      <alias name="off">0</alias>
-      <defaultVal>0</defaultVal>
-      <desc>bluetooth On/Off</desc>
-      <domain>Network &amp; Connectivity</domain>
-    </rule>
-    <rule name="bluetooth.audioConnect" type="string" since="5.5" plugin="bluetooth">
-      <defaultVal>0:0:0:0:0:0</defaultVal>
-      <desc>bluetooth Audio Connect</desc>
-      <domain>Network &amp; Connectivity</domain>
-    </rule>
-    <rule name="sensord.changeAccuracy" type="int" since="5.5" plugin="sensor-fw">
-      <defaultVal>100</defaultVal>
-      <conflict>sensord.exactness</conflict>
-      <desc>Sensor Accuracy</desc>
-      <domain>System</domain>
-    </rule>
-    <rule name="sensord.exactness" type="int" since="5.5" plugin="sensor-fw">
-      <defaultVal>100</defaultVal>
-      <conflict>sensord.changeAccuracy</conflict>
-      <desc>Sensor Exactness</desc>
-      <domain>System</domain>
-    </rule>
-    <rule name="vconf.db.setting.psmode" type="int" since="5.5" plugin="vconf">
-      <alias name="SETTING_PSMODE_NORMAL">0</alias>
-      <alias name="SETTING_PSMODE_POWERFUL">1</alias>
-      <alias name="SETTING_PSMODE_ADVISOR">1</alias>
-      <alias name="SETTING_PSMODE_SURVIVAL">2</alias>
-      <alias name="SETTING_PSMODE_EMERGENCY">2</alias>
-      <alias name="SETTING_PSMODE_WEARABLE">3</alias>
-      <alias name="SETTING_PSMODE_WEARABLE_ENHANCED">4</alias>
-      <alias name="SETTING_PSMODE_MAX">0</alias>
-      <defaultVal>0</defaultVal>
-      <conflict>sensord.changeAccuracy</conflict>
-      <desc>test</desc>
-      <domain>System</domain>
-    </rule>
-    <rule name="vconf.db.bluetooth.status" type="int" since="5.5" plugin="vconf">
-      <alias name="VCONFKEY_BT_STATUS_OFF">0</alias>
-      <alias name="VCONFKEY_BT_STATUS_ON">1</alias>
-      <alias name="VCONFKEY_BT_STATUS_BT_VISIBLE">2</alias>
-      <alias name="VCONFKEY_BT_STATUS_TRANSFER">4</alias>
-      <defaultVal>0</defaultVal>
-      <desc>test</desc>
-      <domain>Network &amp; Connectivity</domain>
-    </rule>
-    <rule name="browser.url" type="string" since="5.5" plugin="web">
-      <defaultVal>about:blank</defaultVal>
-      <desc>browser</desc>
-      <domain>Web Framework</domain>
-    </rule>
-    <rule name="display.nightLight" type="int" since="5.5" plugin="display">
-      <defaultVal>70</defaultVal>
-      <conflict>display.autoLight</conflict>
-      <desc>It makes the screen color warmer.</desc>
-      <domain>System</domain>
-    </rule>
-    <rule name="appfw.launch" type="string" since="5.5" plugin="appfw">
-      <defaultVal>0</defaultVal>
-      <desc>Launch App</desc>
-      <domain>App Framework</domain>
-    </rule>
-    <rule name="test.printInt" type="int" since="5.5" plugin="test">
-      <defaultVal>0</defaultVal>
-      <desc>It prints integerv value</desc>
-      <domain>System</domain>
-    </rule>
-    <rule name="test.printBool" type="bool" since="5.5" plugin="test">
-      <defaultVal>0</defaultVal>
-      <desc>It prints boolean value</desc>
-      <domain>System</domain>
-    </rule>
-  </actionRule>
-</tizenModes>