add mode description examples
authorYoungjae Shin <yj99.shin@samsung.com>
Wed, 13 Mar 2019 05:44:03 +0000 (14:44 +0900)
committerYoungjae Shin <yj99.shin@samsung.com>
Wed, 18 Mar 2020 08:53:00 +0000 (17:53 +0900)
example/tizen_A_mode.xml [new file with mode: 0644]
example/tizen_mode_actions.xml [new file with mode: 0644]
example/tizen_mode_actions.xsd [new file with mode: 0644]
example/tizen_mode_actions.xsl [new file with mode: 0644]

diff --git a/example/tizen_A_mode.xml b/example/tizen_A_mode.xml
new file mode 100644 (file)
index 0000000..752a08a
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<tizen xmlns="http://www.tizen.org" version="5.5">
+       <mode name="A" Transparent="No">
+               <action name="wifi.power" Achieve="Must" Changeable="No">On</action>
+               <action name="bt.power" Changeable="Yes">Keep</action>
+               <action name="sensord.changeAccuracy" Achieve="Must" Changeable="No">100</action>
+       </mode>
+</tizen>
diff --git a/example/tizen_mode_actions.xml b/example/tizen_mode_actions.xml
new file mode 100644 (file)
index 0000000..3211f04
--- /dev/null
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<tizen_modes xmlns="http://www.tizen.org" version="5.5">
+       <actions>
+               <action name="wifi.power" type="bool" since="5.5" domain="Network & Connectivity" default="off" plugin="wifi-manager">
+                       <desc>wifi On/Off</desc>
+               </action>
+               <action name="sensord.changeAccuracy" type="int" since="5.5" domain="System" default="100" plugin="sensor-fw">
+                       <desc>Sensor Accuracy</desc>
+                       <conflict>sensord.exactness     </conflict>
+               </action>
+               <action name="sensord.exactness" type="int" since="5.5" domain="System" default="100" plugin="sensor-fw">
+                       <desc>Sensor Exactness</desc>
+                       <conflict>sensord.changeAccuracy</conflict>
+               </action>
+       </actions>
+</tizen>
diff --git a/example/tizen_mode_actions.xsd b/example/tizen_mode_actions.xsd
new file mode 100644 (file)
index 0000000..6b855f1
--- /dev/null
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" xmlns:o="http://www.tizen.org" targetNamespace="http://www.tizen.org">
+       <xs:element name="tizen_modes">
+               <xs:complexType>
+                       <xs:sequence>
+                               <xs:element maxOccurs="1" ref="o:actions"/>
+                       </xs:sequence>
+                       <xs:attribute name="version" use="required" type="o:versionT"/>
+               </xs:complexType>
+       </xs:element>
+       <xs:element name="actions">
+               <xs:complexType>
+                       <xs:sequence>
+                               <xs:element maxOccurs="unbounded" ref="o:action"/>
+                       </xs:sequence>
+               </xs:complexType>
+       </xs:element>
+       <xs:element name="action">
+               <xs:complexType>
+                       <xs:sequence>
+                               <xs:element minOccurs="0" ref="o:conflict"/>
+                               <xs:element ref="o:desc"/>
+                       </xs:sequence>
+                       <xs:attribute name="name" use="required" type="xs:ID"/>
+                       <xs:attribute name="since" use="required" type="o:versionT"/>
+                       <xs:attribute name="type" use="required" type="o:typeT"/>
+                       <xs:attribute name="domain" use="required" type="o:domainT"/>
+                       <xs:attribute name="default" use="required" type="xs:string"/>
+                       <xs:attribute name="plugin" use="required" type="xs:string"/>
+               </xs:complexType>
+       </xs:element>
+       <xs:element name="desc" type="xs:string"/>
+       <xs:element name="conflict" type="xs:string"/>
+       <xs:simpleType name="versionT">
+               <xs:restriction base="xs:string">
+                       <xs:enumeration value="5.5"/>
+                       <xs:enumeration value="6.0"/>
+               </xs:restriction>
+       </xs:simpleType>
+       <xs:simpleType name="domainT">
+               <xs:restriction base="xs:string">
+                       <xs:enumeration value="App Framework"/>
+                       <xs:enumeration value="Applications"/>
+                       <xs:enumeration value="Broadcasting"/>
+                       <xs:enumeration value="Documents"/>
+                       <xs:enumeration value="Dotnet"/>
+                       <xs:enumeration value="Graphics System"/>
+                       <xs:enumeration value="Machine Learning"/>
+                       <xs:enumeration value="Multimedia"/>
+                       <xs:enumeration value="Network & Connectivity"/>
+                       <xs:enumeration value="SCM"/>
+                       <xs:enumeration value="SDK"/>
+                       <xs:enumeration value="Security"/>
+                       <xs:enumeration value="Service Framework"/>
+                       <xs:enumeration value="System"/>
+                       <xs:enumeration value="Testing"/>
+                       <xs:enumeration value="TinyAra"/>
+                       <xs:enumeration value="UI Framework"/>
+                       <xs:enumeration value="Web Framework"/>
+               </xs:restriction>
+       </xs:simpleType>
+       <xs:simpleType name="typeT">
+               <xs:restriction base="xs:string">
+                       <xs:enumeration value="int"/>
+                       <xs:enumeration value="string"/>
+                       <xs:enumeration value="bool"/>
+               </xs:restriction>
+       </xs:simpleType>
+</xs:schema>
diff --git a/example/tizen_mode_actions.xsl b/example/tizen_mode_actions.xsl
new file mode 100644 (file)
index 0000000..d4bf01e
--- /dev/null
@@ -0,0 +1,11 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+    <xsl:output method="xml" indent="yes" omit-xml-declaration="no"/>
+    <xsl:strip-space elements="*"/>
+    <xsl:template match="@*|node()">
+        <xsl:copy>
+            <xsl:apply-templates select="@*|node()">
+                <xsl:sort select="@name" data-type="text" order="ascending"/>
+            </xsl:apply-templates>
+        </xsl:copy>
+    </xsl:template>
+</xsl:stylesheet>