rdf/util/public/nsRDFResource.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: 2; 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/. */
     6 #ifndef nsRDFResource_h__
     7 #define nsRDFResource_h__
     9 #include "nsCOMPtr.h"
    10 #include "nsIRDFNode.h"
    11 #include "nsIRDFResource.h"
    12 #include "nscore.h"
    13 #include "nsStringGlue.h"
    14 #include "rdf.h"
    16 class nsIRDFService;
    18 /**
    19  * This simple base class implements nsIRDFResource, and can be used as a
    20  * superclass for more sophisticated resource implementations.
    21  */
    22 class nsRDFResource : public nsIRDFResource {
    23 public:
    25     NS_DECL_THREADSAFE_ISUPPORTS
    27     // nsIRDFNode methods:
    28     NS_IMETHOD EqualsNode(nsIRDFNode* aNode, bool* aResult);
    30     // nsIRDFResource methods:
    31     NS_IMETHOD Init(const char* aURI);
    32     NS_IMETHOD GetValue(char* *aURI);
    33     NS_IMETHOD GetValueUTF8(nsACString& aResult);
    34     NS_IMETHOD GetValueConst(const char** aURI);
    35     NS_IMETHOD EqualsString(const char* aURI, bool* aResult);
    36     NS_IMETHOD GetDelegate(const char* aKey, REFNSIID aIID, void** aResult);
    37     NS_IMETHOD ReleaseDelegate(const char* aKey);
    39     // nsRDFResource methods:
    40     nsRDFResource(void);
    41     virtual ~nsRDFResource(void);
    43 protected:
    44     static nsIRDFService* gRDFService;
    45     static nsrefcnt gRDFServiceRefCnt;
    47 protected:
    48     nsCString mURI;
    50     struct DelegateEntry {
    51         nsCString             mKey;
    52         nsCOMPtr<nsISupports> mDelegate;
    53         DelegateEntry*        mNext;
    54     };
    56     DelegateEntry* mDelegates;
    57 };
    59 #endif // nsRDFResource_h__

mercurial