Release 4.0.0-preview1-00051
[platform/core/csapi/tizenfx.git] / src / Tizen.Network.Nsd / Tizen.Network.Nsd / NsdEnumerations.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 Tizen.Internals.Errors;
18
19 namespace Tizen.Network.Nsd
20 {
21     /// <summary>
22     /// Enumeration for DNS-SD service state.
23     /// </summary>
24     /// <since_tizen> 4 </since_tizen>
25     public enum DnssdServiceState
26     {
27         /// <summary>
28         /// Available DNS-SD service found.
29         /// </summary>
30         Available,
31         /// <summary>
32         /// DNS-SD service not available.
33         /// </summary>
34         Unavailable,
35         /// <summary>
36         /// Lookup failure for service name.
37         /// </summary>
38         ServiceNameLookupFailed,
39         /// <summary>
40         /// Lookup failure for host name and port number.
41         /// </summary>
42         HostNameLookupFailed,
43         /// <summary>
44         /// Lookup failure for IP address.
45         /// </summary>
46         AddressLookupFailed
47     }
48
49     /// <summary>
50     /// Enumeration for SSDP service state.
51     /// </summary>
52     /// <since_tizen> 4 </since_tizen>
53     public enum SsdpServiceState
54     {
55         /// <summary>
56         /// Available SSDP service found.
57         /// </summary>
58         Available,
59         /// <summary>
60         /// SSDP service not available.
61         /// </summary>
62         Unavailable
63     }
64
65     internal enum DnssdError
66     {
67         None = ErrorCode.None,
68         OutOfMemory = ErrorCode.OutOfMemory,
69         PermissionDenied = ErrorCode.PermissionDenied,
70         InvalidOperation = ErrorCode.InvalidOperation,
71         InvalidParameter = ErrorCode.InvalidParameter,
72         NotSupported = ErrorCode.NotSupported,
73         NotInitialized = -0x01CA0000 | 0x01,
74         AlreadyRegistered = -0x01CA0000 | 0x02,
75         NameConflict = -0x01CA0000 | 0x03,
76         ServiceNotRunning = -0x01CA0000 | 0x04,
77         ServiceNotFound = -0x01CA0000 | 0x05,
78         OperationFailed = -0x01CA0000 | 0x06
79     }
80
81     internal enum SsdpError
82     {
83         None = ErrorCode.None,
84         OutOfMemory = ErrorCode.OutOfMemory,
85         PermissionDenied = ErrorCode.PermissionDenied,
86         InvalidParameter = ErrorCode.InvalidParameter,
87         NotSupported = ErrorCode.NotSupported,
88         NotInitialized = -0x01C90000 | 0x01,
89         OperationFailed = -0x01C90000 | 0x04,
90         ServiceNotFound = -0x01C90000 | 0x05,
91         ServiceAlreadyRegistered = -0x01C90000 | 0x06
92     }
93 }