Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /* This Source Code Form is subject to the terms of the Mozilla Public
3 : * License, v. 2.0. If a copy of the MPL was not distributed with this
4 : * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 :
6 : /*
7 :
8 : An RDF-specific content sink. The content sink is targeted by the
9 : parser for building the RDF content model.
10 :
11 : */
12 :
13 : #ifndef nsIRDFContentSink_h___
14 : #define nsIRDFContentSink_h___
15 :
16 : #include "nsIXMLContentSink.h"
17 : class nsIRDFDataSource;
18 : class nsIURI;
19 :
20 : // {3a7459d7-d723-483c-aef0-404fc48e09b8}
21 : #define NS_IRDFCONTENTSINK_IID \
22 : { 0x3a7459d7, 0xd723, 0x483c, { 0xae, 0xf0, 0x40, 0x4f, 0xc4, 0x8e, 0x09, 0xb8 } }
23 :
24 : /**
25 : * This interface represents a content sink for RDF files.
26 : */
27 :
28 0 : class nsIRDFContentSink : public nsIXMLContentSink {
29 : public:
30 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_IRDFCONTENTSINK_IID)
31 :
32 : /**
33 : * Initialize the content sink.
34 : */
35 : NS_IMETHOD Init(nsIURI* aURL) = 0;
36 :
37 : /**
38 : * Set the content sink's RDF Data source
39 : */
40 : NS_IMETHOD SetDataSource(nsIRDFDataSource* aDataSource) = 0;
41 :
42 : /**
43 : * Retrieve the content sink's RDF data source.
44 : */
45 : NS_IMETHOD GetDataSource(nsIRDFDataSource*& rDataSource) = 0;
46 : };
47 :
48 : NS_DEFINE_STATIC_IID_ACCESSOR(nsIRDFContentSink, NS_IRDFCONTENTSINK_IID)
49 :
50 : /**
51 : * This constructs a content sink that can be used without a
52 : * document, say, to create a stand-alone in-memory graph.
53 : */
54 : nsresult
55 : NS_NewRDFContentSink(nsIRDFContentSink** aResult);
56 :
57 : class nsRDFAtoms {
58 : public:
59 : static void RegisterAtoms();
60 : };
61 :
62 : #endif // nsIRDFContentSink_h___
|