rdf/base/src/nsRDFService.h

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
     2  *
     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/.
     6  *
     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
    11  *
    12  * Modifications to Mozilla code or documentation
    13  * identified per MPL Section 3.3
    14  *
    15  * Date         Modified by     Description of modification
    16  * 03/27/2000   IBM Corp.       Added PR_CALLBACK for Optlink
    17  *                               use in OS2
    18  */
    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 : public nsIRDFService,
    37                        public nsSupportsWeakReference
    38 {
    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 );
    77 };
    79 #endif // nsRDFService_h__

mercurial