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
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
20 #ifndef nsRDFService_h__
21 #define nsRDFService_h__
23 #include "nsIRDFService.h"
24 #include "nsWeakReference.h"
25 #include "nsIFactory.h"
36 class RDFServiceImpl
: public nsIRDFService
,
37 public nsSupportsWeakReference
40 PLHashTable
* mNamedDataSources
;
41 PLDHashTable mResources
;
42 PLDHashTable mLiterals
;
47 nsAutoCString mLastURIPrefix
;
48 nsCOMPtr
<nsIFactory
> mLastFactory
;
49 nsCOMPtr
<nsIFactory
> mDefaultResourceFactory
;
53 virtual ~RDFServiceImpl();
56 static RDFServiceImpl
*gRDFService NS_VISIBILITY_HIDDEN
;
57 static nsresult
CreateSingleton(nsISupports
* aOuter
,
58 const nsIID
& aIID
, void **aResult
);
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__