Add guide document for DataControl of dotnet 16/153616/4
authorInkyun Kil <inkyun.kil@samsung.com>
Fri, 29 Sep 2017 02:50:29 +0000 (11:50 +0900)
committerInkyun Kil <inkyun.kil@samsung.com>
Wed, 11 Oct 2017 07:45:05 +0000 (16:45 +0900)
PS3: Reviewed

Change-Id: I8e6ef116a45240dc6d4614ce204a0010f9c191e5
Signed-off-by: Inkyun Kil <inkyun.kil@samsung.com>
org.tizen.guides/html/dotnet/data_control_n.htm [new file with mode: 0755]
org.tizen.guides/html/images/exporting_datacontrol.png [changed mode: 0644->0755]
org.tizen.guides/html/images/exporting_datacontrol_cs.png [new file with mode: 0755]

diff --git a/org.tizen.guides/html/dotnet/data_control_n.htm b/org.tizen.guides/html/dotnet/data_control_n.htm
new file mode 100755 (executable)
index 0000000..d22c7dc
--- /dev/null
@@ -0,0 +1,592 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+  <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
+  <meta http-equiv="X-UA-Compatible" content="IE=9" />
+  <link rel="stylesheet" type="text/css" href="../css/styles.css" />
+  <link rel="stylesheet" type="text/css" href="../css/snippet.css" />
+  <script type="text/javascript" src="../scripts/snippet.js"></script>
+  <script type="text/javascript" src="../scripts/jquery.util.js" charset="utf-8"></script>
+  <script type="text/javascript" src="../scripts/common.js" charset="utf-8"></script>
+  <script type="text/javascript" src="../scripts/core.js" charset="utf-8"></script>
+  <script type="text/javascript" src="../scripts/search.js" charset="utf-8"></script>
+  <title>Data Control</title>
+ </head>
+ <body onload="prettyPrint()" style="overflow: auto;">
+
+ <div id="toc-navigation">
+  <div id="toc_border"><div id="toc">
+    <p class="toc-title">Dependencies</p>
+    <ul class="toc">
+      <li>Tizen 4.0 and Higher</li>
+    </ul>
+    <p class="toc-title">Content</p>
+    <ul class="toc">
+      <li><a href="#prerequisites">Prerequisites</a></li>
+      <li><a href="#map1">Managing a Provider</a></li>
+      <li><a href="#map2">Managing a Consumer</a></li>
+      <li><a href="#map3">Using a Matrix Cursor</a></li>
+      <li><a href="#export">Data Control Export</a></li>
+    </ul>
+       <p class="toc-title">Related Info</p>
+       <ul class="toc">
+               <li><a href="https://developer.tizen.org/dev-guide/csapi/namespaceTizen_1_1Applications_1_1DataControl.html">Tizen.Applications.DataControl Namespace</a></li>
+       </ul>
+  </div></div>
+</div>
+
+<div id="container"><div id="contents"><div class="content">
+
+<h1>Data Control</h1>
+<p>The data control is a standard mechanism for exchanging specific data between applications.</p>
+
+<p>A provider application shares its data, and a consumer application can request the shared data. All applications can function as consumers and request data shared by other applications using a data control. However, only service applications can function as providers and share their own data.</p>
+
+<p>The main features of the Tizen.Applications.DataControl namespace include:</p>
+<ul>
+       <li>Managing a provider
+       <p>You can have your application function as a provider to <a href="#map1">provide data to consumer applications</a> by using the <a href="https://developer.tizen.org/dev-guide/csapi/classTizen_1_1Applications_1_1DataControl_1_1Provider.html">Tizen.Applications.DataControl.Provider</a> class.</p>
+       <p>To create a provider, you must <a href="#export">export its provider functionalities</a> in the application project settings in the IDE.</p>
+       </li>
+       <li>Managing a consumer
+       <p>You can have your application function as a consumer to <a href="#map2">access data shared by service applications</a> by using the <a href="https://developer.tizen.org/dev-guide/csapi/classTizen_1_1Applications_1_1DataControl_1_1Consumer.html">Tizen.Applications.DataControl.Consumer</a> class.</p>
+       <p>The consumer sends a request to the provider to insert, update, select, or delete SQL-type data, or to add, access, set, or remove map-type data. The provider processes the request and sends a response back to the consumer.</p>
+       <p>For the consumer to access the data from the provider, it must know the provider ID and data ID.</p>
+       </li>
+       <li>Using a matrix cursor
+       <p>You can <a href="#map3">use a matrix cursor</a> by using the <a href="https://developer.tizen.org/dev-guide/csapi/classTizen_1_1Applications_1_1DataControl_1_1MatrixCursor.html">Tizen.Applications.DataControl.MatrixCursor</a> class.</p>
+       <p>The matrix cursor helps you to create a cursor for a collection of data that is not in a database.</p></li>
+</ul>
+
+  <p align="center"><strong>Figure: Data control mechanism</strong></p>
+  <p align="center"><img alt="Data control mechanism" src="../images/datacontrol.png" /></p>
+
+<h2 id="prerequisites">Prerequisites</h2>
+
+<p>The data control use cases run 2 applications. Each application plays a different role: one as the consumer, the other as the provider.</p>
+
+<p>To enable your application to use the data control functionality:</p>
+<ol>
+       <li>To use the <a href="https://developer.tizen.org/dev-guide/csapi/namespaceTizen_1_1Applications_1_1DataControl.html">Tizen.Applications.DataControl</a> namespace, the consumer has to request permission by adding the following privileges to the <code>tizen-manifest.xml</code> file:
+<pre class="prettyprint">
+&lt;privileges&gt;
+   &lt;privilege&gt;http://tizen.org/privilege/datasharing&lt;/privilege&gt;
+   &lt;privilege&gt;http://tizen.org/privilege/appmanager.launch&lt;/privilege&gt;
+&lt;/privileges&gt;
+</pre>
+       </li>
+       <li>For the provider, in Visual Studio, double-click <strong>tizen-manifest.xml</strong>, and in the manifest editor, go to <strong>Advanced &gt; Data Control</strong>, and click <strong>Add</strong> to add the provider details. Add the <strong>Read</strong> and <strong>Write</strong> access rights to both <strong>SQL</strong> and <strong>Map</strong> types, as needed.
+       <p>You can set the data access to be trusted, allowing other applications signed with the same certificate to access the data. You can also define privileges to restrict access to applications having the specific privileges.</p>
+       <p>The following code example shows how the <code>&lt;datacontrol&gt;</code> elements are consequently added to the <code>tizen-manifest.xml</code> file:</p>
+<pre class="prettyprint">
+&lt;?xml version="1.0" encoding="utf-8"?&gt;
+&lt;manifest xmlns="http://tizen.org/ns/packages" api-version="4.0"
+          package="@PACKAGE_NAME@" version="@VERSION@" install-location="internal-only"&gt;
+   &lt;label&gt;datacontrolprovider&lt;/label&gt;
+   &lt;author email="PUT YOUR EMAIL" href="www.tizen.org"&gt;PUT YOUR NAME&lt;/author&gt;
+   &lt;description&gt;datacontrolprovider&lt;/description&gt;
+   &lt;service-application appid="org.tizen.datacontrolprovider"
+                        exec="datacontrolprovider"
+                        nodisplay="true" multiple="false" type="capp" taskmanage="true"
+                        auto-restart="false" on-boot="false"&gt;
+      <span class="highlight">&lt;datacontrol providerid = "Your Provider ID" access="ReadWrite" type="Sql" trusted="True"&gt;</span>
+         <span class="highlight">&lt;privilege&gt;http://tizen.org/privilege/contact.read&lt;/privilege&gt;</span>
+         <span class="highlight">&lt;privilege&gt;http://tizen.org/privilege/email&lt;/privilege&gt;</span>
+      <span class="highlight">&lt;/datacontrol&gt;</span>
+      <span class="highlight">&lt;datacontrol providerid = "Your Provider ID" access="ReadWrite" type="Map" trusted="False"/&gt;</span>
+   &lt;/service-application&gt;
+   &lt;privileges&gt;
+      &lt;privilege&gt;http://tizen.org/privilege/datasharing&lt;/privilege&gt;
+   &lt;/privileges&gt;
+&lt;/manifest&gt;
+</pre>
+       </li>
+       <li>To use the methods and properties of the <code>Tizen.Applications.DataControl</code> namespace, include it in your application:
+<pre class="prettyprint">
+using Tizen.Applications.DataControl;
+</pre>
+       </li>
+</ol>
+
+<h2 id="map1">Managing a Provider</h2>
+
+<p>In a provider application, you must override the following abstract methods of the <a href="https://developer.tizen.org/dev-guide/csapi/classTizen_1_1Applications_1_1DataControl_1_1Provider.html">Tizen.Applications.DataControl.Provider</a> class for handling SQL requests: <code>OnSelect()</code>, <code>OnInsert()</code>, <code>OnUpdate()</code>, and <code>OnDelete()</code>. If you want to use Map-type data controls, you must override the <code>OnMapAdd()</code>, <code>OnMapGet()</code>, <code>OnMapSet()</code>, and <code>OnMapRemove()</code> methods. Optionally, you can override the <code>OnBulkInsert()</code>, <code>OnMapBulkAdd()</code>, and <code>OnDataChangeListenRequest()</code> methods as well.</p>
+
+<p>The applicable overridden method is called when a request is received from a consumer application.</p>
+
+<ol>
+       <li>Create a new <code>MyProvider</code> class, which inherits the <code>Tizen.Applications.DataControl.Provider</code> class, and implement the method overrides to react to the requests from consumer applications:
+<pre class="prettyprint">
+namespace XamarinProvider
+{
+    public class MyProvider : Provider
+    {
+        private const string LogTag = "XamarinProvider";
+
+        public MyProvider(string dataId) : base(dataId)
+        {
+        }
+
+        protected override BulkInsertResult OnBulkInsert(IEnumerable&lt;string&gt; queryList, BulkData bulkInsertData)
+        {
+            Log.Error(LogTag, "datacontrol  OnBulkInsert " + bulkInsertData.GetCount().ToString());
+
+            for (int i = 0; i &lt; bulkInsertData.GetCount(); i ++)
+            {
+                Log.Error(LogTag, "datacontrol " + bulkInsertData.GetData(i).GetItem&lt;string&gt;("test"));
+            }
+
+            BulkResultData data = new BulkResultData();
+            foreach (string query in queryList)
+            {
+                Log.Error(LogTag, "provider !!! @@@@! OnBulkInsert " + query);
+            }
+
+            var b = new Bundle();
+            b.AddItem("test", "test123");
+
+            var b2 = new Bundle();
+            b2.AddItem("test", "test777");
+
+            var b3 = new Bundle();
+            b3.AddItem("test", "test!!!!");
+
+            data.Add(b, 0);
+            data.Add(b2, 0);
+            data.Add(b3, 0);
+
+            BulkInsertResult rdata = new BulkInsertResult(data, true);
+
+            return rdata;
+        }
+
+        protected override DataChangeListenResult OnDataChangeListenRequest(string requestAppID)
+        {
+            Log.Error(LogTag, "provider !!! @@@@! DataChangeListenRequestResult " + requestAppID);
+
+            return new DataChangeListenResult(ResultType.Success);
+        }
+
+        protected override InsertResult OnInsert(string query, Bundle insertData)
+        {
+            long rowId = 0;
+            bool result = true;
+            Log.Error(LogTag, "provider !!! @@@@! OnInsert " + query);
+
+            SendDataChange(ChangeType.Insert, insertData);
+
+            return new InsertResult(rowId, result);
+        }
+
+        protected override UpdateResult OnUpdate(string query, string where, Bundle updateData)
+        {
+            bool result = true;
+            Log.Error(LogTag, "provider !!! @@@@! OnUpdate " + query);
+
+            return new UpdateResult(result);
+        }
+
+        protected override DeleteResult OnDelete(string query, string where)
+        {
+            bool result = true;
+            Log.Error(LogTag, "provider !!! @@@@! OnDelete " + query);
+
+            return new DeleteResult(result);
+        }
+
+        protected override SelectResult OnSelect(string query, string where, string[] columList, int columnCount, string order, int pageNum, int countPerPage)
+        {
+
+            Log.Error(LogTag, "provider !!! @@@@! OnSelect ");
+
+            string[] name = new string[] {"str1", "str2", "str3", "str4"};
+            ColumnType[] type = new ColumnType[]
+            {
+                ColumnType.ColumnTypeInt,
+                ColumnType.ColumnTypeDouble,
+                ColumnType.ColumnTypeString,
+                ColumnType.ColumnTypeBlob
+            };
+            MatrixCursor mc = new MatrixCursor(name, type);
+            object[] value = new object[4];
+
+            int a = 10;
+            double b = 0.111;
+
+            byte[] _byte = new byte[] {50, 60, 70, 80, 90};
+            for (int i = 0; i &lt; 5; i++)
+            {
+                value[0] = a;
+                value[1] = b;
+                value[2] ="testvalue";
+                value[3] = _byte;
+                mc.AddRow(value);
+                a++;
+                b++;
+            }
+
+            return new SelectResult(mc, true);
+        }
+    }
+</pre>
+       </li>
+       <li>Create an instance of the <code>MyProvider</code> class, and start the provider functionality with the <code>Run()</code> method of the new instance:
+       <p></p>
+<pre class="prettyprint">
+    public class App
+    {
+        MyProvider _dp;
+
+        public App()
+        {
+            _dp = new MyProvider("Dictionary");
+            _dp.Run();
+</pre>
+       </li>
+       <li>To notify the consumer of data changes, use the <code>SendDataChange()</code> method:
+<pre class="prettyprint">
+            var b = new Bundle();
+            b.AddItem("test", "test123");
+
+            dp.SendDataChange(ChangeType.Delete, b);
+</pre>
+       </li>
+       <li>When no longer needed, stop the provider with the <code>Stop()</code> method:
+<pre class="prettyprint">
+            _dp.Stop();
+        }
+    }
+}
+</pre>
+       </li>
+</ol>
+
+
+<h2 id="map2">Managing a Consumer</h2>
+<p>In a consumer application, you must override the following abstract methods of the <a href="https://developer.tizen.org/dev-guide/csapi/classTizen_1_1Applications_1_1DataControl_1_1Consumer.html">Tizen.Applications.DataControl.Consumer</a> class for handling responses to SQL requests: <code>OnSelectResult()</code>, <code>OnInsertResult()</code>, <code>OnUpdateResult()</code>, and <code>OnDeleteResult()</code>.
+If you want to use Map-type data controls, you must override the <code>OnMapAddResult()</code>, <code>OnMapGetResult()</code>, <code>OnMapSetResult()</code>, and <code>OnMapRemoveResult()</code> methods. Optionally, you can override the <code>OnBulkInsertResult()</code>, <code>OnMapBulkAddResult()</code>, and <code>OnDataChangeListenResult()</code> methods as well. If you want to override the behavior for when the provider uses the <code>SendDataChange()</code> method of the <a href="https://developer.tizen.org/dev-guide/csapi/classTizen_1_1Applications_1_1DataControl_1_1Provider.html">Tizen.Applications.DataControl.Provider</a> class, override the <code>OnDataChange()</code> method.</p>
+
+<p>The applicable overridden method is called when a result is received from a provider.</p>
+
+<ol>
+       <li>Create a new <code>MyConsumer</code> class, which inherits the <code>Tizen.Applications.DataControl.Consumer</code> class, and implement the method overrides to react to the requests from the provider:
+<pre class="prettyprint">
+namespace XamarinConsumer
+{
+    public class MyConsumer : Consumer
+    {
+        private const string LogTag = "MyConsumer";
+
+        public MyConsumer(string providerId, string dataId) : base(providerId, dataId)
+        {
+        }
+
+        protected override void OnDataChangeListenResult(DataChangeListenResult result)
+        {
+            Log.Debug(LogTag, "OnDataChangeListenResult called");
+        }
+
+        protected override void OnDataChange(ChangeType type, Bundle data)
+        {
+            Log.Debug(LogTag, "OnDataChange called");
+        }
+
+        protected override void OnInsertResult(InsertResult result)
+        {
+            Log.Debug(LogTag, "OnInsertResult called");
+        }
+
+        protected override void OnSelectResult(SelectResult result)
+        {
+            Log.Debug(LogTag, "OnSelectResult called");
+        }
+
+        protected override void OnUpdateResult(UpdateResult result)
+        {
+            Log.Debug(LogTag, "OnUpdateResult called");
+        }
+
+        protected override void OnDeleteResult(DeleteResult result)
+        {
+            Log.Debug(LogTag, "OnDeleteResult called");
+        }
+    }
+
+    public class App
+    {
+        private const string _dataId = "ProviderTest";
+        private const string _providerId = "http://Tizen.DataControl.Tests.dll.com/datacontrol/provider/Tizen.DataControl.Tests.dll";
+        MyConsumer dc;
+        public App()
+        {
+            dc = new MyConsumer(_providerId, _dataId);
+        }
+    }
+}
+</pre>
+       </li>
+       <li id="consumer2">Implement the consumer application:
+       <ol type="a">
+       <li>In case of SQL-type data, the consumer sends requests for the insert, select, update, and delete operations to the provider, and receives the result as a response from the provider:
+<pre class="prettyprint">
+public class App
+{
+    var b = new Bundle();
+    b.AddItem("test_insert", "test_insert");
+    dc.Insert(b);
+
+    var b_update = new Bundle();
+    b_update.AddItem("test_insert", "test_update");
+    dc.Update(b_update, "WHERE test_insert = 'test_insert'");
+
+    string[] columnList = new string[] {"test_insert"};
+    dc.Select(columnList, null, null);
+
+    dc.Delete("WHERE test = 'test_update'");
+</pre>
+       </li>
+       <li>In case of map-type data, the consumer sends requests for the add, set, get, and remove operations to the provider, and receives the result as a response from the provider:
+<pre class="prettyprint">
+    dc.MapAdd("key", "oldvalue");
+
+    dc.MapSet("key", "oldvalue", "newvalue");
+
+    dc.MapGet("key");
+
+    dc.MapRemove("key", "newvalue");
+</pre>
+       </li>
+       <li>In case of bulk data, the consumer sends a request to the provider by using the <code>BulkInsert()</code> method of the <code>Tizen.Applications.DataControl.Consumer</code> class for SQL-type data or the <code>MapBulkAdd()</code> method for map-type data:
+<pre class="prettyprint">
+    BulkData data = new BulkData();
+    var b = new Bundle();
+    b.AddItem("test", "test1");
+
+    var b2 = new Bundle();
+    b2.AddItem("test", "test2");
+
+    var b3 = new Bundle();
+    b3.AddItem("test", "test3");
+
+    data.Add(b);
+    data.Add(b2);
+    data.Add(b3);
+
+    dc.BulkInsert(data);
+
+    dc.MapBulkAdd(data);
+</pre>
+       </li>
+       <li>To receive data change notifications from the provider, the consumer uses the <code>DataChangeListen()</code> method of the <code>Tizen.Applications.DataControl.Consumer</code> class:
+<pre class="prettyprint">
+    dc.DataChangeListen();
+}
+</pre>
+       </li>
+</ol>
+</li>
+</ol>
+
+<h2 id="map3">Using a Matrix Cursor</h2>
+<p>If you use a consumer application for SQL-type data and you have a collection of data that is not in a database, you can use the <a href="https://developer.tizen.org/dev-guide/csapi/classTizen_1_1Applications_1_1DataControl_1_1MatrixCursor.html">Tizen.Applications.DataControl.MatrixCursor</a> class to create a cursor for the data:</p>
+
+<p>To create a matrix cursor, simply construct it with an array of column names:</p>
+<ul><li>Add one row at a time to the matrix by passing either an array of objects or an Iterable to the <code>AddRow()</code> method of the <code>Tizen.Applications.DataControl.MatrixCursor</code> class.</li>
+
+<li>Define column types for a matrix cursor by using the values of the <a href="https://developer.tizen.org/dev-guide/csapi/namespaceTizen_1_1Applications_1_1DataControl.html#a86c46eee9845cae84649d5b1dc4df6cc">Tizen.Applications.DataControl.ColumnType</a> enumeration.</li>
+</ul>
+
+<p>To use a matrix cursor:</p>
+
+<ol>
+       <li id="consumer3">Implement the provider application.
+       <p>If a consumer sends a select request to the provider, the <code>OnSelect()</code> method of the <a href="https://developer.tizen.org/dev-guide/csapi/classTizen_1_1Applications_1_1DataControl_1_1Provider.html">Tizen.Applications.DataControl.Provider</a> class is called, and the provider sends the results to the consumer as an instance of the  <a href="https://developer.tizen.org/dev-guide/csapi/classTizen_1_1Applications_1_1DataControl_1_1SelectResult.html">Tizen.Applications.DataControl.SelectResult</a> class:</p>
+<pre class="prettyprint">
+public class MyProvider : Provider
+{
+    protected override SelectResult OnSelect(string query, string where, string[] columList, int columnCount, string order, int pageNum, int countPerPage)
+    {
+        Log.Error(LogTag, "provider !!! @@@@! OnSelect ");
+
+        string[] name = new string[] {"str1", "str2", "str3", "str4"};
+        ColumnType[] type = new ColumnType[]
+        {
+            ColumnType.ColumnTypeInt,
+            ColumnType.ColumnTypeDouble,
+            ColumnType.ColumnTypeString,
+            ColumnType.ColumnTypeBlob
+        };
+        MatrixCursor mc = new MatrixCursor(name, type);
+        object[] value = new object[4];
+
+        int a = 10;
+        double b = 0.111;
+
+        byte[] _byte = new byte[] {50, 60, 70, 80, 90};
+        for (int i = 0; i &lt; 5; i++)
+        {
+            value[0] = a;
+            value[1] = b;
+            value[2] ="testvalue";
+            value[3] = _byte;
+            mc.AddRow(value);
+            a++;
+            b++;
+        }
+
+        return new SelectResult(mc, true);
+    }
+}
+</pre>
+       </li>
+       <li id="provider3">Implement the consumer application.
+       <p>The consumer sends a select request to the provider. When the provider responds by sending a <code>Tizen.Applications.DataControl.SelectResult</code> instance, the <code>OnSelectResult()</code> method of the <a href="https://developer.tizen.org/dev-guide/csapi/classTizen_1_1Applications_1_1DataControl_1_1Consumer.html">Tizen.Applications.DataControl.Consumer</a> class is called:</p>
+<pre class="prettyprint">
+public class MyConsumer : Consumer
+{
+    protected override void OnSelectResult(SelectResult result)
+    {
+        Log.Debug(LogTag, "OnSelectResult called");
+
+        var data = result.ResultCursor;
+
+        int int_val = data.GetIntValue(0)
+        double double_val = data.GetDoubleValue(1);
+        string str = data.GetStringValue(2);
+    }
+}
+
+public class App
+{
+    private const string _dataId = "ProviderTest";
+    private const string _providerId = "http://Tizen.DataControl.Tests.dll.com/datacontrol/provider/Tizen.DataControl.Tests.dll";
+
+    MyConsumer dc;
+
+    public App()
+    {
+        dc = new MyConsumer(_providerId, _dataId);
+
+        string[] columnList = new string[] {"test"};
+        dc.Select(columnList, null, null);
+    }
+}
+</pre>
+       </li>
+</ol>
+
+<h2 id="export">Data Control Export</h2>
+<p>You can export the provider functionalities of your Tizen .NET service application in the application project settings in Visual Studio. The provider ID, type, and accessibility must be specified for the available data control.</p>
+<p align="center"><strong>Figure: Exporting data control</strong></p>
+<p align="center"><img alt="Exporting data control" src="../images/exporting_datacontrol_cs.png"/></p>
+<p id="data">To help other applications to use the exported data controls, the data model must be open to the public. The data model consists of the following data:</p>
+<ul>
+       <li>Provider ID
+               <ul>
+                       <li>It is used for identifying the data control provider.</li>
+                       <li>It must be unique and use a fully-qualified domain name.</li>
+                       <li>It must consist of alphanumeric characters separated with the period (".") character, and it must start with a letter.</li>
+                       <li>Platform-defined data control provider is defined in the <code>http://tizen.org/datacontrol/provider/&lt;application name&gt;</code> format.</li>
+                       <li>User-defined data control provider is defined in the <code>http://&lt;vendor.com&gt;/datacontrol/provider/&lt;application name&gt;</code> format.</li>
+               </ul>
+       </li>
+       <li>Data ID
+               <ul>
+                       <li>It is used for identifying data (usually a database table name or a registry section name) exported by the data control provider.</li>
+                       <li>It must be unique in the data control provider and it is given as a string of 1 or more components, separated by a slash ("/") character.</li>
+               </ul>
+       </li>
+       <li>Type
+               <ul>
+                       <li>You can use Tizen .NET applications that provide their own data structure table and implement the SQL-type data control provider using a database file.</li>
+                       <li>You can use Tizen .NET applications that provide their own key-value pairs data structure map and implement the map-type data control provider using registry file or collection map classes.</li>
+               </ul>
+       </li>
+       <li>Data schema
+               <ul>
+                       <li>SQL-type data control exports column names and types of the data structure table.</li>
+                       <li>Map-type data control exports key names and types of the data structure map.</li>
+               </ul>
+       </li>
+       <li>Data accessibility
+               <ul>
+                       <li>You can control read and write access from other applications by defining data control accessibility.</li>
+               </ul>
+       </li>
+       <li>Trusted
+               <ul>
+                       <li>You can allow access from other applications signed with the same certificate by setting the trusted status for the data control.</li>
+               </ul>
+       </li>
+       <li>Privileges
+               <ul>
+                       <li>Your provider application can restrict access to applications that have specific privileges defined.</li>
+               </ul>
+       </li>
+</ul>
+
+<p>The following table contains an example data model of a data control provider.</p>
+<p align="center" class="Table"><strong>Table: Data model example of a data control provider</strong></p>
+<table>
+<tbody>
+<tr>
+       <th>Data control type</th>
+       <th>Data control provider ID</th>
+       <th>Data control data ID</th>
+       <th colspan="2">Data schema</th>
+       <th>Data accessibility</th>
+       <th>Trusted</th>
+       <th>Privileges</th>
+</tr>
+<tr>
+       <td>SQL</td>
+       <td><code>http://&lt;vendor.com&gt;/datacontrol/provider/sample</code></td>
+       <td><code>data1</code></td>
+       <td><code>column1</code>
+       <p>(Type: Integer)</p> </td>
+       <td><code>column2</code>
+       <p>(Type: String)</p> </td>
+       <td>Read-Only</td>
+       <td>True</td>
+       <td><code>http://tizen.org/privilege/application.admin</code></td>
+</tr>
+<tr>
+       <td>Map</td>
+       <td><code>http://&lt;vendor.com&gt;/datacontrol/provider/sample2</code></td>
+       <td><code>data2</code></td>
+       <td><code>key1</code>
+       <p>(Type: String)</p> </td>
+       <td><code>key2</code>
+       <p>(Type: String)</p> </td>
+       <td>Read-Write</td>
+       <td>False</td>
+       <td><code>http://tizen.org/privilege/appmanager.launch</code></td>
+</tr>
+</tbody>
+</table>
+
+
+<script type="text/javascript" src="../scripts/jquery.zclip.min.js"></script>
+<script type="text/javascript" src="../scripts/showhide.js"></script>
+
+</div></div></div>
+
+<a class="top sms" href="#"><img src="../images/btn_top.gif" alt="Go to top" /></a>
+
+<div id="footer">
+<p class="footer">Except as noted, this content - excluding the Code Examples - is licensed under <a href="http://creativecommons.org/licenses/by/3.0/legalcode" target="_blank">Creative Commons Attribution 3.0</a> and all of the Code Examples contained herein are licensed under <a href="https://www.tizen.org/bsd-3-clause-license" target="_blank">BSD-3-Clause</a>.<br/>For details, see the <a href="https://www.tizen.org/content-license" target="_blank">Content License</a>.</p>
+</div>
+
+<script type="text/javascript">
+var _gaq = _gaq || [];
+_gaq.push(['_setAccount', 'UA-25976949-1']);
+_gaq.push(['_trackPageview']);
+(function() {
+var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+})();
+</script>
+
+</body>
+</html>
diff --git a/org.tizen.guides/html/images/exporting_datacontrol_cs.png b/org.tizen.guides/html/images/exporting_datacontrol_cs.png
new file mode 100755 (executable)
index 0000000..b2c29a3
Binary files /dev/null and b/org.tizen.guides/html/images/exporting_datacontrol_cs.png differ