#include "sbPropertyBag.h"
#include "sbArray.h"
#include "nsArrayEnumerator.h"
#include "nsComponentManagerUtils.h"
#include "nsIVariant.h"
#include "nsIProperty.h"
Go to the source code of this file.
#define IMPL_GETSETPROPERTY_AS |
( |
|
Name, |
|
|
|
Type |
|
) |
| |
Value:NS_IMETHODIMP \
sbPropertyBag::GetPropertyAs ## Name (const nsAString & prop, Type *_retval) \
{ \
nsCOMPtr<nsIVariant> v; \
nsresult rv = mPropertyHash.Get(prop, getter_AddRefs(v)); \
NS_ENSURE_SUCCESS(rv, rv);
\
return v->GetAs ## Name(_retval); \
} \
\
NS_IMETHODIMP \
sbPropertyBag::SetPropertyAs ## Name (
const nsAString & prop, Type
value) \
{ \
nsresult rv; \
nsCOMPtr<nsIWritableVariant> var = \
do_CreateInstance("@songbirdnest.com/Songbird/Variant;1", &rv); \
NS_ENSURE_SUCCESS(rv, rv);
\
return NS_ERROR_OUT_OF_MEMORY; \
return SetProperty(prop, var); \
}
Definition at line 208 of file sbPropertyBag.cpp.
PropertyHashToArrayFunc |
( |
const nsAString & |
aKey, |
|
|
nsIVariant * |
aData, |
|
|
void * |
userArg |
|
) |
| |
nsresult SB_NewHashPropertyBag |
( |
nsIWritablePropertyBag ** |
_retval | ) |
|