STDMETHODIMP CAvatarProfileObject::Reset(void)
{
	HRESULT	hr = S_OK;

	SAFERELEASE(m_pBannedObjects);
	SAFERELEASE(m_pKeys);

	// banned objects
	if (m_pWorld == NULL)
		return VWOBJECT_E_INVALIDWORLD;

	hr = CreatePropertyList(m_pWorld, &m_pBannedObjects);
	if (FAILED(hr) || (!m_pBannedObjects))
		goto ERROR_ENCOUNTERED;

	// keys - the actual values
	hr = CreatePropertyMap(m_pWorld, &m_pKeys);
	if (FAILED(hr) || (!m_pKeys))
		goto ERROR_ENCOUNTERED;

ERROR_ENCOUNTERED:
	if (FAILED(hr))
	{
		SAFERELEASE(m_pBannedObjects);
		SAFERELEASE(m_pKeys);
	}

	return hr;
}
void CreatePropertyMap( Actor actor, Property::Map& map )
{
  map.Clear();

  if ( actor )
  {
    map[ "type" ] = actor.GetTypeName();

    // Default properties
    Property::IndexContainer indices;
    actor.GetPropertyIndices( indices );
    const Property::IndexContainer::ConstIterator endIter = indices.End();

    for ( Property::IndexContainer::Iterator iter = indices.Begin(); iter != endIter; ++iter )
    {
      map[ actor.GetPropertyName( *iter ) ] = actor.GetProperty( *iter );
    }

    // Children
    unsigned int childCount( actor.GetChildCount() );
    if ( childCount )
    {
      Property::Array childArray;
      for ( unsigned int child = 0; child < childCount; ++child )
      {
        Property::Map childMap;
        CreatePropertyMap( actor.GetChildAt( child ), childMap );
        childArray.PushBack( childMap );
      }
      map[ "actors" ] = childArray;
    }
  }
}
HRESULT _AddMapKey(IWorld *pWorld, IAvatarProfile *pProfile, BSTR bstrKey, IThing *pOwner)
{
	HRESULT hr = S_OK;
	IPropertyMap *pMap = NULL;

	hr = CreatePropertyMap(pWorld, &pMap);
	if (FAILED(hr))
		goto CLEAN_UP;

	hr = pProfile->AddKey(bstrKey, CComVariant(pMap), kVarNone, CComVariant(kKeyPublic), CComVariant(pOwner));

CLEAN_UP:
	SAFERELEASE(pMap);

	return hr;
}
	CamSettingsPage::CamSettingsPage( CameraBase* pCamera, Glib::RefPtr<Gnome::Glade::Xml> refXml ) : BasePage( pCamera, refXml )
	{
        m_absMode = true;

        CreatePropertyMap();
	}
	CamSettingsPage::CamSettingsPage()
	{	
        m_absMode = true;

        CreatePropertyMap();
	}