xref: /titanic_51/usr/src/lib/libdns_sd/java/com/apple/dnssd/DNSSDException.java (revision 5ffb0c9b03b5149ff4f5821a62be4a52408ada2a)
1 /* -*- Mode: Java; tab-width: 4 -*-
2  *
3  * Copyright (c) 2004 Apple Computer, Inc. All rights reserved.
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  *     http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17 
18 package	com.apple.dnssd;
19 
20 
21 /**
22 	Used to report various DNS-SD-related error conditions.
23 */
24 
25 abstract public class	DNSSDException extends Exception
26 {
27     public static final int		NO_ERROR                  =  0;
28     public static final int		UNKNOWN                   = -65537;
29     public static final int		NO_SUCH_NAME              = -65538;
30     public static final int		NO_MEMORY                 = -65539;
31     public static final int		BAD_PARAM                 = -65540;
32     public static final int		BAD_REFERENCE             = -65541;
33     public static final int		BAD_STATE                 = -65542;
34     public static final int		BAD_FLAGS                 = -65543;
35     public static final int		UNSUPPORTED               = -65544;
36     public static final int		NOT_INITIALIZED           = -65545;
37     public static final int		NO_CACHE                  = -65546;
38     public static final int		ALREADY_REGISTERED        = -65547;
39     public static final int		NAME_CONFLICT             = -65548;
40     public static final int		INVALID                   = -65549;
41     public static final int		FIREWALL                  = -65550;
42     public static final int		INCOMPATIBLE              = -65551;
43     public static final int		BAD_INTERFACE_INDEX       = -65552;
44     public static final int		REFUSED                   = -65553;
45     public static final int		NOSUCHRECORD              = -65554;
46     public static final int		NOAUTH                    = -65555;
47     public static final int		NOSUCHKEY                 = -65556;
48     public static final int		NATTRAVERSAL              = -65557;
49     public static final int		DOUBLENAT                 = -65558;
50     public static final int		BADTIME                   = -65559;
51     public static final int		BADSIG                    = -65560;
52     public static final int		BADKEY                    = -65561;
53     public static final int		TRANSIENT                 = -65562;
54     public static final int		SERVICENOTRUNNING         = -65563;
55     public static final int		NATPORTMAPPINGUNSUPPORTED = -65564;
56     public static final int		NATPORTMAPPINGDISABLED    = -65565;
57 
58     // Note: When adding new error values here, remember also
59     // to update the corresponding kMessages array in AppleDNSSDException (DNSSD.java)
60 
61 	/** Returns the sub-code that identifies the particular error. */
62 	abstract public int			getErrorCode();
63 }
64 
65