/// APIs are provided so that an application can register itself
/// with the push server along with APIs to request push message.
/// </remarks>
- /// <example>
- /// <code>
- /// public class Program
- /// {
- /// static void Main(string[] args)
- /// {
- /// PushClient.PushServiceConnect("xxxxx");
- /// Task<ServerResponse> tr = PushClient.PushServerRegister();
- /// tr.GetAwaiter().OnCompleted(() => {
- /// ServerResponse res = tr.Result;
- /// PushClient.GetUnreadNotifications();
- /// Task<ServerResponse> tu = PushClient.PushServerUnregister();
- /// tu.GetAwaiter().OnCompleted(() => {
- /// PushClient.PushServiceDisconnect();
- /// });
- /// });
- /// PushClient.NotificationReceived += EventHandlerNotificationReceived;
- /// PushClient.StateChanged += EventHandlerStateChanged;
- /// }
- /// }
- /// static void EventHandlerNotificationReceived(object sender, PushMessageEventArgs e)
- /// {
- /// // any user code
- /// }
- /// static void EventHandlerStateChanged(object sender, PushConnectionStateEventArgs e)
- /// {
- /// // any user code
- /// }
- /// </code>
- /// </example>
public static class PushClient
{
/// <summary>
}
/// <summary>
- /// registration ID received from server. </summary>
+ /// registration ID received from server.
+ /// </summary>
/// <since_tizen> 3 </since_tizen>
/// <returns>
/// It is the string, which is the ID received from the server.
/// </summary>
/// <since_tizen> 3 </since_tizen>
/// <value>
- /// It is the current state.</value>
+ /// It is the current state.
+ /// </value>
public PushState State
{
get;
/// </summary>
/// <since_tizen> 3 </since_tizen>
/// <value>
- /// It is the string, which contains the error string if set.</value>
+ /// It is the string, which contains the error string if set.
+ /// </value>
public string Error
{
get;
internal PushImpl()
{
- //Empty
+ // Empty
}
private IntPtr _connection;
ob.Type = type;
}
PushClient.Notify(ob);
- //Interop.PushClient.FreeNotification(notification);
- Log.Info(Interop.PushClient.LogTag, "Free Notification Done");
};
Interop.PushClient.ServiceError connectResult = Interop.PushClient.ServiceConnect(pushAppId, stateDelegate, notifyDelegate, IntPtr.Zero, out _connection);
if (connectResult != Interop.PushClient.ServiceError.None)
public class PushMessageEventArgs : EventArgs
{
/// <summary>
- /// Gives the Application Data recieved. </summary>
+ /// Gives the Application Data recieved.
+ /// </summary>
/// <since_tizen> 3 </since_tizen>
/// <value>
- /// It is the string, which stores the application data.</value>
+ /// It is the string, which stores the application data.
+ /// </value>
public string AppData
{
get;
/// </summary>
/// <since_tizen> 3 </since_tizen>
/// <value>
- /// It is the string, which stores the message field.</value>
+ /// It is the string, which stores the message field.
+ /// </value>
public string Message
{
get;
/// </summary>
/// <since_tizen> 3 </since_tizen>
/// <value>
- /// It is the DateTime field representing the time at which the Notification was received.</value>
+ /// It is the DateTime field representing the time at which the Notification was received.
+ /// </value>
public DateTime ReceivedAt
{
get;
/// </summary>
/// <since_tizen> 3 </since_tizen>
/// <value>
- /// It is a string value representing the Sender of the Notification.</value>
+ /// It is a string value representing the Sender of the Notification.
+ /// </value>
public string Sender
{
get;
/// </summary>
/// <since_tizen> 3 </since_tizen>
/// <value>
- /// It is a string value representing the session ID of the Notification.</value>
+ /// It is a string value representing the session ID of the Notification.
+ /// </value>
public string SessionInfo
{
get;
/// </summary>
/// <since_tizen> 3 </since_tizen>
/// <value>
- /// It is a string value representing the request ID of the Notification.</value>
+ /// It is a string value representing the request ID of the Notification.
+ /// </value>
public string RequestId
{
get;
/// </summary>
/// <since_tizen> 3 </since_tizen>
/// <value>
- /// It is an integer value representing the type field of the notification.</value>
+ /// It is an integer value representing the type field of the notification.
+ /// </value>
public int Type
{
get;
/// </summary>
/// <since_tizen> 3 </since_tizen>
/// <value>
- /// It is the Result state of the operation performed.</value>
+ /// It is the Result state of the operation performed.
+ /// </value>
public Result ServerResult
{
get;
/// </summary>
/// <since_tizen> 3 </since_tizen>
/// <value>
- /// It is the Message sent by the server.</value>
+ /// It is the Message sent by the server.
+ /// </value>
public string ServerMessage
{
get;