[Nsd]Fixed ArgumentException and implemented IDisposable in INsdService
[platform/core/csapi/nsd.git] / Tizen.Network.Nsd / Tizen.Network.Nsd / NsdEventArgs.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.Network.Nsd
20 {
21     /// <summary>
22     /// An extended EventArgs class which contains changed service state during service discovery using DNSSD.
23     /// </summary>
24     /// <since_tizen> 4 </since_tizen>
25     public class DnssdServiceFoundEventArgs : EventArgs
26     {
27         private DnssdServiceState _state;
28         private DnssdService _service;
29
30         internal DnssdServiceFoundEventArgs(DnssdServiceState state, DnssdService service)
31         {
32             _state = state;
33             _service = service;
34         }
35
36         /// <summary>
37         /// DNSSD service state.
38         /// </summary>
39         /// <since_tizen> 4 </since_tizen>
40         public DnssdServiceState State
41         {
42             get
43             {
44                 return _state;
45             }
46         }
47
48         /// <summary>
49         /// DNSSD service instance.
50         /// </summary>
51         /// <since_tizen> 4 </since_tizen>
52         public DnssdService Service
53         {
54             get
55             {
56                 return _service;
57             }
58         }
59     }
60
61     /// <summary>
62     /// An extended EventArgs class which contains changed service state during service discovery using SSDP.
63     /// </summary>
64     /// <since_tizen> 4 </since_tizen>
65     public class SsdpServiceFoundEventArgs : EventArgs
66     {
67         private SsdpServiceState _state;
68         private SsdpService _service;
69
70         internal SsdpServiceFoundEventArgs(SsdpServiceState state, SsdpService service)
71         {
72             _state = state;
73             _service = service;
74         }
75
76         /// <summary>
77         /// SSDP service state.
78         /// </summary>
79         /// <since_tizen> 4 </since_tizen>
80         public SsdpServiceState State
81         {
82             get
83             {
84                 return _state;
85             }
86         }
87
88         /// <summary>
89         /// SSDP service instance.
90         /// </summary>
91         /// <since_tizen> 4 </since_tizen>
92         public SsdpService Service
93         {
94             get
95             {
96                 return _service;
97             }
98         }
99     }
100 }