[Push] update latest spec - remove type of PushMessage 32/104232/1
authortaekeun.kang <taekeun.kang@samsung.com>
Tue, 13 Dec 2016 01:27:24 +0000 (10:27 +0900)
committertaekeun.kang <taekeun.kang@samsung.com>
Tue, 13 Dec 2016 01:27:24 +0000 (10:27 +0900)
Change-Id: I9ebe81c1764cd6a2b6ae0033e44474623d6de36f
Signed-off-by: taekeun.kang <taekeun.kang@samsung.com>
org.tizen.web.apireference/html/device_api/mobile/tizen/push.html
org.tizen.web.apireference/html/device_api/wearable/tizen/push.html

index 62b5f3d..2a60013 100644 (file)
@@ -1113,8 +1113,6 @@ catch (err)
         readonly attribute DOMString sessionInfo;
 
         readonly attribute DOMString requestId;
-
-        readonly attribute long type;
     };</pre>
 <p><span class="version">
             Since: </span>
@@ -1197,16 +1195,6 @@ This data is the message that the sender wants to send and its length must be le
             Since: </span>
  3.0
             </p>
-</li>
-<li class="attribute" id="PushMessage::type">
-<span class="attrName"><span class="readonly">                readonly
-</span><span class="type">long </span><span class="name">type</span></span><div class="brief">
- The type value assigned by the sender.
-            </div>
-<p><span class="version">
-            Since: </span>
- 3.0
-            </p>
 <div class="example">
 <span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
 /* Defines the connect success callback */
@@ -1219,7 +1207,6 @@ function notificationCallback(noti)
 &nbsp;&nbsp;&nbsp;console.log(' - message: ' + noti.message);
 &nbsp;&nbsp;&nbsp;console.log(' - session: ' + noti.sessionInfo);
 &nbsp;&nbsp;&nbsp;console.log(' - request ID: ' + noti.requestId);
-&nbsp;&nbsp;&nbsp;console.log(' - type: ' + noti.type);
 }
 
 /* Requests for push service connection */
@@ -1234,7 +1221,6 @@ tizen.push.connectService(notificationCallback);
   - message: alertMessage=Hi
   - session: 002002
   - request ID: 23
-  - type: 1
  </pre>
 </div>
 </li>
@@ -1452,8 +1438,6 @@ To guarantee that the push application runs on a device with the push feature, d
         readonly attribute DOMString sessionInfo;
 
         readonly attribute DOMString requestId;
-
-        readonly attribute long type;
     };
 
     [Callback=FunctionOnly, NoInterfaceObject]
index 26aecfe..e7c2ea4 100755 (executable)
  The Push API provides functionality for receiving push notifications
 from the Tizen push server.
 The push service is a client daemon that maintains a permanent connection
-between your device and the Tizen push server in order to process your registration
-and deregistration requests and deliver push notifications to applications on a device.
+between your device and the Tizen push server. Connection with push service is used to deliver push notifications
+to the application, and process the registration and deregistration requests.
         </div>
 <div class="description">
         <p>
-If the application is connected, the push service passes the notification data over
-the connection. Otherwise, the push service posts a UI notification with the data.
-It will be delivered when a user launches the application by selecting the posting.
-        </p>
-        <p>
 To receive push notifications, follow the steps below:
         </p>
         <ul>
           <li>
-Get administrative permission for an application on your device          </li>
-          <li>
-Register the application          </li>
+Connecting to the push service          </li>
           <li>
-Connect to the push service          </li>
+Registering your application, if the application has not been registered yet          </li>
           <li>
-Get notification data          </li>
+Getting notification data          </li>
         </ul>
         <p>
-To use Push features, you must <a href="https://developer.tizen.org/development/tutorials/native-application/messaging/push#registration">register to the Push service</a>.
+For more information on the Push features, see <a href="https://developer.tizen.org/development/tutorials/web-application/tizen-features/messaging/push#Registering">Push Guide</a>.
         </p>
         <p>
-For more information on the Push features, see <a href="https://developer.tizen.org/development/guides/web-application/tizen-features/messaging/push">Push Guide</a>.
+To use Push features the application needs the permission to access the Tizen Push servers.
         </p>
+        <p>
+<b>Service Limitation:</b>        </p>
+        <ul>
+          <li>
+Size of a push message is limited: <em>alertMessage</em> up to 127 bytes, and <em>appData</em> (payload data) less than 1 KB.          </li>
+          <li>
+Push service does not guarantee delivery and order of push messages.          </li>
+        </ul>
        </div>
 <p><span class="version">
             Since: </span>
@@ -48,8 +49,14 @@ For more information on the Push features, see <a href="https://developer.tizen.
         </p>
 <h2>Table of Contents</h2>
 <ul class="toc">
-<li>1. <a href="#typedefs-section">Type Definitions</a><ul class="toc"><li>1.1. <a href="#PushRegistrationId">PushRegistrationId</a>
-</li></ul>
+<li>1. <a href="#typedefs-section">Type Definitions</a><ul class="toc">
+<li>
+                    1.1. <a href="#PushRegistrationId">PushRegistrationId</a>
+</li>
+<li>
+                    1.2. <a href="#PushRegistrationState">PushRegistrationState</a>
+</li>
+</ul>
 </li>
 <li>2. <a href="#interfaces-section">Interfaces</a><ul class="toc">
 <li>2.1. <a href="#PushManagerObject">PushManagerObject</a>
@@ -60,7 +67,9 @@ For more information on the Push features, see <a href="https://developer.tizen.
 </li>
 <li>2.4. <a href="#PushRegisterSuccessCallback">PushRegisterSuccessCallback</a>
 </li>
-<li>2.5. <a href="#PushNotificationCallback">PushNotificationCallback</a>
+<li>2.5. <a href="#PushRegistrationStateChangeCallback">PushRegistrationStateChangeCallback</a>
+</li>
+<li>2.6. <a href="#PushNotificationCallback">PushNotificationCallback</a>
 </li>
 </ul>
 </li>
@@ -88,8 +97,10 @@ For more information on the Push features, see <a href="https://developer.tizen.
 <div>void <a href="#PushManager::register">register</a> (<a href="#PushRegisterSuccessCallback">PushRegisterSuccessCallback</a> successCallback, optional <a href="tizen.html#ErrorCallback">ErrorCallback</a>? errorCallback)</div>
 <div class="deprecated">void <a href="#PushManager::unregisterService">unregisterService</a> (optional <a href="tizen.html#SuccessCallback">SuccessCallback</a>? successCallback, optional <a href="tizen.html#ErrorCallback">ErrorCallback</a>? errorCallback)</div>
 <div>void <a href="#PushManager::unregister">unregister</a> (optional <a href="tizen.html#SuccessCallback">SuccessCallback</a>? successCallback, optional <a href="tizen.html#ErrorCallback">ErrorCallback</a>? errorCallback)</div>
-<div>void <a href="#PushManager::connectService">connectService</a> (<a href="#PushNotificationCallback">PushNotificationCallback</a> notificationCallback)</div>
-<div>void <a href="#PushManager::disconnectService">disconnectService</a> ()</div>
+<div class="deprecated">void <a href="#PushManager::connectService">connectService</a> (<a href="#PushNotificationCallback">PushNotificationCallback</a> notificationCallback)</div>
+<div>void <a href="#PushManager::connect">connect</a> (<a href="#PushRegistrationStateChangeCallback">PushRegistrationStateChangeCallback</a> stateChangeCallback, <a href="#PushNotificationCallback">PushNotificationCallback</a> notificationCallback, optional <a href="tizen.html#ErrorCallback">ErrorCallback</a>? errorCallback)</div>
+<div class="deprecated">void <a href="#PushManager::disconnectService">disconnectService</a> ()</div>
+<div>void <a href="#PushManager::disconnect">disconnect</a> ()</div>
 <div>
 <a href="#PushRegistrationId">PushRegistrationId</a> <a href="#PushManager::getRegistrationId">getRegistrationId</a> ()</div>
 <div>void <a href="#PushManager::getUnreadNotifications">getUnreadNotifications</a> ()</div>
@@ -106,6 +117,10 @@ For more information on the Push features, see <a href="https://developer.tizen.
 <td><div>void <a href="#PushRegisterSuccessCallback::onsuccess">onsuccess</a> (<a href="#PushRegistrationId">PushRegistrationId</a> id)</div></td>
 </tr>
 <tr>
+<td><a href="#PushRegistrationStateChangeCallback">PushRegistrationStateChangeCallback</a></td>
+<td><div>void <a href="#PushRegistrationStateChangeCallback::onsuccess">onsuccess</a> (<a href="#PushRegistrationState">PushRegistrationState</a> state)</div></td>
+</tr>
+<tr>
 <td><a href="#PushNotificationCallback">PushNotificationCallback</a></td>
 <td><div>void <a href="#PushNotificationCallback::onsuccess">onsuccess</a> (<a href="#PushMessage">PushMessage</a> message)</div></td>
 </tr>
@@ -124,6 +139,25 @@ For more information on the Push features, see <a href="https://developer.tizen.
  2.3.1
           </p>
 </div>
+<div class="enum" id="PushRegistrationState">
+<a class="backward-compatibility-anchor" name="::Push::PushRegistrationState"></a><h3>1.2. PushRegistrationState</h3>
+<div class="brief">
+ A push registration state.
+          </div>
+<pre class="webidl prettyprint">    enum PushRegistrationState {"REGISTERED", "UNREGISTERED"};</pre>
+<p><span class="version">
+            Since: </span>
+ 3.0
+          </p>
+<div class="description">
+          <ul>
+            <li>
+REGISTERED - The application is registered to the push server.            </li>
+            <li>
+UNREGISTERED - The application is not registered to the push server.            </li>
+          </ul>
+         </div>
+</div>
 </div>
 <div class="interfaces" id="interfaces-section">
 <h2>2. Interfaces</h2>
@@ -161,12 +195,17 @@ The <em>tizen.push </em>object allows access to the functionality of the Push AP
                     optional <a href="tizen.html#ErrorCallback">ErrorCallback</a>? errorCallback) raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
 
       void unregister(optional <a href="tizen.html#SuccessCallback">SuccessCallback</a>? successCallback,
-                    optional <a href="tizen.html#ErrorCallback">ErrorCallback</a>? errorCallback) raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
+                      optional <a href="tizen.html#ErrorCallback">ErrorCallback</a>? errorCallback) raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
 
       void connectService(<a href="#PushNotificationCallback">PushNotificationCallback</a> notificationCallback) raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
 
+      void connect(<a href="#PushRegistrationStateChangeCallback">PushRegistrationStateChangeCallback</a> stateChangeCallback,
+                   <a href="#PushNotificationCallback">PushNotificationCallback</a> notificationCallback, optional <a href="tizen.html#ErrorCallback">ErrorCallback</a>? errorCallback) raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
+
       void disconnectService() raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
 
+      void disconnect() raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
+
       <a href="#PushRegistrationId">PushRegistrationId</a> getRegistrationId() raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
 
       void getUnreadNotifications() raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
@@ -216,7 +255,7 @@ UnknownError - If any other error occurs.              </li>
  http://tizen.org/privilege/push
             </p>
 <p><span class="remark"> Remark : </span>
- In order to use the push messaging service, see the native <a href="https://developer.tizen.org/development/guides/native-application/messaging/push">Push Messaging Guide</a>.
+ In order to use the push messaging service, see <a href="https://developer.tizen.org/development/guides/native-application/messaging/push">Push Guide</a>.
             </p>
 <div class="parameters">
 <p><span class="param">Parameters:</span></p>
@@ -263,7 +302,7 @@ var service = new tizen.ApplicationControl("http://tizen.org/appcontrol/operatio
 /* Defines the error callback */
 function errorCallback(response)
 {
-&nbsp;&nbsp;&nbsp;console.log('The following error occurred: ' +  response.name);
+&nbsp;&nbsp;&nbsp;console.log('The following error occurred: ' + response.name);
 }
 
 /* Defines the registration success callback */
@@ -296,9 +335,16 @@ The <em>ErrorCallback()</em> is launched with these error types:
             </p>
             <ul>
               <li>
+TimeoutError - If the operation timed out.              </li>
+              <li>
 AbortError - If the operation cannot be finished properly.              </li>
             </ul>
            </div>
+<div class="description">
+            <p>
+The <em>connect()</em> method must be called before calling the <em>register()</em> method.
+            </p>
+           </div>
 <p><span class="privilegelevel">
             Privilege level: </span>
  public
@@ -307,16 +353,19 @@ AbortError - If the operation cannot be finished properly.              </li>
             Privilege: </span>
  http://tizen.org/privilege/push
             </p>
+<p><span class="remark"> Remark : </span>
+ In order to use the push messaging service, see <a href="https://developer.tizen.org/development/guides/native-application/messaging/push">Push Guide</a>.
+            </p>
 <div class="parameters">
 <p><span class="param">Parameters:</span></p>
 <ul>
           <li class="param">
 <span class="name">successCallback</span>:
- The method to be called when the registration request succeeds.
+ The callback to be called when the registration request succeeds.
                 </li>
           <li class="param">
 <span class="name">errorCallback</span><span class="optional"> [optional]</span><span class="optional"> [nullable]</span>:
- The method to be called when the registration request fails.
+ The callback to be called when the registration request fails.
                 </li>
         </ul>
 </div>
@@ -329,6 +378,12 @@ AbortError - If the operation cannot be finished properly.              </li>
 <li class="list"><p>
  with error type SecurityError, if the application does not have the privilege to call this method.
                 </p></li>
+<li class="list"><p>
+ with error type InvalidStateError, if the application is not connected to the push service.
+                </p></li>
+<li class="list"><p>
+ with error type AbortError, if the operation cannot be finished properly.
+                </p></li>
 </ul>
 </li></ul>
         </div>
@@ -337,7 +392,7 @@ AbortError - If the operation cannot be finished properly.              </li>
 /* Defines the error callback */
 function errorCallback(response)
 {
-&nbsp;&nbsp;&nbsp;console.log("The following error occurred: " +  response.name);
+&nbsp;&nbsp;&nbsp;console.log("The following error occurred: " + response.name);
 }
 
 /* Defines the registration success callback */
@@ -346,12 +401,32 @@ function registerSuccessCallback(id)
 &nbsp;&nbsp;&nbsp;console.log("Registration succeeded with id: " + id);
 }
 
-/* Requests application registration */
-tizen.push.register(registerSuccessCallback, errorCallback);
+/* Defines the state change callback */
+function stateChangeCallback(state)
+{
+&nbsp;&nbsp;&nbsp;console.log("The state is changed to: " + state);
+
+&nbsp;&nbsp;&nbsp;if (state == "UNREGISTERED")
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Requests application registration */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tizen.push.register(registerSuccessCallback, errorCallback);
+&nbsp;&nbsp;&nbsp;}
+}
+
+/* Defines the notification callback */
+function notificationCallback(notification)
+{
+&nbsp;&nbsp;&nbsp;console.log("A notification arrives.");
+}
+
+/* Connects to push service */
+tizen.push.connect(stateChangeCallback, notificationCallback, errorCallback);
 </pre>
 </div>
 <div class="output">
-<span class="title"><p>Output example:</p></span><pre> Registration succeeded with id: 04a150867a50f48cb79695ac732cbe550b4a6782fffd23cbc14ba8dd5c5ab0025dad29a3e4ef5de8849b95b726bea7a6395c
+<span class="title"><p>Output example:</p></span><pre> The state is changed to: UNREGISTERED
+ Registration succeeded with id: 04a150867a50f48cb79695ac732cbe550b4a6782fffd23cbc14ba8dd5c5ab0025dad29a3e4ef5de8849b95b726bea7a6395c
+ The state is changed to: REGISTERED
  </pre>
 </div>
 </dd>
@@ -424,7 +499,7 @@ UnknownError - If an unknown error occurs.              </li>
 /* Defines the error callback */
 function errorCallback(response)
 {
-&nbsp;&nbsp;&nbsp;console.log('The following error occurred: ' +  response.name);
+&nbsp;&nbsp;&nbsp;console.log('The following error occurred: ' + response.name);
 }
 
 /* Defines the unregistration success callback */
@@ -457,6 +532,8 @@ The <em>ErrorCallback()</em> is launched with these error types:
             </p>
             <ul>
               <li>
+TimeoutError - If the operation timed out.              </li>
+              <li>
 AbortError - If the operation cannot be finished properly.              </li>
             </ul>
            </div>
@@ -473,7 +550,7 @@ AbortError - If the operation cannot be finished properly.              </li>
 <ul>
           <li class="param">
 <span class="name">successCallback</span><span class="optional"> [optional]</span><span class="optional"> [nullable]</span>:
- The method to be called when the unregistration request succeeds.
+ The callback to be called when the unregistration request succeeds.
                 </li>
           <li class="param">
 <span class="name">errorCallback</span><span class="optional"> [optional]</span><span class="optional"> [nullable]</span>:
@@ -490,15 +567,23 @@ AbortError - If the operation cannot be finished properly.              </li>
 <li class="list"><p>
  with error type SecurityError, if the application does not have the privilege to call this method.
                 </p></li>
+<li class="list"><p>
+ with error type InvalidStateError, if the application is not connected to the push service.
+                </p></li>
+<li class="list"><p>
+ with error type AbortError, if the operation cannot be finished properly.
+                </p></li>
 </ul>
 </li></ul>
         </div>
 <div class="example">
 <span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Connection to push service should be established (with connect()) and application should be registered (with register()) before calling the code below */
+
 /* Defines the error callback */
 function errorCallback(response)
 {
-&nbsp;&nbsp;&nbsp;console.log("The following error occurred: " +  response.name);
+&nbsp;&nbsp;&nbsp;console.log("The following error occurred: " + response.name);
 }
 
 /* Defines the unregistration success callback */
@@ -516,13 +601,16 @@ tizen.push.unregister(unregisterSuccessCallback, errorCallback);
  </pre>
 </div>
 </dd>
-<dt class="method" id="PushManager::connectService">
+<dt class="deprecated method" id="PushManager::connectService">
 <a class="backward-compatibility-anchor" name="::Push::PushManager::connectService"></a><code><b><span class="methodName">connectService</span></b></code>
 </dt>
-<dd>
+<dd class="deprecated">
 <div class="brief">
  Connects to the push service and receives push notifications.
             </div>
+<p class="deprecated"><b>Deprecated.</b>
+ This function has been deprecated since 3.0. Use the <a href="push.html#PushManager::connect">connect()</a> function instead.
+            </p>
 <div class="synopsis"><pre class="signature prettyprint">void connectService(<a href="#PushNotificationCallback">PushNotificationCallback</a> notificationCallback);
              </pre></div>
 <p><span class="version">
@@ -539,7 +627,7 @@ tizen.push.unregister(unregisterSuccessCallback, errorCallback);
             </p>
 <p><span class="remark"> Remark : </span>
  If the application calling the <em>connectService()</em> method has not been registered to the Tizen push server,
-the <em>register()</em> method must be called before calling the <em>connectService()</em> method.
+the <em>registerService()</em> method must be called before calling the <em>connectService()</em> method.
             </p>
 <div class="parameters">
 <p><span class="param">Parameters:</span></p>
@@ -570,44 +658,142 @@ the <em>register()</em> method must be called before calling the <em>connectServ
         </div>
 <div class="example">
 <span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
-/* Defines the registration error callback */
+/* Defines the connect success callback */
+function notificationCallback(noti)
+{
+&nbsp;&nbsp;&nbsp;console.log("Notification received with alert message: " + noti.alertMessage);
+}
+
+/* Defines the data to be used when this process is launched by notification service */
+var service = new tizen.ApplicationControl("http://tizen.org/appcontrol/operation/push_test");
+
+/* Defines the error callback */
 function errorCallback(response)
 {
-&nbsp;&nbsp;&nbsp;console.log("The following error occurred: " +  response.name);
+&nbsp;&nbsp;&nbsp;console.log("The following error occurred: " + response.name);
 }
 
 /* Defines the registration success callback */
 function registerSuccessCallback(id)
 {
 &nbsp;&nbsp;&nbsp;console.log("Registration succeeded with id: " + id);
+
+&nbsp;&nbsp;&nbsp;/* Requests for push service connection */
+&nbsp;&nbsp;&nbsp;tizen.push.connectService(notificationCallback);
 }
 
-/* Requests application registration */
-tizen.push.register(registerSuccessCallback, errorCallback);
+/* Requests registration */
+tizen.push.registerService(service, registerSuccessCallback, errorCallback);
+</pre>
+</div>
+</dd>
+<dt class="method" id="PushManager::connect">
+<a class="backward-compatibility-anchor" name="::Push::PushManager::connect"></a><code><b><span class="methodName">connect</span></b></code>
+</dt>
+<dd>
+<div class="brief">
+ Connects to the push service and gets state change events and push notifications.
+            </div>
+<div class="synopsis"><pre class="signature prettyprint">void connect(<a href="#PushRegistrationStateChangeCallback">PushRegistrationStateChangeCallback</a> stateChangeCallback, <a href="#PushNotificationCallback">PushNotificationCallback</a> notificationCallback, optional <a href="tizen.html#ErrorCallback">ErrorCallback</a>? errorCallback);
+             </pre></div>
+<p><span class="version">
+            Since: </span>
+ 3.0
+            </p>
+<div class="description">
+            <p>
+The <em>ErrorCallback()</em> is launched with these error types:
+            </p>
+            <ul>
+              <li>
+AbortError - If the operation cannot be finished properly.              </li>
+            </ul>
+           </div>
+<p><span class="privilegelevel">
+            Privilege level: </span>
+ public
+            </p>
+<p><span class="privilege">
+            Privilege: </span>
+ http://tizen.org/privilege/push
+            </p>
+<div class="parameters">
+<p><span class="param">Parameters:</span></p>
+<ul>
+          <li class="param">
+<span class="name">stateChangeCallback</span>:
+ The callback to be called when the state of registration is changed. The callback would be called at least once,
+just after connection is established.
+                </li>
+          <li class="param">
+<span class="name">notificationCallback</span>:
+ The callback to be called when the notification message arrives.
+                </li>
+          <li class="param">
+<span class="name">errorCallback</span><span class="optional"> [optional]</span><span class="optional"> [nullable]</span>:
+ The callback to be called when the connect request fails.
+                </li>
+        </ul>
+</div>
+<div class="exceptionlist">
+<p><span class="except">Exceptions:</span></p>
+          <ul class="exception"><li>WebAPIException<ul>
+<li class="list"><p>
+ with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
+                </p></li>
+<li class="list"><p>
+ with error type SecurityError, if the application does not have the privilege to call this method.
+                </p></li>
+<li class="list"><p>
+ with error type AbortError, if the operation cannot be finished properly.
+                </p></li>
+</ul>
+</li></ul>
+        </div>
+<div class="example">
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Defines the state change callback */
+function stateChangeCallback(state)
+{
+&nbsp;&nbsp;&nbsp;console.log("The state is changed to: " + state);
+}
 
-/* Defines the connect success callback */
-function notificationCallback(noti)
+/* Defines the notification callback */
+function notificationCallback(notification)
 {
-&nbsp;&nbsp;&nbsp;console.log("Notification received with alert message: " + noti.alertMessage);
+&nbsp;&nbsp;&nbsp;console.log("A notification arrives.");
+}
+
+/* Defines the error callback */
+function errorCallback(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("The following error occurred: " + error.name);
 }
 
 /* Requests for push service connection */
-tizen.push.connectService(notificationCallback);
+tizen.push.connect(stateChangeCallback, notificationCallback, errorCallback);
 </pre>
 </div>
+<div class="output">
+<span class="title"><p>Output example:</p></span><pre> The state is changed to: UNREGISTERED
+ </pre>
+</div>
 </dd>
-<dt class="method" id="PushManager::disconnectService">
+<dt class="deprecated method" id="PushManager::disconnectService">
 <a class="backward-compatibility-anchor" name="::Push::PushManager::disconnectService"></a><code><b><span class="methodName">disconnectService</span></b></code>
 </dt>
-<dd>
+<dd class="deprecated">
 <div class="brief">
  Disconnects the push service and stops receiving push notifications.
             </div>
+<p class="deprecated"><b>Deprecated.</b>
+ This function has been deprecated since 3.0. Use the <a href="push.html#PushManager::disconnect">disconnect()</a> function instead.
+            </p>
 <div class="synopsis"><pre class="signature prettyprint">void disconnectService();
              </pre></div>
 <p><span class="version">
             Since: </span>
- 2.3.1
+ 2.1
             </p>
 <p><span class="privilegelevel">
             Privilege level: </span>
@@ -624,7 +810,7 @@ tizen.push.connectService(notificationCallback);
  with error type SecurityError, if the application does not have the privilege to call this method.
                 </p></li>
 <li class="list"><p>
- with error type UnknownError, if any other error occurs.
+ with error type AbortError, if the operation cannot be finished properly.
                 </p></li>
 </ul>
 </li></ul>
@@ -636,6 +822,46 @@ tizen.push.disconnectService();
 </pre>
 </div>
 </dd>
+<dt class="method" id="PushManager::disconnect">
+<a class="backward-compatibility-anchor" name="::Push::PushManager::disconnect"></a><code><b><span class="methodName">disconnect</span></b></code>
+</dt>
+<dd>
+<div class="brief">
+ Disconnects the push service and stops receiving push notifications.
+            </div>
+<div class="synopsis"><pre class="signature prettyprint">void disconnect();
+             </pre></div>
+<p><span class="version">
+            Since: </span>
+ 3.0
+            </p>
+<p><span class="privilegelevel">
+            Privilege level: </span>
+ public
+            </p>
+<p><span class="privilege">
+            Privilege: </span>
+ http://tizen.org/privilege/push
+            </p>
+<div class="exceptionlist">
+<p><span class="except">Exceptions:</span></p>
+          <ul class="exception"><li>WebAPIException<ul>
+<li class="list"><p>
+ with error type SecurityError, if the application does not have the privilege to call this method.
+                </p></li>
+<li class="list"><p>
+ with error type UnknownError, if any other error occurs.
+                </p></li>
+</ul>
+</li></ul>
+        </div>
+<div class="example">
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Requests disconnection */
+tizen.push.disconnect();
+</pre>
+</div>
+</dd>
 <dt class="method" id="PushManager::getRegistrationId">
 <a class="backward-compatibility-anchor" name="::Push::PushManager::getRegistrationId"></a><code><b><span class="methodName">getRegistrationId</span></b></code>
 </dt>
@@ -682,6 +908,32 @@ if (registrationId != null)
 }
 </pre>
 </div>
+<div class="example">
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Defines the state change callback */
+function stateChangeCallback(state)
+{
+&nbsp;&nbsp;&nbsp;console.log("The state is changed to: " + state);
+
+&nbsp;&nbsp;&nbsp;var id = tizen.push.getRegisterationId();
+&nbsp;&nbsp;&nbsp;console.log("The registration ID: " + id);
+}
+
+/* Defines the notification callback */
+function notificationCallback(notification)
+{
+&nbsp;&nbsp;&nbsp;console.log("A notification arrives.");
+}
+
+/* Requests for push service connection */
+tizen.push.connect(stateChangeCallback, notificationCallback);
+</pre>
+</div>
+<div class="output">
+<span class="title"><p>Output example:</p></span><pre> The state is changed to: UNREGISTERED
+ The registration ID: 04a150867a50f48cb79695ac732cbe550b4a6782fffd23cbc14ba8dd5c5ab0025dad29a3e4ef5de8849b95b726bea7a6395c
+ </pre>
+</div>
 </dd>
 <dt class="method" id="PushManager::getUnreadNotifications">
 <a class="backward-compatibility-anchor" name="::Push::PushManager::getUnreadNotifications"></a><code><b><span class="methodName">getUnreadNotifications</span></b></code>
@@ -746,6 +998,34 @@ tizen.push.connectService(notificationCallback);
 tizen.push.getUnreadNotifications();
 </pre>
 </div>
+<div class="example">
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Defines the state change callback */
+function stateChangeCallback(state)
+{
+&nbsp;&nbsp;&nbsp;console.log("The state is changed to: " + state);
+
+&nbsp;&nbsp;&nbsp;if (state === "REGISTERED")
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Gets unread push notifications */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tizen.push.getUnreadNotifications();
+&nbsp;&nbsp;&nbsp;}
+}
+
+/* Defines the notification callback */
+function notificationCallback(notification)
+{
+&nbsp;&nbsp;&nbsp;console.log("A notification arrives.");
+}
+
+/* Requests for push service connection */
+tizen.push.connect(stateChangeCallback, notificationCallback);
+</pre>
+</div>
+<div class="output">
+<span class="title"><p>Output example:</p></span><pre> The state is changed to: REGISTERED
+ </pre>
+</div>
 </dd>
 <dt class="method" id="PushManager::getPushMessage">
 <a class="backward-compatibility-anchor" name="::Push::PushManager::getPushMessage"></a><code><b><span class="methodName">getPushMessage</span></b></code>
@@ -763,8 +1043,7 @@ tizen.push.getUnreadNotifications();
 <div class="description">
             <p>
 If the application is launched by the push service, the push service is connected when the application is launched.
-Therefore, you can get push messages without calling the <a href="push.html#Push%20Manager::register">register()</a> and
-<a href="push.html#Push%20Manager::connectService">connectService()</a> functions.
+Therefore, you can get push messages without calling the <a href="push.html#Push%20Manager::connect">connect()</a> function.
             </p>
             <p>
 If the application was not launched by the push service, this method returns <em>null</em>.
@@ -834,8 +1113,6 @@ catch (err)
         readonly attribute DOMString sessionInfo;
 
         readonly attribute DOMString requestId;
-
-        readonly attribute long type;
     };</pre>
 <p><span class="version">
             Since: </span>
@@ -918,16 +1195,6 @@ This data is the message that the sender wants to send and its length must be le
             Since: </span>
  3.0
             </p>
-</li>
-<li class="attribute" id="PushMessage::type">
-<span class="attrName"><span class="readonly">                readonly
-</span><span class="type">long </span><span class="name">type</span></span><div class="brief">
- The type value assigned by the sender.
-            </div>
-<p><span class="version">
-            Since: </span>
- 3.0
-            </p>
 <div class="example">
 <span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
 /* Defines the connect success callback */
@@ -940,7 +1207,6 @@ function notificationCallback(noti)
 &nbsp;&nbsp;&nbsp;console.log(' - message: ' + noti.message);
 &nbsp;&nbsp;&nbsp;console.log(' - session: ' + noti.sessionInfo);
 &nbsp;&nbsp;&nbsp;console.log(' - request ID: ' + noti.requestId);
-&nbsp;&nbsp;&nbsp;console.log(' - type: ' + noti.type);
 }
 
 /* Requests for push service connection */
@@ -950,11 +1216,11 @@ tizen.push.connectService(notificationCallback);
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre> Notification received on Thu Jan 01 2015 from: xyz.AnotherApp
  Details:
-  - data: example data
-  - alert message: Data from xyz.AnotherApp received
-  - session: example session info
+  - data: {id:asdf}
+  - alert message: Hi
+  - message: alertMessage=Hi
+  - session: 002002
   - request ID: 23
-  - type: 1
  </pre>
 </div>
 </li>
@@ -1008,8 +1274,56 @@ This success callback is invoked when a push service registration request is suc
 </dl>
 </div>
 </div>
+<div class="interface" id="PushRegistrationStateChangeCallback">
+<a class="backward-compatibility-anchor" name="::Push::PushRegistrationStateChangeCallback"></a><h3>2.5. PushRegistrationStateChangeCallback</h3>
+<div class="brief">
+ The PushRegistrationStateChangeCallback interface specifies the state change callback for the state change event.
+          </div>
+<pre class="webidl prettyprint">    [Callback=FunctionOnly, NoInterfaceObject]
+    interface PushRegistrationStateChangeCallback {
+        void onsuccess(<a href="#PushRegistrationState">PushRegistrationState</a> state);
+    };</pre>
+<p><span class="version">
+            Since: </span>
+ 3.0
+          </p>
+<div class="description">
+          <p>
+This state change callback is invoked when the state of registration is changed.
+Moreover PushRegistrationStateChangeCallback would be called at least once, just after connection is established.
+          </p>
+         </div>
+<div class="methods">
+<h4>Methods</h4>
+<dl>
+<dt class="method" id="PushRegistrationStateChangeCallback::onsuccess">
+<a class="backward-compatibility-anchor" name="::Push::PushRegistrationStateChangeCallback::onsuccess"></a><code><b><span class="methodName">onsuccess</span></b></code>
+</dt>
+<dd>
+<div class="brief">
+ Called when the state of push registration is changed.
+            </div>
+<div class="synopsis"><pre class="signature prettyprint">void onsuccess(<a href="#PushRegistrationState">PushRegistrationState</a> state);
+             </pre></div>
+<p><span class="version">
+            Since: </span>
+ 3.0
+            </p>
+<div class="parameters">
+<p><span class="param">Parameters:</span></p>
+<ul>
+          <li class="param">
+<span class="name">state</span>:
+ The state of push registration.
+                </li>
+        </ul>
+</div>
+</dd>
+</dl>
+</div>
+</div>
 <div class="interface" id="PushNotificationCallback">
-<a class="backward-compatibility-anchor" name="::Push::PushNotificationCallback"></a><h3>2.5. PushNotificationCallback</h3>
+<a class="backward-compatibility-anchor" name="::Push::PushNotificationCallback"></a><h3>2.6. PushNotificationCallback</h3>
 <div class="brief">
  The PushNotificationCallback interface specifies the notification callback for the received push notification message.
           </div>
@@ -1068,12 +1382,15 @@ To guarantee that the push application runs on a device with the push feature, d
 <li class="feature">http://tizen.org/feature/network.push</li>
 </div>
 <p></p>
-                    For more information, see <a href="https://developer.tizen.org/development/getting-started/web-application/understanding-tizen-programming/application-filtering">Application Filtering</a>.
+                    For more information, see <a href="https://developer.tizen.org/development/getting-started/web-application/understanding-tizen-programming/application-filtering">Application Filtering.</a>
 </div>
 <h2 id="full-webidl">4. Full WebIDL</h2>
 <pre class="webidl prettyprint">module Push {
+
     typedef DOMString PushRegistrationId;
 
+    enum PushRegistrationState {"REGISTERED", "UNREGISTERED"};
+
     [NoInterfaceObject] interface PushManagerObject {
         readonly attribute <a href="#PushManager">PushManager</a> push;
     };
@@ -1089,12 +1406,17 @@ To guarantee that the push application runs on a device with the push feature, d
                     optional <a href="tizen.html#ErrorCallback">ErrorCallback</a>? errorCallback) raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
 
       void unregister(optional <a href="tizen.html#SuccessCallback">SuccessCallback</a>? successCallback,
-                    optional <a href="tizen.html#ErrorCallback">ErrorCallback</a>? errorCallback) raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
+                      optional <a href="tizen.html#ErrorCallback">ErrorCallback</a>? errorCallback) raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
 
       void connectService(<a href="#PushNotificationCallback">PushNotificationCallback</a> notificationCallback) raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
 
+      void connect(<a href="#PushRegistrationStateChangeCallback">PushRegistrationStateChangeCallback</a> stateChangeCallback,
+                   <a href="#PushNotificationCallback">PushNotificationCallback</a> notificationCallback, optional <a href="tizen.html#ErrorCallback">ErrorCallback</a>? errorCallback) raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
+
       void disconnectService() raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
 
+      void disconnect() raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
+
       <a href="#PushRegistrationId">PushRegistrationId</a> getRegistrationId() raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
 
       void getUnreadNotifications() raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
@@ -1116,8 +1438,6 @@ To guarantee that the push application runs on a device with the push feature, d
         readonly attribute DOMString sessionInfo;
 
         readonly attribute DOMString requestId;
-
-        readonly attribute long type;
     };
 
     [Callback=FunctionOnly, NoInterfaceObject]
@@ -1126,6 +1446,11 @@ To guarantee that the push application runs on a device with the push feature, d
     };
 
     [Callback=FunctionOnly, NoInterfaceObject]
+    interface PushRegistrationStateChangeCallback {
+        void onsuccess(<a href="#PushRegistrationState">PushRegistrationState</a> state);
+    };
+
+    [Callback=FunctionOnly, NoInterfaceObject]
     interface PushNotificationCallback {
         void onsuccess(<a href="#PushMessage">PushMessage</a> message);
     };