25 #ifndef nsDataRemoteWrapper_h__
26 #define nsDataRemoteWrapper_h__
28 #include <nsIClassInfo.h>
29 #include <nsIObserver.h>
31 #include <nsStringGlue.h>
32 #include <sbIDataRemote.h>
33 #include <sbPIDataRemote2.h>
34 #include <nsComponentManagerUtils.h>
37 #define SB_DATAREMOTEWRAPPER_CLASSNAME \
38 "Songbird Data Remote Wrapper Instance"
41 #define SB_DATAREMOTEWRAPPER_CID \
42 { 0x1cb891b0, 0xe9c5, 0x11dd, \
43 { 0xba, 0x2f, 0xd1, 0x08, 0x02, 0x00, 0xc9, 0x66 } }
45 #define SB_DATAREMOTEWRAPPER_CONTRACTID \
46 "@songbirdnest.com/Songbird/DataRemote;1"
48 #define NS_FORWARD_SOME_SBIDATAREMOTE_METHODS(_to) \
49 NS_SCRIPTABLE NS_IMETHOD Init(const nsAString & aKey, const nsAString & aRoot) { return !_to ? NS_ERROR_NULL_POINTER : _to->Init(aKey, aRoot); } \
50 NS_SCRIPTABLE NS_IMETHOD BindProperty(nsIDOMElement *aElement, const nsAString & aProperty, PRBool aIsBool, PRBool aIsNot, const nsAString & aEvalString) { return !_to ? NS_ERROR_NULL_POINTER : _to->BindProperty(aElement, aProperty, aIsBool, aIsNot, aEvalString); } \
51 NS_SCRIPTABLE NS_IMETHOD BindAttribute(nsIDOMElement *aElement, const nsAString & aProperty, PRBool aIsBool, PRBool aIsNot, const nsAString & aEvalString) { return !_to ? NS_ERROR_NULL_POINTER : _to->BindAttribute(aElement, aProperty, aIsBool, aIsNot, aEvalString); } \
52 NS_SCRIPTABLE NS_IMETHOD DeleteBranch() { return !_to ? NS_ERROR_NULL_POINTER : _to->DeleteBranch(); }
90 NS_SCRIPTABLE NS_IMETHOD
Unbind(
void);
94 NS_SCRIPTABLE NS_IMETHOD
SetStringValue(const nsAString & aStringValue);
95 NS_SCRIPTABLE NS_IMETHOD
GetBoolValue(PRBool *aBoolValue);
96 NS_SCRIPTABLE NS_IMETHOD
SetBoolValue(PRBool aBoolValue);
97 NS_SCRIPTABLE NS_IMETHOD
GetIntValue(PRInt64 *aIntValue);
98 NS_SCRIPTABLE NS_IMETHOD
SetIntValue(PRInt64 aIntValue);
NS_SCRIPTABLE NS_IMETHOD BindObserver(nsIObserver *aObserver, PRBool aSuppressFirst)
An additional interface for accessing dataremote values. Adds the ability to access values via method...
An interface for accessing, and binding to, stored data.
NS_SCRIPTABLE NS_IMETHOD GetStringValue(nsAString &aStringValue)
NS_SCRIPTABLE NS_IMETHOD SetIntValue(PRInt64 aIntValue)
NS_SCRIPTABLE NS_IMETHOD GetIntValue(PRInt64 *aIntValue)
#define NS_FORWARD_SOME_SBIDATAREMOTE_METHODS(_to)
NS_SCRIPTABLE NS_IMETHOD Unbind(void)
NS_SCRIPTABLE NS_IMETHOD BindRemoteObserver(sbIRemoteObserver *aObserver, PRBool aSuppressFirst)
NS_SCRIPTABLE NS_IMETHOD SetBoolValue(PRBool aBoolValue)
NS_SCRIPTABLE NS_IMETHOD GetBoolValue(PRBool *aBoolValue)
NS_SCRIPTABLE NS_IMETHOD SetStringValue(const nsAString &aStringValue)
Lightweight Observer style interface for use with sbIRemotePlayer::addListener.