sbPropertyBag.cpp File Reference
#include "sbPropertyBag.h"
#include "sbArray.h"
#include "nsArrayEnumerator.h"
#include "nsComponentManagerUtils.h"
#include "nsIVariant.h"
#include "nsIProperty.h"
Include dependency graph for sbPropertyBag.cpp:

Go to the source code of this file.

Classes

class  nsSimpleProperty
 

Macros

#define IMPL_GETSETPROPERTY_AS(Name, Type)
 

Functions

nsresult SB_NewHashPropertyBag (nsIWritablePropertyBag **_retval)
 
 PropertyHashToArrayFunc (const nsAString &aKey, nsIVariant *aData, void *userArg)
 

Macro Definition Documentation

#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); \
if (!v) \
return NS_ERROR_NOT_AVAILABLE; \
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); \
if (!var) \
return NS_ERROR_OUT_OF_MEMORY; \
var->SetAs ## Name(value); \
return SetProperty(prop, var); \
}
return
Definition: FeedWriter.js:850
countRef value
Definition: FeedWriter.js:1423
if(DEBUG_DATAREMOTES)

Definition at line 208 of file sbPropertyBag.cpp.

Function Documentation

PropertyHashToArrayFunc ( const nsAString &  aKey,
nsIVariant *  aData,
void *  userArg 
)

Definition at line 181 of file sbPropertyBag.cpp.

nsresult SB_NewHashPropertyBag ( nsIWritablePropertyBag **  _retval)

Definition at line 48 of file sbPropertyBag.cpp.

Here is the call graph for this function: