Bumping gaia.json for 2 gaia revision(s) a=gaia-bump
[gecko.git] / rdf / base / nsRDFService.h
blobe42bc6ccb8d955a726560ebf0648fa15197edbfa
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
3 * This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
7 * This Original Code has been modified by IBM Corporation.
8 * Modifications made by IBM described herein are
9 * Copyright (c) International Business Machines
10 * Corporation, 2000
12 * Modifications to Mozilla code or documentation
13 * identified per MPL Section 3.3
15 * Date Modified by Description of modification
16 * 03/27/2000 IBM Corp. Added PR_CALLBACK for Optlink
17 * use in OS2
20 #ifndef nsRDFService_h__
21 #define nsRDFService_h__
23 #include "nsIRDFService.h"
24 #include "nsWeakReference.h"
25 #include "nsIFactory.h"
26 #include "nsCOMPtr.h"
27 #include "pldhash.h"
28 #include "nsString.h"
30 struct PLHashTable;
31 class nsIRDFLiteral;
32 class nsIRDFInt;
33 class nsIRDFDate;
34 class BlobImpl;
36 class RDFServiceImpl MOZ_FINAL : public nsIRDFService,
37 public nsSupportsWeakReference
39 protected:
40 PLHashTable* mNamedDataSources;
41 PLDHashTable mResources;
42 PLDHashTable mLiterals;
43 PLDHashTable mInts;
44 PLDHashTable mDates;
45 PLDHashTable mBlobs;
47 nsAutoCString mLastURIPrefix;
48 nsCOMPtr<nsIFactory> mLastFactory;
49 nsCOMPtr<nsIFactory> mDefaultResourceFactory;
51 RDFServiceImpl();
52 nsresult Init();
53 virtual ~RDFServiceImpl();
55 public:
56 static RDFServiceImpl *gRDFService NS_VISIBILITY_HIDDEN;
57 static nsresult CreateSingleton(nsISupports* aOuter,
58 const nsIID& aIID, void **aResult);
60 // nsISupports
61 NS_DECL_ISUPPORTS
63 // nsIRDFService
64 NS_DECL_NSIRDFSERVICE
66 // Implementation methods
67 nsresult RegisterLiteral(nsIRDFLiteral* aLiteral);
68 nsresult UnregisterLiteral(nsIRDFLiteral* aLiteral);
69 nsresult RegisterInt(nsIRDFInt* aInt);
70 nsresult UnregisterInt(nsIRDFInt* aInt);
71 nsresult RegisterDate(nsIRDFDate* aDate);
72 nsresult UnregisterDate(nsIRDFDate* aDate);
73 nsresult RegisterBlob(BlobImpl* aBlob);
74 nsresult UnregisterBlob(BlobImpl* aBlob);
76 nsresult GetDataSource(const char *aURI, bool aBlock, nsIRDFDataSource **aDataSource );
79 #endif // nsRDFService_h__