[Tutorial][messaging] Modify push tutorial : remove LOGI, LOGD, internal APIs
authorHaJun, Sung <hajun.sung@samsung.com>
Tue, 4 Aug 2015 02:06:50 +0000 (11:06 +0900)
committerHaJun, Sung <hajun.sung@samsung.com>
Tue, 4 Aug 2015 02:06:50 +0000 (11:06 +0900)
Change-Id: I71b8664465ef3d2cc8ef7fe2c0549d9b3e45518d
Signed-off-by: HaJun, Sung <hajun.sung@samsung.com>
org.tizen.tutorials/html/native/messaging/push_tutorial_n.htm

index 89b2d09..b4950bf 100644 (file)
@@ -207,7 +207,7 @@ static bool app_create(void *data)
 &nbsp;&nbsp;&nbsp;if (ret != PUSH_SERVICE_ERROR_NONE) 
 &nbsp;&nbsp;&nbsp;{
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// Your implementation here
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;LOGI(&quot;push_service_connect() Failed&quot;);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dlog_print(DLOG_INFO, LOG_TAG, &quot;push_service_connect() Failed&quot;);
 &nbsp;&nbsp;&nbsp;}
 
 &nbsp;&nbsp;&nbsp;return true;
@@ -254,22 +254,22 @@ static void _state_cb(push_service_state_e state, const char *err, void *user_da
 &nbsp;&nbsp;&nbsp;switch (state)       
 &nbsp;&nbsp;&nbsp;{
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case PUSH_SERVICE_STATE_UNREGISTERED:
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;LOGI(&quot;Arrived at STATE_UNREGISTERED&quot;);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dlog_print(DLOG_INFO, LOG_TAG, &quot;Arrived at STATE_UNREGISTERED&quot;);
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_on_state_unregistered(user_data);
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;
 
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case PUSH_SERVICE_STATE_REGISTERED:
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;LOGI(&quot;Arrived at STATE_REGISTERED&quot;);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dlog_print(DLOG_INFO, LOG_TAG, &quot;Arrived at STATE_REGISTERED&quot;);
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_on_state_registered(user_data);
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;
 
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case PUSH_SERVICE_STATE_ERROR:
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;LOGI(&quot;Arrived at STATE_ERROR&quot;);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dlog_print(DLOG_INFO, LOG_TAG, &quot;Arrived at STATE_ERROR&quot;);
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_on_state_error(err, user_data);
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;
 
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;default:
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;LOGI(&quot;Unknown State&quot;);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dlog_print(DLOG_INFO, LOG_TAG, &quot;Unknown State&quot;);
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;
 &nbsp;&nbsp;&nbsp;}
 }
@@ -306,9 +306,9 @@ static void _on_state_unregistered(void *user_data)
 static void _result_cb(push_service_result_e result, const char *msg, void *user_data) 
 {
 &nbsp;&nbsp;&nbsp;if (result == PUSH_SERVICE_RESULT_SUCCESS)
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;LOGI(&quot;Registration request is approved.&quot;);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dlog_print(DLOG_INFO, LOG_TAG, &quot;Registration request is approved.&quot;);
 &nbsp;&nbsp;&nbsp;else
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;LOGE(&quot;Registration ERROR [%s]&quot;, msg);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dlog_print(DLOG_ERROR, LOG_TAG, &quot;Registration ERROR [%s]&quot;, msg);
 
 &nbsp;&nbsp;&nbsp;return;
 }
@@ -345,7 +345,7 @@ static void _on_state_registered(void *user_data)
 &nbsp;&nbsp;&nbsp;ret = push_service_get_registration_id(push_conn, &amp;reg_id);
 &nbsp;&nbsp;&nbsp;if (ret != PUSH_SERVICE_ERROR_NONE)  
 &nbsp;&nbsp;&nbsp;{
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;LOGE(&quot;ERROR [%d]: push_service_get_registration_id()&quot;, ret);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dlog_print(DLOG_ERROR, LOG_TAG, &quot;ERROR [%d]: push_service_get_registration_id()&quot;, ret);
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return;
 &nbsp;&nbsp;&nbsp;}
 
@@ -775,7 +775,7 @@ static void _noti_cb(push_service_notification_h noti, void *user_data)
 }
 </pre>
 
-<p>When the <span style="font-family: Courier New,Courier,monospace;">_noti_cb()</span> function is called, obtain the notification through the first parameter. The second parameter is the pointer to the user data. You can retrieve the app data, message, and time stamp from the handle using the <span style="font-family: Courier New,Courier,monospace;">push_get_notification_data()</span>, <span style="font-family: Courier New,Courier,monospace;">push_get_notification_message()</span>, and <span style="font-family: Courier New,Courier,monospace;">push_get_notification_time()</span> functions respectively. Before exiting the function, free the data. However, do not free <span style="font-family: Courier New,Courier,monospace;">noti</span> in the notification callback function. It is freed automatically right after this callback function.</p>
+<p>When the <span style="font-family: Courier New,Courier,monospace;">_noti_cb()</span> function is called, obtain the notification through the first parameter. The second parameter is the pointer to the user data. You can retrieve the app data, message, and time stamp from the handle using the <span style="font-family: Courier New,Courier,monospace;">push_service_get_notification_data()</span>, <span style="font-family: Courier New,Courier,monospace;">push_service_get_notification_message()</span>, and <span style="font-family: Courier New,Courier,monospace;">push_service_get_notification_time()</span> functions respectively. Before exiting the function, free the data. However, do not free <span style="font-family: Courier New,Courier,monospace;">noti</span> in the notification callback function. It is freed automatically right after this callback function.</p>
 </li>
 
 <li>Receive notifications when the application is not running.
@@ -888,4 +888,4 @@ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga
 </script>
 
  </body>
-</html>
\ No newline at end of file
+</html>