add profile to choose proper keys not to include all keys 13/104013/2
authorMyoungJune Park <mj2004.park@samsung.com>
Mon, 12 Dec 2016 05:55:11 +0000 (14:55 +0900)
committerMyoungJune Park <mj2004.park@samsung.com>
Wed, 18 Jan 2017 06:42:43 +0000 (15:42 +0900)
Change-Id: I3310b7cd6c479a18c403b25fb3cb9a6081323aaa
Signed-off-by: MyoungJune Park <mj2004.park@samsung.com>
Makefile
check.xsd
create_cmd.xsl
data/vconf-internal-setting-keys.xml

index 48fec4f..9837361 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -28,6 +28,9 @@ init:
        @mkdir -p report
        @mkdir -p scripts
        @mkdir -p include
+       @find scripts -name "*.sh" -exec rm {} \;
+       @find data -name "*.sh" -exec rm {} \;
+
 #      if [ -a ./scripts/all.sh ]; \
 #      then \
 #              rm ./scripts/all.sh; \
index 4b7b9d1..e22daae 100644 (file)
--- a/check.xsd
+++ b/check.xsd
        </xs:attribute>
 
 
+       <xs:attribute name="profile">
+               <xs:simpleType>
+                       <xs:restriction base="xs:string">
+                               <xs:enumeration value="all"/>
+                               <xs:enumeration value="common"/>
+                               <xs:enumeration value="mobile"/>
+                               <xs:enumeration value="wearable"/>
+                               <xs:enumeration value="tv"/>
+                       </xs:restriction>
+               </xs:simpleType>
+       </xs:attribute>
+
        <xs:element name="vconfkey">
                <xs:complexType>
                        <xs:sequence>
@@ -38,6 +50,7 @@
                        </xs:sequence>
                        <xs:attribute name="name" type='xs:string'/>
                        <xs:attribute ref="type"/>
+                       <xs:attribute ref="profile"/>
 
                        <xs:attribute name="headeronly" type='xs:string'/>
 
index 1bb6155..1aaf11e 100644 (file)
@@ -7,11 +7,9 @@ xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
   <xsl:apply-templates/>
 </xsl:template>
 
-
 <xsl:template match="vconfkey">
        <xsl:variable name="layer_path" select="./@name"/>
        <xsl:variable name="layer_name" select="substring-before($layer_path,'/')"/>
-
 <xsl:choose>
        <xsl:when test="./initscript">
 <xsl:value-of select="initscript"/>
@@ -22,37 +20,20 @@ xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
        <xsl:when test="@headeronly">
   </xsl:when>
   <xsl:otherwise>
-<xsl:choose>
-       <xsl:when test="./val[@model=$target]">
-               <xsl:choose>
-<xsl:when test="$layer_name = 'db' or $layer_name = 'file' ">
-/usr/bin/buxton2ctl -i -d create-<xsl:value-of select="@type"/> "system" "<xsl:value-of select="./@name"/>"  "<xsl:value-of select="./val[@model=$target]"/>" <xsl:value-of select="./@label"/> "<xsl:value-of select="./@readPriv"/>" "<xsl:value-of select="./@writePriv"/>"<xsl:text>&#10;</xsl:text>
-                       </xsl:when>
-                       <xsl:otherwise>
-/usr/bin/buxton2ctl -i -d create-<xsl:value-of select="@type"/> "memory" "<xsl:value-of select="./@name"/>"  "<xsl:value-of select="./val[@model=$target]"/>" <xsl:value-of select="./@label"/> "<xsl:value-of select="./@readPriv"/>" "<xsl:value-of select="./@writePriv"/>"<xsl:text>&#10;</xsl:text>
-                       </xsl:otherwise>
-               </xsl:choose>
-  </xsl:when>
-  <xsl:otherwise>
-               <xsl:choose>
-                       <xsl:when test="$layer_name = 'db' or $layer_name = 'file' ">
-/usr/bin/buxton2ctl -i -d create-<xsl:value-of select="@type"/> "system" "<xsl:value-of select="./@name"/>"  "<xsl:value-of select="./val[not(@model)]"/>" <xsl:value-of select="./@label"/> "<xsl:value-of select="./@readPriv"/>" "<xsl:value-of select="./@writePriv"/>"<xsl:text>&#10;</xsl:text>
-                       </xsl:when>
-                       <xsl:otherwise>
-/usr/bin/buxton2ctl -i -d create-<xsl:value-of select="@type"/> "memory" "<xsl:value-of select="./@name"/>"  "<xsl:value-of select="./val[not(@model)]"/>" <xsl:value-of select="./@label"/> "<xsl:value-of select="./@readPriv"/>" "<xsl:value-of select="./@writePriv"/>"<xsl:text>&#10;</xsl:text>
-                       </xsl:otherwise>
-               </xsl:choose>
-  </xsl:otherwise>
-</xsl:choose>
+         <xsl:choose>
+                 <xsl:when test="./@profile=$target">
+/usr/bin/buxton2ctl -i -d create-<xsl:value-of select="@type"/> <xsl:choose><xsl:when test="$layer_name = 'db' or $layer_name = 'file' "> "system" </xsl:when><xsl:otherwise> "memory" </xsl:otherwise></xsl:choose> "<xsl:value-of select="./@name"/>"  <xsl:choose><xsl:when test="./val[@model=$target]"> "<xsl:value-of select="./val[@model=$target]"/>" </xsl:when><xsl:otherwise> "<xsl:value-of select="./val[not(@model)]"/>" </xsl:otherwise></xsl:choose> <xsl:value-of select="./@label"/> "<xsl:value-of select="./@readPriv"/>" "<xsl:value-of select="./@writePriv"/>"<xsl:text>&#10;</xsl:text>
+                 </xsl:when>
+                 <xsl:otherwise>
+                         <xsl:choose>
+                                 <xsl:when test="@profile"></xsl:when><!-- do nothing -->
+                                 <xsl:otherwise>
+/usr/bin/buxton2ctl -i -d create-<xsl:value-of select="@type"/> <xsl:choose><xsl:when test="$layer_name = 'db' or $layer_name = 'file' "> "system" </xsl:when><xsl:otherwise> "memory" </xsl:otherwise></xsl:choose> "<xsl:value-of select="./@name"/>"  <xsl:choose><xsl:when test="./val[@model=$target]"> "<xsl:value-of select="./val[@model=$target]"/>" </xsl:when><xsl:otherwise> "<xsl:value-of select="./val[not(@model)]"/>" </xsl:otherwise></xsl:choose> <xsl:value-of select="./@label"/> "<xsl:value-of select="./@readPriv"/>" "<xsl:value-of select="./@writePriv"/>"<xsl:text>&#10;</xsl:text>
+                         </xsl:otherwise></xsl:choose>
+                 </xsl:otherwise>
+         </xsl:choose>
+
   </xsl:otherwise>
 </xsl:choose>
 </xsl:template>
-
-
-<xsl:template match="initscript">
-
-# INITSCRIPT HERE
-
-</xsl:template>
-
 </xsl:stylesheet>
index b5e30bf..6f9b3f2 100644 (file)
@@ -1483,7 +1483,7 @@ echo "Do Nothing on TV"
     <email>mj2004.park@samsung.com</email>
     <comment><![CDATA[ it's for Wearable ]]></comment>
   </vconfkey>
-  <vconfkey type="int32" name="db/setting/blockmode_wearable_r" headeronly="true" readPriv="" writePriv="">
+  <vconfkey profile="wearable" type="int32" name="db/setting/blockmode_wearable_r" readPriv="" writePriv="">
     <header>VCONFKEY_SETAPPL_BLOCKMODE_WEARABLE_R_BOOL</header>
     <val>0</val>
     <creator> Myoungjune Park </creator>