Back to index

lightning-sunbird  0.9+nobinonly
nsISchemaLoader.idl
Go to the documentation of this file.
00001 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
00002 /* ***** BEGIN LICENSE BLOCK *****
00003  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
00004  *
00005  * The contents of this file are subject to the Mozilla Public License Version
00006  * 1.1 (the "License"); you may not use this file except in compliance with
00007  * the License. You may obtain a copy of the License at
00008  * http://www.mozilla.org/MPL/
00009  *
00010  * Software distributed under the License is distributed on an "AS IS" basis,
00011  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
00012  * for the specific language governing rights and limitations under the
00013  * License.
00014  *
00015  * The Original Code is Mozilla.
00016  *
00017  * The Initial Developer of the Original Code is
00018  * Netscape Communications.
00019  * Portions created by the Initial Developer are Copyright (C) 2001
00020  * the Initial Developer. All Rights Reserved.
00021  *
00022  * Contributor(s):
00023  *   Vidur Apparao <vidur@netscape.com> (original author)
00024  *
00025  * Alternatively, the contents of this file may be used under the terms of
00026  * either the GNU General Public License Version 2 or later (the "GPL"), or
00027  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
00028  * in which case the provisions of the GPL or the LGPL are applicable instead
00029  * of those above. If you wish to allow use of your version of this file only
00030  * under the terms of either the GPL or the LGPL, and not to allow others to
00031  * use your version of this file under the terms of the MPL, indicate your
00032  * decision by deleting the provisions above and replace them with the notice
00033  * and other provisions required by the GPL or the LGPL. If you do not delete
00034  * the provisions above, a recipient may use your version of this file under
00035  * the terms of any one of the MPL, the GPL or the LGPL.
00036  *
00037  * ***** END LICENSE BLOCK ***** */
00038 
00039 #include "nsISupports.idl"
00040 #include "nsIWebServiceErrorHandler.idl"
00041 
00042 interface nsISchema;
00043 interface nsISchemaType;
00044 interface nsIDOMElement;
00045 interface nsISchemaLoadListener;
00046 
00047 [scriptable, uuid(9B2F0B4A-8F00-4a78-961A-7E84ED49B0B6)]
00048 interface nsISchemaLoader : nsISupports {
00049   nsISchema load(in AString schemaURI);
00050   void loadAsync(in AString schemaURI, 
00051                  in nsISchemaLoadListener listener);
00052   nsISchema processSchemaElement(in nsIDOMElement element,
00053                                  in nsIWebServiceErrorHandler aErrorHandler);
00054 };
00055 
00056 [scriptable, function, uuid(8d9aa9ce-e191-11d8-9f31-000393b6661a)]
00057 interface nsISchemaLoadListener : nsIWebServiceErrorHandler {
00058   void onLoad(in nsISchema schema);
00059 };
00060 
00061 %{ C++
00062 #define NS_SCHEMALOADER_CID                           \
00063 { /* 5adc10f0-74e1-11d5-9b49-00104bdf5339 */          \
00064  0x5adc10f0, 0x74e1, 0x11d5,                          \
00065 {0x9b, 0x49, 0x00, 0x10, 0x4b, 0xdf, 0x53, 0x39}}     
00066 
00067 #define NS_SCHEMALOADER_CONTRACTID "@mozilla.org/xmlextras/schemas/schemaloader;1"
00068 
00069 #define NS_BUILTINSCHEMACOLLECTION_CID                \
00070 { /* a83b0823-f10e-4235-9859-88a5abd2ed54 */          \
00071  0xa83b0823, 0xf10e, 0x4235,                          \
00072 {0x98, 0x59, 0x88, 0xa5, 0xab, 0xd2, 0xed, 0x54}}
00073 
00074 #define NS_BUILTINSCHEMACOLLECTION_CONTRACTID "@mozilla.org/xmlextras/schemas/builtinschemacollection;1"
00075 
00076 #define NS_ERROR_SCHEMA_NOT_SCHEMA_ELEMENT NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_GENERAL, 1)
00077 #define NS_ERROR_SCHEMA_UNKNOWN_TARGET_NAMESPACE NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_GENERAL, 2)
00078 #define NS_ERROR_SCHEMA_UNKNOWN_TYPE NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_GENERAL, 3)
00079 #define NS_ERROR_SCHEMA_UNKNOWN_PREFIX NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_GENERAL, 4)
00080 #define NS_ERROR_SCHEMA_INVALID_STRUCTURE NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_GENERAL, 5)
00081 #define NS_ERROR_SCHEMA_INVALID_TYPE_USAGE NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_GENERAL, 6)
00082 #define NS_ERROR_SCHEMA_MISSING_TYPE NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_GENERAL, 7)
00083 #define NS_ERROR_SCHEMA_FACET_VALUE_ERROR NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_GENERAL, 8)
00084 #define NS_ERROR_SCHEMA_LOADING_ERROR NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_GENERAL, 9)
00085 %}