Release 4.0.0-preview1-00051
[platform/core/csapi/tizenfx.git] / src / Tizen.Location.Geofence / Tizen.Location.Geofence / GeofenceEventArgs.cs
1 /*
2  * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
3  *
4  * Licensed under the Apache License, Version 2.0 (the License);
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an AS IS BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 using System;
18
19 namespace Tizen.Location.Geofence
20 {
21     /// <summary>
22     /// Event arguments passed when Event is triggered to notify proximity state change.
23     /// </summary>
24     /// <since_tizen>3</since_tizen>
25     public class ProximityStateEventArgs : EventArgs
26     {
27         /// <summary>
28         /// Internal constructor.
29         /// </summary>
30         /// <since_tizen>3</since_tizen>
31         /// <param name="id">The geofence id.</param>
32         /// <param name="state">The proximity state.</param>
33         /// <param name="provider">The proximity provider.</param>
34         internal ProximityStateEventArgs(int id, ProximityState state, ProximityProvider provider)
35         {
36             GeofenceId = id;
37             State = state;
38             Provider = provider;
39         }
40
41         /// <summary>
42         /// The geofence id.
43         /// </summary>
44         /// <since_tizen>3</since_tizen>
45         public int GeofenceId
46         {
47             get;
48         }
49
50         /// <summary>
51         /// The proximity state.
52         /// </summary>
53         /// <since_tizen>3</since_tizen>
54         public ProximityState State
55         {
56             get;
57         }
58
59         /// <summary>
60         /// The proximity provider.
61         /// </summary>
62         /// <since_tizen>3</since_tizen>
63         public ProximityProvider Provider
64         {
65             get;
66         }
67     };
68
69     /// <summary>
70     /// Event arguments passed when Event is triggered to notify Geofence state change.
71     /// </summary>
72     /// <since_tizen>3</since_tizen>
73     public class GeofenceStateEventArgs : EventArgs
74     {
75         /// <summary>
76         /// Internal constructor.
77         /// </summary>
78         /// <since_tizen>3</since_tizen>
79         /// <param name="fenceId">The specified geofence id.</param>
80         /// <param name="state">The geofence state.</param>
81         internal GeofenceStateEventArgs(int fenceId, GeofenceState state)
82         {
83             GeofenceId = fenceId;
84             State = state;
85         }
86
87         /// <summary>
88         /// The specified geofence id.
89         /// </summary>
90         /// <since_tizen>3</since_tizen>
91         public int GeofenceId
92         {
93             get;
94         }
95
96         /// <summary>
97         /// The geofence state.
98         /// </summary>
99         /// <since_tizen>3</since_tizen>
100         public GeofenceState State
101         {
102             get;
103         }
104     }
105
106     /// <summary>
107     /// Event arguments passed when Event occurs in geofence and place such as add, update, etc..
108     /// </summary>
109     /// <since_tizen>3</since_tizen>
110     public class GeofenceResponseEventArgs : EventArgs
111     {
112         /// <summary>
113         /// Internal constructor.
114         /// </summary>
115         /// <since_tizen>3</since_tizen>
116         /// <param name="placeId">The place id.</param>
117         /// <param name="fenceId">The specified geofence id.</param>
118         /// <param name="error">The error code for the particular action.</param>
119         /// <param name="eventType">The result code for the particular place and geofence management.</param>
120         internal GeofenceResponseEventArgs(int placeId, int fenceId, GeofenceError error, GeofenceEventType eventType)
121         {
122             PlaceId = placeId;
123             FenceId = fenceId;
124             ErrorCode = error;
125             EventType = eventType;
126         }
127
128         /// <summary>
129         /// The place id.
130         /// </summary>
131         /// <since_tizen>3</since_tizen>
132         public int PlaceId
133         {
134             get;
135         }
136
137         /// <summary>
138         /// The specified geofence id.
139         /// </summary>
140         /// <since_tizen>3</since_tizen>
141         public int FenceId
142         {
143             get;
144         }
145
146         /// <summary>
147         /// The error code for the particular action.
148         /// </summary>
149         /// <since_tizen>3</since_tizen>
150         public GeofenceError ErrorCode
151         {
152             get;
153         }
154
155         /// <summary>
156         /// The result code for the particular place and geofence management.
157         /// </summary>
158         /// <since_tizen>3</since_tizen>
159         public GeofenceEventType EventType
160         {
161             get;
162         }
163     };
164 }