rdf/base/src/nsRDFService.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/rdf/base/src/nsRDFService.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,79 @@
     1.4 +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
     1.5 + *
     1.6 + * This Source Code Form is subject to the terms of the Mozilla Public
     1.7 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.8 + * file, You can obtain one at http://mozilla.org/MPL/2.0/.
     1.9 + *
    1.10 + * This Original Code has been modified by IBM Corporation.
    1.11 + * Modifications made by IBM described herein are
    1.12 + * Copyright (c) International Business Machines
    1.13 + * Corporation, 2000
    1.14 + *
    1.15 + * Modifications to Mozilla code or documentation
    1.16 + * identified per MPL Section 3.3
    1.17 + *
    1.18 + * Date         Modified by     Description of modification
    1.19 + * 03/27/2000   IBM Corp.       Added PR_CALLBACK for Optlink
    1.20 + *                               use in OS2
    1.21 + */
    1.22 +
    1.23 +#ifndef nsRDFService_h__
    1.24 +#define nsRDFService_h__
    1.25 +
    1.26 +#include "nsIRDFService.h"
    1.27 +#include "nsWeakReference.h"
    1.28 +#include "nsIFactory.h"
    1.29 +#include "nsCOMPtr.h"
    1.30 +#include "pldhash.h"
    1.31 +#include "nsString.h"
    1.32 +
    1.33 +struct PLHashTable;
    1.34 +class nsIRDFLiteral;
    1.35 +class nsIRDFInt;
    1.36 +class nsIRDFDate;
    1.37 +class BlobImpl;
    1.38 +
    1.39 +class RDFServiceImpl : public nsIRDFService,
    1.40 +                       public nsSupportsWeakReference
    1.41 +{
    1.42 +protected:
    1.43 +    PLHashTable* mNamedDataSources;
    1.44 +    PLDHashTable mResources;
    1.45 +    PLDHashTable mLiterals;
    1.46 +    PLDHashTable mInts;
    1.47 +    PLDHashTable mDates;
    1.48 +    PLDHashTable mBlobs;
    1.49 +
    1.50 +    nsAutoCString mLastURIPrefix;
    1.51 +    nsCOMPtr<nsIFactory> mLastFactory;
    1.52 +    nsCOMPtr<nsIFactory> mDefaultResourceFactory;
    1.53 +
    1.54 +    RDFServiceImpl();
    1.55 +    nsresult Init();
    1.56 +    virtual ~RDFServiceImpl();
    1.57 +
    1.58 +public:
    1.59 +    static RDFServiceImpl *gRDFService NS_VISIBILITY_HIDDEN;
    1.60 +    static nsresult CreateSingleton(nsISupports* aOuter,
    1.61 +                                    const nsIID& aIID, void **aResult);
    1.62 +
    1.63 +    // nsISupports
    1.64 +    NS_DECL_ISUPPORTS
    1.65 +
    1.66 +    // nsIRDFService
    1.67 +    NS_DECL_NSIRDFSERVICE
    1.68 +
    1.69 +    // Implementation methods
    1.70 +    nsresult RegisterLiteral(nsIRDFLiteral* aLiteral);
    1.71 +    nsresult UnregisterLiteral(nsIRDFLiteral* aLiteral);
    1.72 +    nsresult RegisterInt(nsIRDFInt* aInt);
    1.73 +    nsresult UnregisterInt(nsIRDFInt* aInt);
    1.74 +    nsresult RegisterDate(nsIRDFDate* aDate);
    1.75 +    nsresult UnregisterDate(nsIRDFDate* aDate);
    1.76 +    nsresult RegisterBlob(BlobImpl* aBlob);
    1.77 +    nsresult UnregisterBlob(BlobImpl* aBlob);
    1.78 +
    1.79 +    nsresult GetDataSource(const char *aURI, bool aBlock, nsIRDFDataSource **aDataSource );
    1.80 +};
    1.81 +
    1.82 +#endif // nsRDFService_h__

mercurial