/* -*- IDL -*- * Copyright (C) 2001-2002, Christof Meerwald * http://JabXPCOM.sunsite.dk/ */ /* * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation * files (the "Software"), to deal in the Software without * restriction, including without limitation the rights to use, copy, * modify, merge, publish, distribute, sublicense, and/or sell copies * of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #ifndef IDL__JUDOXPCOM__INCLUDED #define IDL__JUDOXPCOM__INCLUDED #include "nsISupports.idl" typedef unsigned long NodeType; [scriptable, uuid(ed8ac286-ee3e-48da-8da0-be71f320a5e8)] interface judoINode : nsISupports { const NodeType ntElement = 0; const NodeType ntCDATA = 1; readonly attribute NodeType type; readonly attribute AUTF8String name; AUTF8String toXML(); }; [scriptable, uuid(ee823fde-16c4-4b2b-9259-14e1e7da2d9f)] interface judoIConstCDATA : judoINode { readonly attribute AUTF8String text; }; [scriptable, uuid(f41b335b-e818-4a0e-b9c4-d9f774d547f1)] interface judoICDATA : judoIConstCDATA { void setText(in AUTF8String text); void appendText(in AUTF8String text); }; // forward decl interface judoIElement; [scriptable, uuid(9fe71d43-9388-4c6d-82e5-1fb4f071ad38)] interface judoIConstElement : judoINode { AUTF8String getAttrib(in AUTF8String name); boolean cmpAttrib(in AUTF8String name, in AUTF8String value); AUTF8String getCDATA(); judoIConstElement findElement(in AUTF8String name); void findElements(in AUTF8String name, [array, size_is(elem_len)] out judoIConstElement elem, out unsigned long elem_len); void getElements([array, size_is(elem_len)] out judoIConstElement elem, out unsigned long elem_len); boolean empty(); long size(); }; [scriptable, uuid(678e2664-4804-4d55-a42d-8bdafed57a3a)] interface judoIElement : judoIConstElement { judoIElement addElement(in AUTF8String name); judoICDATA addCDATA(in AUTF8String pCDATA); void putAttrib(in AUTF8String name, in AUTF8String value); void delAttrib(in AUTF8String name); }; #endif