Back to index

lightning-sunbird  0.9+nobinonly
nsError.py
Go to the documentation of this file.
00001 # ***** BEGIN LICENSE BLOCK *****
00002 # Version: MPL 1.1/GPL 2.0/LGPL 2.1
00003 #
00004 # The contents of this file are subject to the Mozilla Public License Version
00005 # 1.1 (the "License"); you may not use this file except in compliance with
00006 # the License. You may obtain a copy of the License at
00007 # http://www.mozilla.org/MPL/
00008 #
00009 # Software distributed under the License is distributed on an "AS IS" basis,
00010 # WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
00011 # for the specific language governing rights and limitations under the
00012 # License.
00013 #
00014 # The Original Code is the Python XPCOM language bindings.
00015 #
00016 # The Initial Developer of the Original Code is ActiveState Tool Corp.
00017 # Portions created by ActiveState Tool Corp. are Copyright (C) 2000, 2001
00018 # ActiveState Tool Corp.  All Rights Reserved.
00019 #
00020 # Contributor(s):
00021 #   Mark Hammond <MarkH@ActiveState.com> (original author)
00022 #
00023 # Alternatively, the contents of this file may be used under the terms of
00024 # either the GNU General Public License Version 2 or later (the "GPL"), or
00025 # the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
00026 # in which case the provisions of the GPL or the LGPL are applicable instead
00027 # of those above. If you wish to allow use of your version of this file only
00028 # under the terms of either the GPL or the LGPL, and not to allow others to
00029 # use your version of this file under the terms of the MPL, indicate your
00030 # decision by deleting the provisions above and replace them with the notice
00031 # and other provisions required by the GPL or the LGPL. If you do not delete
00032 # the provisions above, a recipient may use your version of this file under
00033 # the terms of any one of the MPL, the GPL or the LGPL.
00034 #
00035 # ***** END LICENSE BLOCK *****
00036 
00037 # Generated by h2py from nsError.h
00038 # CMD line: h2py.py -i (nsresult) nsError.h
00039 
00040 # XXX - NOTE - some manual code at the end, and all literals moved back to ints
00041 NS_ERROR_MODULE_XPCOM = 1
00042 NS_ERROR_MODULE_BASE = 2
00043 NS_ERROR_MODULE_GFX = 3
00044 NS_ERROR_MODULE_WIDGET = 4
00045 NS_ERROR_MODULE_CALENDAR = 5
00046 NS_ERROR_MODULE_NETWORK = 6
00047 NS_ERROR_MODULE_PLUGINS = 7
00048 NS_ERROR_MODULE_LAYOUT = 8
00049 NS_ERROR_MODULE_HTMLPARSER = 9
00050 NS_ERROR_MODULE_RDF = 10
00051 NS_ERROR_MODULE_UCONV = 11
00052 NS_ERROR_MODULE_REG = 12
00053 NS_ERROR_MODULE_FILES = 13
00054 NS_ERROR_MODULE_DOM = 14
00055 NS_ERROR_MODULE_IMGLIB = 15
00056 NS_ERROR_MODULE_MAILNEWS = 16
00057 NS_ERROR_MODULE_EDITOR = 17
00058 NS_ERROR_MODULE_XPCONNECT = 18
00059 NS_ERROR_MODULE_PROFILE = 19
00060 def NS_FAILED(_nsresult): return ((_nsresult) & -2147483648)
00061 
00062 NS_ERROR_SEVERITY_SUCCESS = 0
00063 NS_ERROR_SEVERITY_ERROR = 1
00064 NS_ERROR_MODULE_BASE_OFFSET = 69
00065 def NS_ERROR_GET_CODE(err): return ((err) & 65535)
00066 
00067 def NS_ERROR_GET_MODULE(err): return (((((err) >> 16) - NS_ERROR_MODULE_BASE_OFFSET) & 8191))
00068 
00069 def NS_ERROR_GET_SEVERITY(err): return (((err) >> 31) & 1)
00070 
00071 NS_OK = 0
00072 NS_COMFALSE = 1
00073 NS_ERROR_BASE = (  -1041039360)
00074 NS_ERROR_NOT_INITIALIZED = (NS_ERROR_BASE + 1)
00075 NS_ERROR_ALREADY_INITIALIZED = (NS_ERROR_BASE + 2)
00076 NS_ERROR_NOT_IMPLEMENTED = (  -2147467263)
00077 NS_NOINTERFACE = (  -2147467262)
00078 NS_ERROR_NO_INTERFACE = NS_NOINTERFACE
00079 NS_ERROR_INVALID_POINTER = (  -2147467261)
00080 NS_ERROR_NULL_POINTER = NS_ERROR_INVALID_POINTER
00081 NS_ERROR_ABORT = (  -2147467260)
00082 NS_ERROR_FAILURE = (  -2147467259)
00083 NS_ERROR_UNEXPECTED = (  -2147418113)
00084 NS_ERROR_OUT_OF_MEMORY = (  -2147024882)
00085 NS_ERROR_ILLEGAL_VALUE = (  -2147024809)
00086 NS_ERROR_INVALID_ARG = NS_ERROR_ILLEGAL_VALUE
00087 NS_ERROR_NO_AGGREGATION = (  -2147221232)
00088 NS_ERROR_NOT_AVAILABLE = (  -2147221231)
00089 NS_ERROR_FACTORY_NOT_REGISTERED = (  -2147221164)
00090 NS_ERROR_FACTORY_REGISTER_AGAIN = (  -2147221163)
00091 NS_ERROR_FACTORY_NOT_LOADED = (  -2147221000)
00092 NS_ERROR_FACTORY_NO_SIGNATURE_SUPPORT = \
00093                                            (NS_ERROR_BASE + 257)
00094 NS_ERROR_FACTORY_EXISTS = (NS_ERROR_BASE + 256)
00095 NS_ERROR_PROXY_INVALID_IN_PARAMETER = (  -2147418096)
00096 NS_ERROR_PROXY_INVALID_OUT_PARAMETER = (  -2147418095)
00097 
00098 ##### END OF GENERATED CODE
00099 #####
00100 def NS_ERROR_GENERATE_FAILURE(module,code):
00101        return (NS_ERROR_SEVERITY_ERROR<<31) | ((module+NS_ERROR_MODULE_BASE_OFFSET)<<16) | (code)
00102 
00103 def NS_ERROR_GENERATE_SUCCESS(module,code):
00104        return (NS_ERROR_SEVERITY_SUCCESS<<31) | ((module+NS_ERROR_MODULE_BASE_OFFSET)<<16) | (code)
00105 
00106 NS_BASE_STREAM_CLOSED = NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_BASE, 2)
00107 NS_BASE_STREAM_OSERROR = NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_BASE, 3)
00108 NS_BASE_STREAM_ILLEGAL_ARGS = NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_BASE, 4)
00109 NS_BASE_STREAM_NO_CONVERTER = NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_BASE, 5)
00110 NS_BASE_STREAM_BAD_CONVERSION = NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_BASE, 6)
00111 NS_BASE_STREAM_WOULD_BLOCK = NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_BASE, 7)
00112 NS_ERROR_FILE_UNRECOGNIZED_PATH = NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 1)
00113 NS_ERROR_FILE_UNRESOLVABLE_SYMLINK = NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 2)
00114 NS_ERROR_FILE_EXECUTION_FAILED = NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 3)
00115 NS_ERROR_FILE_UNKNOWN_TYPE = NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 4)
00116 NS_ERROR_FILE_DESTINATION_NOT_DIR = NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 5)
00117 NS_ERROR_FILE_TARGET_DOES_NOT_EXIST = NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 6)
00118 NS_ERROR_FILE_COPY_OR_MOVE_FAILED = NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 7)
00119 NS_ERROR_FILE_ALREADY_EXISTS = NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 8)
00120 NS_ERROR_FILE_INVALID_PATH = NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 9)
00121 NS_ERROR_FILE_DISK_FULL = NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 10)
00122 NS_ERROR_FILE_CORRUPTED = NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 11)
00123 NS_ERROR_FILE_NOT_DIRECTORY = NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 12)
00124 NS_ERROR_FILE_IS_DIRECTORY = NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 13)
00125 NS_ERROR_FILE_IS_LOCKED = NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 14)
00126 NS_ERROR_FILE_TOO_BIG = NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 15)
00127 NS_ERROR_FILE_NO_DEVICE_SPACE = NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 16)
00128 NS_ERROR_FILE_NAME_TOO_LONG = NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 17)
00129 NS_ERROR_FILE_NOT_FOUND = NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 18)
00130 NS_ERROR_FILE_READ_ONLY = NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 19)
00131 NS_ERROR_FILE_DIR_NOT_EMPTY = NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 20)
00132 NS_ERROR_FILE_ACCESS_DENIED = NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 21)
00133 
00134 ## from netCore.h
00135 NS_ERROR_ALREADY_CONNECTED =  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 11)
00136 
00137 NS_ERROR_NOT_CONNECTED = NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 12)
00138 NS_ERROR_IN_PROGRESS = NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 15)
00139 NS_ERROR_OFFLINE = NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 16)
00140 
00141 ## from nsISocketTransportService.idl
00142 NS_ERROR_CONNECTION_REFUSED = NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 13)
00143 
00144 NS_ERROR_NET_TIMEOUT = NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 14)
00145 
00146 # Status nsresult codes: used with nsIProgressEventSink::OnStatus 
00147 NS_NET_STATUS_RESOLVING_HOST  = NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 3)
00148 NS_NET_STATUS_CONNECTED_TO    = NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 4)
00149 NS_NET_STATUS_SENDING_TO      = NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 5)
00150 NS_NET_STATUS_RECEIVING_FROM  = NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 6)
00151 NS_NET_STATUS_CONNECTING_TO   = NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 7)