Back to index

lightning-sunbird  0.9+nobinonly
nsILDAPErrors.idl
Go to the documentation of this file.
00001 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
00002  *
00003  * ***** BEGIN LICENSE BLOCK *****
00004  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
00005  *
00006  * The contents of this file are subject to the Mozilla Public License Version
00007  * 1.1 (the "License"); you may not use this file except in compliance with
00008  * the License. You may obtain a copy of the License at
00009  * http://www.mozilla.org/MPL/
00010  *
00011  * Software distributed under the License is distributed on an "AS IS" basis,
00012  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
00013  * for the specific language governing rights and limitations under the
00014  * License.
00015  *
00016  * The Original Code is part of the mozilla.org LDAP XPCOM SDK.
00017  *
00018  * The Initial Developer of the Original Code is
00019  * Netscape Communications Corporation.
00020  * Portions created by the Initial Developer are Copyright (C) 2001
00021  * the Initial Developer. All Rights Reserved.
00022  *
00023  * Contributor(s):
00024  *   Dan Mosedale <dmose@netscape.com> (Original Author)
00025  *
00026  * Alternatively, the contents of this file may be used under the terms of
00027  * either the GNU General Public License Version 2 or later (the "GPL"), or
00028  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
00029  * in which case the provisions of the GPL or the LGPL are applicable instead
00030  * of those above. If you wish to allow use of your version of this file only
00031  * under the terms of either the GPL or the LGPL, and not to allow others to
00032  * use your version of this file under the terms of the MPL, indicate your
00033  * decision by deleting the provisions above and replace them with the notice
00034  * and other provisions required by the GPL or the LGPL. If you do not delete
00035  * the provisions above, a recipient may use your version of this file under
00036  * the terms of any one of the MPL, the GPL or the LGPL.
00037  *
00038  * ***** END LICENSE BLOCK ***** */
00039 
00040 #include "nsISupports.idl"
00041 
00056 [scriptable, uuid(f9ac10fa-1dd1-11b2-9798-8d5cbda95d74)]
00057 interface nsILDAPErrors : nsISupports
00058 {
00059 
00060     const long SUCCESS = 0x00;
00061 
00062     const long OPERATIONS_ERROR = 0x01;
00063 
00064     const long PROTOCOL_ERROR = 0x02;
00065 
00066     const long TIMELIMIT_EXCEEDED = 0x03;
00067 
00068     const long SIZELIMIT_EXCEEDED = 0x04;
00069 
00070     const long COMPARE_FALSE = 0x05;
00071 
00072     const long COMPARE_TRUE = 0x06;
00073 
00074     const long STRONG_AUTH_NOT_SUPPORTED = 0x07;
00075 
00076     const long STRONG_AUTH_REQUIRED = 0x08;
00077 
00078 
00082     const long PARTIAL_RESULTS = 0x09;
00083 
00087     const long REFERRAL = 0x0a;
00088 
00092     const long ADMINLIMIT_EXCEEDED = 0x0b;
00093 
00097     const long UNAVAILABLE_CRITICAL_EXTENSION = 0x0c;
00098 
00102     const long CONFIDENTIALITY_REQUIRED = 0x0d;
00103 
00107     const long SASL_BIND_IN_PROGRESS = 0x0e;
00108 
00109     const long NO_SUCH_ATTRIBUTE = 0x10;
00110 
00111     const long UNDEFINED_TYPE = 0x11;
00112 
00113     const long INAPPROPRIATE_MATCHING = 0x12;
00114 
00115     const long CONSTRAINT_VIOLATION = 0x13;
00116 
00117     const long TYPE_OR_VALUE_EXISTS = 0x14;
00118 
00119     const long INVALID_SYNTAX = 0x15;
00120 
00121     const long NO_SUCH_OBJECT = 0x20;
00122 
00123     const long ALIAS_PROBLEM = 0x21;
00124 
00125     const long INVALID_DN_SYNTAX = 0x22;
00126 
00130     const long IS_LEAF = 0x23;
00131 
00132     const long ALIAS_DEREF_PROBLEM = 0x24;
00133 
00134     const long INAPPROPRIATE_AUTH = 0x30;
00135 
00136     const long INVALID_CREDENTIALS = 0x31;
00137  
00138     const long INSUFFICIENT_ACCESS = 0x32;
00139 
00140     const long BUSY = 0x33;
00141 
00142     const long UNAVAILABLE = 0x34;    
00143 
00144     const long UNWILLING_TO_PERFORM = 0x35;
00145 
00146     const long LOOP_DETECT = 0x36;
00147 
00151     const long SORT_CONTROL_MISSING = 0x3C;
00152 
00156     const long INDEX_RANGE_ERROR = 0x3D;
00157 
00158     const long NAMING_VIOLATION = 0x40;
00159 
00160     const long OBJECT_CLASS_VIOLATION = 0x41;
00161 
00162     const long NOT_ALLOWED_ON_NONLEAF = 0x42;
00163 
00164     const long NOT_ALLOWED_ON_RDN = 0x43;
00165 
00166     const long ALREADY_EXISTS = 0x44;
00167 
00168     const long NO_OBJECT_CLASS_MODS = 0x45;
00169 
00173     const long RESULTS_TOO_LARGE = 0x46;
00174 
00178     const long AFFECTS_MULTIPLE_DSAS = 0x47;
00179 
00180     const long OTHER = 0x50;
00181 
00182     const long SERVER_DOWN = 0x51;
00183 
00184     const long LOCAL_ERROR = 0x52;
00185 
00186     const long ENCODING_ERROR = 0x53;
00187 
00188     const long DECODING_ERROR = 0x54;
00189 
00190     const long TIMEOUT = 0x55;
00191 
00192     const long AUTH_UNKNOWN = 0x56;
00193 
00194     const long FILTER_ERROR = 0x57;
00195 
00196     const long USER_CANCELLED = 0x58;
00197 
00198     const long PARAM_ERROR = 0x59;
00199 
00200     const long NO_MEMORY = 0x5a;
00201 
00202     const long CONNECT_ERROR = 0x5b;
00203 
00207     const long NOT_SUPPORTED = 0x5c;
00208 
00212     const long CONTROL_NOT_FOUND = 0x5d;
00213 
00217     const long NO_RESULTS_RETURNED = 0x5e;
00218 
00222     const long MORE_RESULTS_TO_RETURN = 0x5f;
00223 
00227     const long CLIENT_LOOP = 0x60;
00228 
00232     const long REFERRAL_LIMIT_EXCEEDED = 0x61;
00233 };
00234 
00235 /* 
00236  * Map these errors codes into the nsresult namespace in C++
00237  */
00238 %{C++
00239 
00240 #define NS_ERROR_LDAP_OPERATIONS_ERROR \
00241     NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_LDAP, \
00242                               nsILDAPErrors::OPERATIONS_ERROR)
00243 
00244 #define NS_ERROR_LDAP_PROTOCOL_ERROR \
00245     NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_LDAP, \
00246                               nsILDAPErrors::PROTOCOL_ERROR)
00247 
00248 #define NS_ERROR_LDAP_TIMELIMIT_EXCEEDED \
00249     NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_LDAP, \
00250                               nsILDAPErrors::TIMELIMIT_EXCEEDED)
00251 
00252 #define NS_ERROR_LDAP_SIZELIMIT_EXCEEDED \
00253     NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_LDAP, \
00254                               nsILDAPErrors::SIZELIMIT_EXCEEDED)
00255 
00256 #define NS_ERROR_LDAP_COMPARE_FALSE \
00257     NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_LDAP, \
00258                               nsILDAPErrors::COMPARE_FALSE)
00259 
00260 #define NS_ERROR_LDAP_COMPARE_TRUE \
00261     NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_LDAP, \
00262                               nsILDAPErrors::COMPARE_TRUE)
00263 
00264 #define NS_ERROR_LDAP_STRONG_AUTH_NOT_SUPPORTED \
00265     NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_LDAP, \
00266                               nsILDAPErrors::STRONG_AUTH_NOT_SUPPORTED)
00267 
00268 #define NS_ERROR_LDAP_STRONG_AUTH_REQUIRED \
00269     NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_LDAP, \
00270                               nsILDAPErrors::STRONG_AUTH_REQUIRED)
00271 
00272 #define NS_ERROR_LDAP_PARTIAL_RESULTS \
00273     NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_LDAP, \
00274                               nsILDAPErrors::PARTIAL_RESULTS)
00275 
00276 #define NS_ERROR_LDAP_REFERRAL \
00277     NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_LDAP, \
00278                               nsILDAPErrors::REFERRAL)
00279 
00280 #define NS_ERROR_LDAP_ADMINLIMIT_EXCEEDED \
00281     NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_LDAP, \
00282                               nsILDAPErrors::ADMINLIMIT_EXCEEDED)
00283 
00284 #define NS_ERROR_LDAP_UNAVAILABLE_CRITICAL_EXTENSION \
00285     NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_LDAP, \
00286                               nsILDAPErrors::UNAVAILABLE_CRITICAL_EXTENSION)
00287 
00288 #define NS_ERROR_LDAP_CONFIDENTIALITY_REQUIRED \
00289     NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_LDAP, \
00290                               nsILDAPErrors::CONFIDENTIALITY_REQUIRED)
00291 
00292 #define NS_ERROR_LDAP_SASL_BIND_IN_PROGRESS \
00293     NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_LDAP, \
00294                               nsILDAPErrors::SASL_BIND_IN_PROGRESS)
00295 
00296 #define NS_ERROR_LDAP_NO_SUCH_ATTRIBUTE \
00297     NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_LDAP, \
00298                               nsILDAPErrors::NO_SUCH_ATTRIBUTE)
00299 
00300 #define NS_ERROR_LDAP_UNDEFINED_TYPE \
00301     NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_LDAP, \
00302                               nsILDAPErrors::UNDEFINED_TYPE)
00303 
00304 #define NS_ERROR_LDAP_INAPPROPRIATE_MATCHING \
00305     NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_LDAP, \
00306                               nsILDAPErrors::INAPPROPRIATE_MATCHING)
00307 
00308 #define NS_ERROR_LDAP_CONSTRAINT_VIOLATION \
00309     NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_LDAP, \
00310                               nsILDAPErrors::CONSTRAINT_VIOLATION)
00311 
00312 #define NS_ERROR_LDAP_TYPE_OR_VALUE_EXISTS \
00313     NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_LDAP, \
00314                               nsILDAPErrors::TYPE_OR_VALUE_EXISTS)
00315 
00316 #define NS_ERROR_LDAP_INVALID_SYNTAX \
00317     NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_LDAP, \
00318                               nsILDAPErrors::INVALID_SYNTAX)
00319 
00320 #define NS_ERROR_LDAP_NO_SUCH_OBJECT \
00321     NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_LDAP, \
00322                               nsILDAPErrors::NO_SUCH_OBJECT)
00323 
00324 #define NS_ERROR_LDAP_ALIAS_PROBLEM \
00325     NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_LDAP, \
00326                               nsILDAPErrors::ALIAS_PROBLEM)
00327 
00328 #define NS_ERROR_LDAP_INVALID_DN_SYNTAX \
00329     NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_LDAP, \
00330                               nsILDAPErrors::INVALID_DN_SYNTAX)
00331 
00332 #define NS_ERROR_LDAP_IS_LEAF \
00333     NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_LDAP, \
00334                               nsILDAPErrors::IS_LEAF)
00335 
00336 #define NS_ERROR_LDAP_ALIAS_DEREF_PROBLEM \
00337     NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_LDAP, \
00338                               nsILDAPErrors::ALIAS_DEREF_PROBLEM)
00339 
00340 #define NS_ERROR_LDAP_INAPPROPRIATE_AUTH \
00341     NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_LDAP, \
00342                               nsILDAPErrors::INAPPROPRIATE_AUTH)
00343 
00344 #define NS_ERROR_LDAP_INVALID_CREDENTIALS \
00345     NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_LDAP, \
00346                               nsILDAPErrors::INVALID_CREDENTIALS)
00347 
00348 #define NS_ERROR_LDAP_INSUFFICIENT_ACCESS \
00349     NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_LDAP, \
00350                               nsILDAPErrors::INSUFFICIENT_ACCESS)
00351 
00352 #define NS_ERROR_LDAP_BUSY \
00353     NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_LDAP, \
00354                               nsILDAPErrors::BUSY)
00355 
00356 #define NS_ERROR_LDAP_UNAVAILABLE \
00357     NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_LDAP, \
00358                               nsILDAPErrors::UNAVAILABLE)
00359 
00360 #define NS_ERROR_LDAP_UNWILLING_TO_PERFORM \
00361     NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_LDAP, \
00362                               nsILDAPErrors::UNWILLING_TO_PERFORM)
00363 
00364 #define NS_ERROR_LDAP_LOOP_DETECT \
00365     NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_LDAP, \
00366                               nsILDAPErrors::LOOP_DETECT)
00367 
00368 #define NS_ERROR_LDAP_SORT_CONTROL_MISSING \
00369     NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_LDAP, \
00370                               nsILDAPErrors::SORT_CONTROL_MISSING)
00371 
00372 #define NS_ERROR_LDAP_INDEX_RANGE_ERROR \
00373     NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_LDAP, \
00374                               nsILDAPErrors::INDEX_RANGE_ERROR)
00375 
00376 #define NS_ERROR_LDAP_NAMING_VIOLATION \
00377     NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_LDAP, \
00378                               nsILDAPErrors::NAMING_VIOLATION)
00379 
00380 #define NS_ERROR_LDAP_OBJECT_CLASS_VIOLATION \
00381     NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_LDAP, \
00382                               nsILDAPErrors::OBJECT_CLASS_VIOLATION)
00383 
00384 #define NS_ERROR_LDAP_NOT_ALLOWED_ON_NONLEAF \
00385     NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_LDAP, \
00386                               nsILDAPErrors::NOT_ALLOWED_ON_NONLEAF)
00387 
00388 #define NS_ERROR_LDAP_NOT_ALLOWED_ON_RDN \
00389     NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_LDAP, \
00390                               nsILDAPErrors::NOT_ALLOWED_ON_RDN)
00391 
00392 #define NS_ERROR_LDAP_ALREADY_EXISTS \
00393     NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_LDAP, \
00394                               nsILDAPErrors::ALREADY_EXISTS)
00395 
00396 #define NS_ERROR_LDAP_NO_OBJECT_CLASS_MODS \
00397     NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_LDAP, \
00398                               nsILDAPErrors::NO_OBJECT_CLASS_MODS)
00399 
00400 #define NS_ERROR_LDAP_RESULTS_TOO_LARGE \
00401     NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_LDAP, \
00402                               nsILDAPErrors::RESULTS_TOO_LARGE)
00403 
00404 #define NS_ERROR_LDAP_AFFECTS_MULTIPLE_DSAS \
00405     NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_LDAP, \
00406                               nsILDAPErrors::AFFECTS_MULTIPLE_DSAS)
00407 
00408 #define NS_ERROR_LDAP_OTHER \
00409     NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_LDAP, \
00410                               nsILDAPErrors::OTHER)
00411 
00412 #define NS_ERROR_LDAP_SERVER_DOWN \
00413     NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_LDAP, \
00414                               nsILDAPErrors::SERVER_DOWN)
00415 
00416 #define NS_ERROR_LDAP_LOCAL_ERROR \
00417     NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_LDAP, \
00418                               nsILDAPErrors::LOCAL_ERROR)
00419 
00420 #define NS_ERROR_LDAP_ENCODING_ERROR \
00421     NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_LDAP, \
00422                               nsILDAPErrors::ENCODING_ERROR)
00423 
00424 #define NS_ERROR_LDAP_DECODING_ERROR \
00425     NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_LDAP, \
00426                               nsILDAPErrors::DECODING_ERROR)
00427 
00428 #define NS_ERROR_LDAP_TIMEOUT \
00429     NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_LDAP, \
00430                               nsILDAPErrors::TIMEOUT)
00431 
00432 #define NS_ERROR_LDAP_AUTH_UNKNOWN \
00433     NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_LDAP, \
00434                               nsILDAPErrors::AUTH_UNKNOWN)
00435 
00436 #define NS_ERROR_LDAP_FILTER_ERROR \
00437     NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_LDAP, \
00438                               nsILDAPErrors::FILTER_ERROR)
00439 
00440 #define NS_ERROR_LDAP_USER_CANCELLED \
00441     NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_LDAP, \
00442                               nsILDAPErrors::USER_CANCELLED)
00443 
00444 #define NS_ERROR_LDAP_PARAM_ERROR \
00445     NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_LDAP, \
00446                               nsILDAPErrors::PARAM_ERROR)
00447 
00448 #define NS_ERROR_LDAP_NO_MEMORY \
00449     NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_LDAP, \
00450                               nsILDAPErrors::NO_MEMORY)
00451 
00452 #define NS_ERROR_LDAP_CONNECT_ERROR \
00453     NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_LDAP, \
00454                               nsILDAPErrors::CONNECT_ERROR)
00455 
00456 #define NS_ERROR_LDAP_NOT_SUPPORTED \
00457     NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_LDAP, \
00458                               nsILDAPErrors::NOT_SUPPORTED)
00459 
00460 #define NS_ERROR_LDAP_CONTROL_NOT_FOUND \
00461     NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_LDAP, \
00462                               nsILDAPErrors::CONTROL_NOT_FOUND)
00463 
00464 #define NS_ERROR_LDAP_NO_RESULTS_RETURNED \
00465     NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_LDAP, \
00466                               nsILDAPErrors::NO_RESULTS_RETURNED)
00467 
00468 #define NS_ERROR_LDAP_MORE_RESULTS_TO_RETURN \
00469     NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_LDAP, \
00470                               nsILDAPErrors::MORE_RESULTS_TO_RETURN)
00471 
00472 #define NS_ERROR_LDAP_CLIENT_LOOP \
00473     NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_LDAP, \
00474                               nsILDAPErrors::CLIENT_LOOP)
00475 
00476 #define NS_ERROR_LDAP_REFERRAL_LIMIT_EXCEEDED \
00477     NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_LDAP, \
00478                               nsILDAPErrors::REFERRAL_LIMIT_EXCEEDED)
00479 
00480 %}