27 #ifndef __SB_IPD_PROPERTIES_H__
28 #define __SB_IPD_PROPERTIES_H__
53 #include <sbIDeviceProperties.h>
56 #include <nsAutoPtr.h>
57 #include <nsIWritablePropertyBag.h>
58 #include <nsIWritablePropertyBag2.h>
76 #define SBIPD_FORWARD_SAFE_NSIWRITABLEPROPERTYBAG2_SET(aObj, aMethod, aType) \
77 NS_IMETHOD aMethod(const nsAString& aName, aType aValue) \
79 return !aObj ? NS_ERROR_NULL_POINTER : \
80 aObj->SetProperty(aName, sbIPDVariant(aValue).get()); \
95 #define SBIPD_FORWARD_SAFE_NSIWRITABLEPROPERTYBAG2_SET_VTYPE(aObj, \
99 NS_IMETHOD aMethod(const nsAString& aName, aType aValue) \
101 return !aObj ? NS_ERROR_NULL_POINTER : \
102 aObj->SetProperty(aName, sbIPDVariant(aValue, aVType).get()); \
112 #define SBIPD_FORWARD_SAFE_NSIWRITABLEPROPERTYBAG2(aObj) \
113 SBIPD_FORWARD_SAFE_NSIWRITABLEPROPERTYBAG2_SET(aObj, \
114 SetPropertyAsInt32, \
116 SBIPD_FORWARD_SAFE_NSIWRITABLEPROPERTYBAG2_SET(aObj, \
117 SetPropertyAsUint32, \
119 SBIPD_FORWARD_SAFE_NSIWRITABLEPROPERTYBAG2_SET(aObj, \
120 SetPropertyAsInt64, \
122 SBIPD_FORWARD_SAFE_NSIWRITABLEPROPERTYBAG2_SET(aObj, \
123 SetPropertyAsUint64, \
125 SBIPD_FORWARD_SAFE_NSIWRITABLEPROPERTYBAG2_SET(aObj, \
126 SetPropertyAsDouble, \
128 SBIPD_FORWARD_SAFE_NSIWRITABLEPROPERTYBAG2_SET(aObj, \
129 SetPropertyAsAString, \
131 SBIPD_FORWARD_SAFE_NSIWRITABLEPROPERTYBAG2_SET(aObj, \
132 SetPropertyAsACString, \
134 SBIPD_FORWARD_SAFE_NSIWRITABLEPROPERTYBAG2_SET_VTYPE \
136 SetPropertyAsAUTF8String, \
138 nsIDataType::VTYPE_UTF8STRING) \
139 SBIPD_FORWARD_SAFE_NSIWRITABLEPROPERTYBAG2_SET_VTYPE \
143 nsIDataType::VTYPE_BOOL) \
144 SBIPD_FORWARD_SAFE_NSIWRITABLEPROPERTYBAG2_SET(aObj, \
145 SetPropertyAsInterface, \
156 public nsIWritablePropertyBag,
157 public nsIWritablePropertyBag2
172 NS_DECL_SBIDEVICEPROPERTIES
173 NS_DECL_NSIWRITABLEPROPERTYBAG
180 NS_FORWARD_SAFE_NSIPROPERTYBAG(mProperties)
181 NS_FORWARD_SAFE_NSIPROPERTYBAG2(mProperties2)
218 nsCOMPtr<nsIWritablePropertyBag>
220 nsCOMPtr<nsIWritablePropertyBag2>
225 #endif // __SB_IPD_PROPERTIES_H__
Songbird iPod Device Utility Definitions.
#define SBIPD_FORWARD_SAFE_NSIWRITABLEPROPERTYBAG2(aObj)
nsresult SetPropertyInternal(const nsAString &aName, nsIVariant *aValue)