1 | # ***** BEGIN LICENSE BLOCK *****
|
---|
2 | # Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
---|
3 | #
|
---|
4 | # The contents of this file are subject to the Mozilla Public License Version
|
---|
5 | # 1.1 (the "License"); you may not use this file except in compliance with
|
---|
6 | # the License. You may obtain a copy of the License at
|
---|
7 | # http://www.mozilla.org/MPL/
|
---|
8 | #
|
---|
9 | # Software distributed under the License is distributed on an "AS IS" basis,
|
---|
10 | # WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
---|
11 | # for the specific language governing rights and limitations under the
|
---|
12 | # License.
|
---|
13 | #
|
---|
14 | # The Original Code is the Python XPCOM language bindings.
|
---|
15 | #
|
---|
16 | # The Initial Developer of the Original Code is ActiveState Tool Corp.
|
---|
17 | # Portions created by ActiveState Tool Corp. are Copyright (C) 2000, 2001
|
---|
18 | # ActiveState Tool Corp. All Rights Reserved.
|
---|
19 | #
|
---|
20 | # Contributor(s):
|
---|
21 | # Mark Hammond <[email protected]> (original author)
|
---|
22 | #
|
---|
23 | # Alternatively, the contents of this file may be used under the terms of
|
---|
24 | # either the GNU General Public License Version 2 or later (the "GPL"), or
|
---|
25 | # the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
---|
26 | # in which case the provisions of the GPL or the LGPL are applicable instead
|
---|
27 | # of those above. If you wish to allow use of your version of this file only
|
---|
28 | # under the terms of either the GPL or the LGPL, and not to allow others to
|
---|
29 | # use your version of this file under the terms of the MPL, indicate your
|
---|
30 | # decision by deleting the provisions above and replace them with the notice
|
---|
31 | # and other provisions required by the GPL or the LGPL. If you do not delete
|
---|
32 | # the provisions above, a recipient may use your version of this file under
|
---|
33 | # the terms of any one of the MPL, the GPL or the LGPL.
|
---|
34 | #
|
---|
35 | # ***** END LICENSE BLOCK *****
|
---|
36 |
|
---|
37 | # Generated by h2py from nsError.h
|
---|
38 | # CMD line: h2py.py -i (nsresult) nsError.h
|
---|
39 |
|
---|
40 | # XXX - NOTE - some manual code at the end, and all literals moved back to ints
|
---|
41 | NS_ERROR_MODULE_XPCOM = 1
|
---|
42 | NS_ERROR_MODULE_BASE = 2
|
---|
43 | NS_ERROR_MODULE_GFX = 3
|
---|
44 | NS_ERROR_MODULE_WIDGET = 4
|
---|
45 | NS_ERROR_MODULE_CALENDAR = 5
|
---|
46 | NS_ERROR_MODULE_NETWORK = 6
|
---|
47 | NS_ERROR_MODULE_PLUGINS = 7
|
---|
48 | NS_ERROR_MODULE_LAYOUT = 8
|
---|
49 | NS_ERROR_MODULE_HTMLPARSER = 9
|
---|
50 | NS_ERROR_MODULE_RDF = 10
|
---|
51 | NS_ERROR_MODULE_UCONV = 11
|
---|
52 | NS_ERROR_MODULE_REG = 12
|
---|
53 | NS_ERROR_MODULE_FILES = 13
|
---|
54 | NS_ERROR_MODULE_DOM = 14
|
---|
55 | NS_ERROR_MODULE_IMGLIB = 15
|
---|
56 | NS_ERROR_MODULE_MAILNEWS = 16
|
---|
57 | NS_ERROR_MODULE_EDITOR = 17
|
---|
58 | NS_ERROR_MODULE_XPCONNECT = 18
|
---|
59 | NS_ERROR_MODULE_PROFILE = 19
|
---|
60 | NS_ERROR_MODULE_LDAP = 20
|
---|
61 | NS_ERROR_MODULE_SECURITY = 21
|
---|
62 | NS_ERROR_MODULE_DOM_XPATH = 22
|
---|
63 | NS_ERROR_MODULE_DOM_RANGE = 23
|
---|
64 | NS_ERROR_MODULE_URILOADER = 24
|
---|
65 | NS_ERROR_MODULE_CONTENT = 25
|
---|
66 | NS_ERROR_MODULE_PYXPCOM = 26
|
---|
67 | NS_ERROR_MODULE_XSLT = 27
|
---|
68 | NS_ERROR_MODULE_IPC = 28
|
---|
69 | NS_ERROR_MODULE_SVG = 29
|
---|
70 | NS_ERROR_MODULE_GENERAL = 51
|
---|
71 |
|
---|
72 | def NS_FAILED(_nsresult): return ((_nsresult) & -2147483648)
|
---|
73 |
|
---|
74 | NS_ERROR_SEVERITY_SUCCESS = 0
|
---|
75 | NS_ERROR_SEVERITY_ERROR = 1
|
---|
76 | NS_ERROR_MODULE_BASE_OFFSET = 69
|
---|
77 | def NS_ERROR_GET_CODE(err): return ((err) & 65535)
|
---|
78 |
|
---|
79 | def NS_ERROR_GET_MODULE(err): return (((((err) >> 16) - NS_ERROR_MODULE_BASE_OFFSET) & 8191))
|
---|
80 |
|
---|
81 | def NS_ERROR_GET_SEVERITY(err): return (((err) >> 31) & 1)
|
---|
82 |
|
---|
83 | NS_OK = 0
|
---|
84 | NS_COMFALSE = 1
|
---|
85 | NS_ERROR_BASE = ( -1041039360)
|
---|
86 | NS_ERROR_NOT_INITIALIZED = (NS_ERROR_BASE + 1)
|
---|
87 | NS_ERROR_ALREADY_INITIALIZED = (NS_ERROR_BASE + 2)
|
---|
88 | NS_ERROR_NOT_IMPLEMENTED = ( -2147467263)
|
---|
89 | NS_NOINTERFACE = ( -2147467262)
|
---|
90 | NS_ERROR_NO_INTERFACE = NS_NOINTERFACE
|
---|
91 | NS_ERROR_INVALID_POINTER = ( -2147467261)
|
---|
92 | NS_ERROR_NULL_POINTER = NS_ERROR_INVALID_POINTER
|
---|
93 | NS_ERROR_ABORT = ( -2147467260)
|
---|
94 | NS_ERROR_FAILURE = ( -2147467259)
|
---|
95 | NS_ERROR_UNEXPECTED = ( -2147418113)
|
---|
96 | NS_ERROR_OUT_OF_MEMORY = ( -2147024882)
|
---|
97 | NS_ERROR_ILLEGAL_VALUE = ( -2147024809)
|
---|
98 | NS_ERROR_INVALID_ARG = NS_ERROR_ILLEGAL_VALUE
|
---|
99 | NS_ERROR_NO_AGGREGATION = ( -2147221232)
|
---|
100 | NS_ERROR_NOT_AVAILABLE = ( -2147221231)
|
---|
101 | NS_ERROR_FACTORY_NOT_REGISTERED = ( -2147221164)
|
---|
102 | NS_ERROR_FACTORY_REGISTER_AGAIN = ( -2147221163)
|
---|
103 | NS_ERROR_FACTORY_NOT_LOADED = ( -2147221000)
|
---|
104 | NS_ERROR_FACTORY_NO_SIGNATURE_SUPPORT = \
|
---|
105 | (NS_ERROR_BASE + 257)
|
---|
106 | NS_ERROR_FACTORY_EXISTS = (NS_ERROR_BASE + 256)
|
---|
107 | NS_ERROR_PROXY_INVALID_IN_PARAMETER = ( -2147418096)
|
---|
108 | NS_ERROR_PROXY_INVALID_OUT_PARAMETER = ( -2147418095)
|
---|
109 |
|
---|
110 | ##### END OF GENERATED CODE
|
---|
111 | #####
|
---|
112 | def NS_ERROR_GENERATE_FAILURE(module,code):
|
---|
113 | # slightly optimized, and avoids 2.3->2.4 long/int changes
|
---|
114 | # return (NS_ERROR_SEVERITY_ERROR<<31) | ((module+NS_ERROR_MODULE_BASE_OFFSET)<<16) | (code)
|
---|
115 | return -2147483648 | ((module+NS_ERROR_MODULE_BASE_OFFSET)<<16) | (code)
|
---|
116 |
|
---|
117 | def NS_ERROR_GENERATE_SUCCESS(module,code):
|
---|
118 | #return (NS_ERROR_SEVERITY_SUCCESS<<31) | ((module+NS_ERROR_MODULE_BASE_OFFSET)<<16) | (code)
|
---|
119 | return ((module+NS_ERROR_MODULE_BASE_OFFSET)<<16) | (code)
|
---|
120 |
|
---|
121 | NS_BASE_STREAM_CLOSED = NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_BASE, 2)
|
---|
122 | NS_BASE_STREAM_OSERROR = NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_BASE, 3)
|
---|
123 | NS_BASE_STREAM_ILLEGAL_ARGS = NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_BASE, 4)
|
---|
124 | NS_BASE_STREAM_NO_CONVERTER = NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_BASE, 5)
|
---|
125 | NS_BASE_STREAM_BAD_CONVERSION = NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_BASE, 6)
|
---|
126 | NS_BASE_STREAM_WOULD_BLOCK = NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_BASE, 7)
|
---|
127 | NS_ERROR_FILE_UNRECOGNIZED_PATH = NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 1)
|
---|
128 | NS_ERROR_FILE_UNRESOLVABLE_SYMLINK = NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 2)
|
---|
129 | NS_ERROR_FILE_EXECUTION_FAILED = NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 3)
|
---|
130 | NS_ERROR_FILE_UNKNOWN_TYPE = NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 4)
|
---|
131 | NS_ERROR_FILE_DESTINATION_NOT_DIR = NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 5)
|
---|
132 | NS_ERROR_FILE_TARGET_DOES_NOT_EXIST = NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 6)
|
---|
133 | NS_ERROR_FILE_COPY_OR_MOVE_FAILED = NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 7)
|
---|
134 | NS_ERROR_FILE_ALREADY_EXISTS = NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 8)
|
---|
135 | NS_ERROR_FILE_INVALID_PATH = NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 9)
|
---|
136 | NS_ERROR_FILE_DISK_FULL = NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 10)
|
---|
137 | NS_ERROR_FILE_CORRUPTED = NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 11)
|
---|
138 | NS_ERROR_FILE_NOT_DIRECTORY = NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 12)
|
---|
139 | NS_ERROR_FILE_IS_DIRECTORY = NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 13)
|
---|
140 | NS_ERROR_FILE_IS_LOCKED = NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 14)
|
---|
141 | NS_ERROR_FILE_TOO_BIG = NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 15)
|
---|
142 | NS_ERROR_FILE_NO_DEVICE_SPACE = NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 16)
|
---|
143 | NS_ERROR_FILE_NAME_TOO_LONG = NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 17)
|
---|
144 | NS_ERROR_FILE_NOT_FOUND = NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 18)
|
---|
145 | NS_ERROR_FILE_READ_ONLY = NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 19)
|
---|
146 | NS_ERROR_FILE_DIR_NOT_EMPTY = NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 20)
|
---|
147 | NS_ERROR_FILE_ACCESS_DENIED = NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 21)
|
---|
148 |
|
---|
149 | ## from netCore.h
|
---|
150 | NS_ERROR_ALREADY_CONNECTED = NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 11)
|
---|
151 |
|
---|
152 | NS_ERROR_NOT_CONNECTED = NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 12)
|
---|
153 | NS_ERROR_IN_PROGRESS = NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 15)
|
---|
154 | NS_ERROR_OFFLINE = NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 16)
|
---|
155 |
|
---|
156 | ## from nsISocketTransportService.idl
|
---|
157 | NS_ERROR_CONNECTION_REFUSED = NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 13)
|
---|
158 |
|
---|
159 | NS_ERROR_NET_TIMEOUT = NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 14)
|
---|
160 |
|
---|
161 | # Status nsresult codes: used with nsIProgressEventSink::OnStatus
|
---|
162 | NS_NET_STATUS_RESOLVING_HOST = NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 3)
|
---|
163 | NS_NET_STATUS_CONNECTED_TO = NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 4)
|
---|
164 | NS_NET_STATUS_SENDING_TO = NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 5)
|
---|
165 | NS_NET_STATUS_RECEIVING_FROM = NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 6)
|
---|
166 | NS_NET_STATUS_CONNECTING_TO = NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 7)
|
---|