Add Tizen.Application.ApplicationManager
[platform/core/csapi/tizenfx.git] / Tizen.Applications / Tizen.Applications / ApplicationChangedEventArgs.cs
1 /// Copyright 2016 by Samsung Electronics, Inc.,
2 ///
3 /// This software is the confidential and proprietary information
4 /// of Samsung Electronics, Inc. ("Confidential Information"). You
5 /// shall not disclose such Confidential Information and shall use
6 /// it only in accordance with the terms of the license agreement
7 /// you entered into with Samsung.
8
9 using System;
10 using System.Collections.Generic;
11
12 namespace Tizen.Applications
13 {
14     /// <summary>
15     /// Enumeration for application state.
16     /// </summary>
17     public enum ApplicationState
18     {
19         /// <summary>
20         /// Initial state.
21         /// </summary>
22         None = -1,
23         /// <summary>
24         /// Launched state.
25         /// </summary>
26         Launched,
27         /// <summary>
28         /// Terminated state.
29         /// </summary>
30         Terminated,
31     }
32
33     /// <summary>
34     /// ApplicationChangedEventArgs class. This class is an event arguments of the ApplicationLaunched and ApplicationTerminated events.
35     /// </summary>
36     public class ApplicationChangedEventArgs : EventArgs
37     {
38         private string _appid = "";
39         private int _pid = 0;
40         private ApplicationState _state = ApplicationState.None;
41
42         public ApplicationChangedEventArgs(string applicationId, int processId, int state)
43         {
44             _appid = applicationId;
45             _pid = processId;
46             _state = (ApplicationState)state;
47         }
48
49         /// <summary>
50         /// ApplicationId property.
51         /// </summary>
52         /// <returns>string application id.</returns>
53         public string ApplicationId
54         {
55             get
56             {
57                 return _appid;
58             }
59         }
60
61         /// <summary>
62         /// ProcessId property.
63         /// </summary>
64         /// <returns>int process id.</returns>
65         public int ProcessId
66         {
67             get
68             {
69                 return _pid;
70             }
71         }
72
73         /// <summary>
74         /// State property.
75         /// </summary>
76         /// <returns>ApplicationState enum value.</returns>
77         public ApplicationState State
78         {
79             get
80             {
81                 return _state;
82             }
83         }
84
85     }
86 }
87