[screen mirroring] Modify the description for handling error.
authorSangkyu Park <sk1122.park@samsung.com>
Tue, 9 Jun 2015 01:16:40 +0000 (10:16 +0900)
committerSangkyu Park <sk1122.park@samsung.com>
Tue, 9 Jun 2015 01:16:42 +0000 (10:16 +0900)
2. Remove the description about mobile, the api supports various devices.

Change-Id: I6af1ed0e47899d94b5607968db3e6a081a70fc5b
Signed-off-by: Sangkyu Park <sk1122.park@samsung.com>
org.tizen.tutorials/html/native/multimedia/screen_mirroring_tutorial_n.htm [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index f284135..c70084c
@@ -68,7 +68,7 @@
 
 <p>To initialize the screen mirroring sink:</p>
 
-<ol><li><p>To use the functions and data types of the Screen Mirroring Sink API (in <a href="../../../../org.tizen.native.mobile.apireference/group__CAPI__MEDIA__SCMIRRORING_SINK__MODULE.html">mobile</a> and <a href="../../../../org.tizen.native.wearable.apireference/group__CAPI__MEDIA__SCMIRRORING_SINK__MODULE.html">mobile</a> applications), include the <span style="font-family: Courier New,Courier,monospace">&lt;scmirroring_type.h&gt;</span> and <span style="font-family: Courier New,Courier,monospace">&lt;scmirroring_sink.h&gt;</span> header files in your application:</p>
+<ol><li><p>To use the functions and data types of the Screen Mirroring Sink API, include the <span style="font-family: Courier New,Courier,monospace">&lt;scmirroring_type.h&gt;</span> and <span style="font-family: Courier New,Courier,monospace">&lt;scmirroring_sink.h&gt;</span> header files in your application:</p>
 <pre class="prettyprint">
 #include &lt;scmirroring_type.h&gt;
 #include &lt;scmirroring_sink.h&gt;
@@ -272,12 +272,21 @@ static int destroy_scmirroring_sink()
 
 <p>To handle screen mirroring exceptions:</p>
 
-<p>If the state callback function returns the <span style="font-family: Courier New,Courier,monospace">SCMIRRORING_STATE_DISCONNECTED</span> state, <a href="#release">release the screen mirroring sink</a>. The situation is caused by the source device as it disconnects the session, or the screen mirroring sink has internal problem.</p>
+<p>If the state callback function returns the error or the <span style="font-family: Courier New,Courier,monospace">SCMIRRORING_STATE_DISCONNECTED</span> state, <a href="#release">release the screen mirroring sink</a>. The situation is caused by the source device as it disconnects the session, or the screen mirroring sink has internal problem.</p>
  <pre class="prettyprint">
 static void scmirroring_state_callback(scmirroring_error_e error_code, scmirroring_state_e state, void *user_data)
 {
 &nbsp;&nbsp;&nbsp;int ret;
 &nbsp;&nbsp;&nbsp;dlog_print(DLOG_ERROR, LOG_TAG, &quot;Received Callback error code[%d], state[%d]&quot;, error_code, state);
+&nbsp;&nbsp;&nbsp;if(error_code != SCMIRRORING_ERROR_NONE)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ret = destroy_scmirroring_sink();  // see <a href="#release">Releasing Resources</a>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if(ret != TRUE)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dlog_print(DLOG_ERROR, LOG_TAG, " destroy_scmirroring_sink  fail");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;}
 
 &nbsp;&nbsp;&nbsp;switch (state)
 &nbsp;&nbsp;&nbsp;{