[Nsd]Fixed ArgumentException and implemented IDisposable in INsdService
[platform/core/csapi/nsd.git] / Tizen.Network.Nsd / Tizen.Network.Nsd / INsdService.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     /// This interface is used for managing local service registration using DNSSD/SSDP.
23     /// </summary>
24     public interface INsdService : IDisposable
25     {
26         /// <summary>
27         /// Registers the DNSSD/SSDP local service for publishing.
28         /// </summary>
29         /// <remarks>
30         /// A service created locally must be passed.
31         /// </remarks>
32         /// <since_tizen> 4 </since_tizen>
33         /// <privilege>http://tizen.org/privilege/internet</privilege>
34         /// <feature>http://tizen.org/feature/network.dnssd</feature>
35         /// <feature>http://tizen.org/feature/network.ssdp</feature>
36         /// <exception cref="InvalidOperationException">Thrown when any other error occurred.</exception>
37         /// <exception cref="NotSupportedException">Thrown when DNSSD/SSDP is not supported.</exception>
38         /// <exception cref="UnauthorizedAccessException">Thrown when permission is denied.</exception>
39         void RegisterService();
40
41         /// <summary>
42         /// Deregisters the DNSSD/SSDP local service.
43         /// </summary>
44         /// <remarks>
45         /// A local service registered using RegisterService() must be passed.
46         /// </remarks>
47         /// <since_tizen> 4 </since_tizen>
48         /// <feature>http://tizen.org/feature/network.dnssd</feature>
49         /// <feature>http://tizen.org/feature/network.ssdp</feature>
50         /// <exception cref="InvalidOperationException">Thrown when any other error occurred.</exception>
51         /// <exception cref="NotSupportedException">Thrown when DNSSD/SSDP is not supported.</exception>
52         void DeregisterService();
53     }
54 }