1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /* ***** BEGIN LICENSE BLOCK *****
3 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
5 * The contents of this file are subject to the Mozilla Public License Version
6 * 1.1 (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
8 * http://www.mozilla.org/MPL/
10 * Software distributed under the License is distributed on an "AS IS" basis,
11 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 * for the specific language governing rights and limitations under the
15 * The Original Code is mozilla.org code.
17 * The Initial Developer of the Original Code is
18 * Netscape Communications Corporation.
19 * Portions created by the Initial Developer are Copyright (C) 1998
20 * the Initial Developer. All Rights Reserved.
24 * Alternatively, the contents of this file may be used under the terms of
25 * either of the GNU General Public License Version 2 or later (the "GPL"),
26 * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
27 * in which case the provisions of the GPL or the LGPL are applicable instead
28 * of those above. If you wish to allow use of your version of this file only
29 * under the terms of either the GPL or the LGPL, and not to allow others to
30 * use your version of this file under the terms of the MPL, indicate your
31 * decision by deleting the provisions above and replace them with the notice
32 * and other provisions required by the GPL or the LGPL. If you do not delete
33 * the provisions above, a recipient may use your version of this file under
34 * the terms of any one of the MPL, the GPL or the LGPL.
36 * ***** END LICENSE BLOCK ***** */
38 #ifndef __gen_nsRDFDOMDataSource_h__
39 #define __gen_nsRDFDOMDataSource_h__
41 #include "nsRDFDOMDataSource.h"
43 /* starting interface: nsRDFDOMDataSource */
45 /* {0F78DA58-8321-11d2-8EAC-00805F29F370} */
46 #define NS_IRDFDATASOURCE_IID_STR "0F78DA58-8321-11d2-8EAC-00805F29F370"
47 #define NS_IRDFDATASOURCE_IID \
48 {0x0F78DA58, 0x8321, 0x11d2, \
49 { 0x8E, 0xAC, 0x00, 0x80, 0x5F, 0x29, 0xF3, 0x70 }}
51 class nsRDFDOMDataSource
: public nsISupports
{
53 NS_DECLARE_STATIC_IID_ACCESSOR(NS_IRDFDATASOURCE_IID
)
55 /* void Init (in string uri); */
56 NS_IMETHOD
Init(const char *uri
) = 0;
58 /* readonly attribute string URI; */
59 NS_IMETHOD
GetURI(char * *aURI
) = 0;
61 /* nsIRDFResource GetSource (in nsIRDFResource aProperty, in nsIRDFNode aTarget, in boolean aTruthValue); */
62 NS_IMETHOD
GetSource(nsIRDFResource
*aProperty
, nsIRDFNode
*aTarget
, PRBool aTruthValue
, nsIRDFResource
**_retval
) = 0;
64 /* nsISimpleEnumerator GetSources (in nsIRDFResource aProperty, in nsIRDFNode aTarget, in boolean aTruthValue); */
65 NS_IMETHOD
GetSources(nsIRDFResource
*aProperty
, nsIRDFNode
*aTarget
, PRBool aTruthValue
, nsISimpleEnumerator
**_retval
) = 0;
67 /* nsIRDFNode GetTarget (in nsIRDFResource aSource, in nsIRDFResource aProperty, in boolean aTruthValue); */
68 NS_IMETHOD
GetTarget(nsIRDFResource
*aSource
, nsIRDFResource
*aProperty
, PRBool aTruthValue
, nsIRDFNode
**_retval
) = 0;
70 /* nsISimpleEnumerator GetTargets (in nsIRDFResource aSource, in nsIRDFResource aProperty, in boolean aTruthValue); */
71 NS_IMETHOD
GetTargets(nsIRDFResource
*aSource
, nsIRDFResource
*aProperty
, PRBool aTruthValue
, nsISimpleEnumerator
**_retval
) = 0;
73 /* void Assert (in nsIRDFResource aSource, in nsIRDFResource aProperty, in nsIRDFNode aTarget, in boolean aTruthValue); */
74 NS_IMETHOD
Assert(nsIRDFResource
*aSource
, nsIRDFResource
*aProperty
, nsIRDFNode
*aTarget
, PRBool aTruthValue
) = 0;
76 /* void Unassert (in nsIRDFResource aSource, in nsIRDFResource aProperty, in nsIRDFNode aTarget); */
77 NS_IMETHOD
Unassert(nsIRDFResource
*aSource
, nsIRDFResource
*aProperty
, nsIRDFNode
*aTarget
) = 0;
79 /* boolean HasAssertion (in nsIRDFResource aSource, in nsIRDFResource aProperty, in nsIRDFNode aTarget, in boolean aTruthValue); */
80 NS_IMETHOD
HasAssertion(nsIRDFResource
*aSource
, nsIRDFResource
*aProperty
, nsIRDFNode
*aTarget
, PRBool aTruthValue
, PRBool
*_retval
) = 0;
82 /* void AddObserver (in nsIRDFObserver aObserver); */
83 NS_IMETHOD
AddObserver(nsIRDFObserver
*aObserver
) = 0;
85 /* void RemoveObserver (in nsIRDFObserver aObserver); */
86 NS_IMETHOD
RemoveObserver(nsIRDFObserver
*aObserver
) = 0;
88 /* nsISimpleEnumerator ArcLabelsIn (in nsIRDFNode aNode); */
89 NS_IMETHOD
ArcLabelsIn(nsIRDFNode
*aNode
, nsISimpleEnumerator
**_retval
) = 0;
91 /* nsISimpleEnumerator ArcLabelsOut (in nsIRDFResource aSource); */
92 NS_IMETHOD
ArcLabelsOut(nsIRDFResource
*aSource
, nsISimpleEnumerator
**_retval
) = 0;
94 /* nsISimpleEnumerator GetAllResources (); */
95 NS_IMETHOD
GetAllResources(nsISimpleEnumerator
**_retval
) = 0;
98 NS_IMETHOD
Flush() = 0;
100 /* nsISimpleEnumerator GetAllCmds (in nsIRDFResource aSource); */
101 NS_IMETHOD
GetAllCmds(nsIRDFResource
*aSource
, nsISimpleEnumerator
**_retval
) = 0;
103 /* boolean IsCommandEnabled (in nsISupportsArray aSources, in nsIRDFResource aCommand, in nsISupportsArray aArguments); */
104 NS_IMETHOD
IsCommandEnabled(nsISupportsArray
* aSources
, nsIRDFResource
*aCommand
, nsISupportsArray
* aArguments
, PRBool
*_retval
) = 0;
106 /* void DoCommand (in nsISupportsArray aSources, in nsIRDFResource aCommand, in nsISupportsArray aArguments); */
107 NS_IMETHOD
DoCommand(nsISupportsArray
* aSources
, nsIRDFResource
*aCommand
, nsISupportsArray
* aArguments
) = 0;
109 /* void beginUpdateBatch (); */
110 NS_IMETHOD
BeginUpdateBatch() = 0;
112 /* void endUpdateBatch (); */
113 NS_IMETHOD
EndUpdateBatch() = 0;
116 NS_DEFINE_STATIC_IID_ACCESSOR(nsRDFDOMDataSource
, NS_IRDFDATASOURCE_IID
)
118 #endif /* __gen_nsRDFDOMDataSource_h__ */