08f3a16f5dc618190feb4bbb47ba1d3023fce584
[platform/core/csapi/push.git] / Tizen.Messaging / Push / PushConnectionStateEventArgs.cs
1 /// This File contains the Api's related to the PushConnectionStateEventArgs class
2 ///
3 /// Copyright 2016 by Samsung Electronics, Inc.,
4 ///
5 /// This software is the confidential and proprietary information
6 /// of Samsung Electronics, Inc. ("Confidential Information"). You
7 /// shall not disclose such Confidential Information and shall use
8 /// it only in accordance with the terms of the license agreement
9 /// you entered into with Samsung.
10
11
12 using System;
13
14 namespace Tizen.Messaging.Push
15 {
16     /// <summary>
17     /// An extended EventArgs class which contains the State Information.
18     /// </summary>
19     public class PushConnectionStateEventArgs : EventArgs
20     {
21         /// <summary>
22         /// Enumeration for the different states.
23         /// </summary>
24         public enum PushState
25         {
26             /// <summary>
27             /// Registered with the Server.
28             /// </summary>
29             Registered = 0,
30             /// <summary>
31             /// Unregistered.
32             /// </summary>
33             Unregistered = 1,
34             /// <summary>
35             /// To change the provisioning server IP.
36             /// </summary>
37             ProvisioningIPChange = 2,
38             /// <summary>
39             /// Ping interval is changing.
40             /// </summary>
41             PingChange = 3,
42             /// <summary>
43             /// Error Occured in Changing State.
44             /// </summary>
45             StateError = 4
46         }
47
48         /// <summary>
49         /// Gives the current state.
50         /// </summary>
51         /// <value>
52         /// It is the current state.</value>
53         public PushState State
54         {
55             get;
56             internal set;
57         }
58
59         /// <summary>
60         /// Gives information about the error if set.
61         /// </summary>
62         /// <value>
63         /// It is the string which contains the error string if set.</value>
64         public string Error
65         {
66             get;
67             internal set;
68         }
69
70         internal PushConnectionStateEventArgs(PushState state, string error)
71         {
72             State = state;
73             Error = error;
74         }
75     }
76 }