LLXMLNode *LLVolumeXml::exportProfileParams(const LLProfileParams* params)
{
	LLXMLNode *ret = new LLXMLNode("profile", FALSE);

	ret->createChild("curve_type", TRUE)->setByteValue(1, &params->getCurveType());
	ret->createChild("interval", FALSE)->setFloatValue(2, &params->getBegin());
	ret->createChild("hollow", FALSE)->setFloatValue(1, &params->getHollow());

	return ret;
}
Beispiel #2
0
LLXMLNode *LLInventoryItem::exportFileXML(BOOL include_asset_key) const
{
	LLMemType m1(LLMemType::MTYPE_INVENTORY);
	LLXMLNode *ret = new LLXMLNode("item", FALSE);

	ret->createChild("uuid", TRUE)->setUUIDValue(1, &mUUID);
	ret->createChild("parent_uuid", TRUE)->setUUIDValue(1, &mParentUUID);

	mPermissions.exportFileXML()->setParent(ret);

	// Check for permissions to see the asset id, and if so write it
	// out as an asset id. Otherwise, apply our cheesy encryption.
	if(include_asset_key)
	{
		U32 mask = mPermissions.getMaskBase();
		if(((mask & PERM_ITEM_UNRESTRICTED) == PERM_ITEM_UNRESTRICTED)
		   || (mAssetUUID.isNull()))
		{
			ret->createChild("asset_id", FALSE)->setUUIDValue(1, &mAssetUUID);
		}
		else
		{
			LLUUID shadow_id(mAssetUUID);
			LLXORCipher cipher(MAGIC_ID.mData, UUID_BYTES);
			cipher.encrypt(shadow_id.mData, UUID_BYTES);

			ret->createChild("shadow_id", FALSE)->setUUIDValue(1, &shadow_id);
		}
	}

	std::string type_str = LLAssetType::lookup(mType);
	std::string inv_type_str = LLInventoryType::lookup(mInventoryType);

	ret->createChild("asset_type", FALSE)->setStringValue(type_str);
	ret->createChild("inventory_type", FALSE)->setStringValue(inv_type_str);
	S32 tmp_flags = (S32) mFlags;
	ret->createChild("flags", FALSE)->setByteValue(4, (U8*)(&tmp_flags), LLXMLNode::ENCODING_HEX);

	mSaleInfo.exportFileXML()->setParent(ret);

	std::string temp;
	temp.assign(mName);
	ret->createChild("name", FALSE)->setStringValue(temp);
	temp.assign(mDescription);
	ret->createChild("description", FALSE)->setStringValue(temp);
	S32 date = mCreationDate;
	ret->createChild("creation_date", FALSE)->setIntValue(1, &date);

	return ret;
}
Beispiel #3
0
LLXMLNode *LLSaleInfo::exportFileXML() const
{
	LLXMLNode *ret = new LLXMLNode("sale_info", FALSE);
	LLString type_str = lookup(mSaleType);
	ret->createChild("type", TRUE)->setStringValue(1, &type_str);
	ret->createChild("price", TRUE)->setIntValue(1, &mSalePrice);
	return ret;
}
LLXMLNode *LLVolumeXml::exportPathParams(const LLPathParams* params)
{
	LLXMLNode *ret = new LLXMLNode("path", FALSE); 
	ret->createChild("curve_type", TRUE)->setByteValue(1, &params->getCurveType());
	ret->createChild("interval", FALSE)->setFloatValue(2, &params->getBegin());
	ret->createChild("scale", FALSE)->setFloatValue(2, params->getScale().mV);
	ret->createChild("shear", FALSE)->setFloatValue(2, params->getShear().mV);
	ret->createChild("twist_interval", FALSE)->setFloatValue(2, &params->getTwistBegin());
	ret->createChild("radius_offset", FALSE)->setFloatValue(1, &params->getRadiusOffset());
	ret->createChild("taper", FALSE)->setFloatValue(2, params->getTaper().mV);
	ret->createChild("revolutions", FALSE)->setFloatValue(1, &params->getRevolutions());
	ret->createChild("skew", FALSE)->setFloatValue(1, &params->getSkew());

	return ret;
}
LLXMLNode *LLPermissions::exportFileXML() const
{
	LLXMLNode *ret = new LLXMLNode("permissions", FALSE);

	ret->createChild("group_owned", TRUE)->setBoolValue(mIsGroupOwned);

	ret->createChild("base_mask", FALSE)->setByteValue(4, (U8*)&mMaskBase, LLXMLNode::ENCODING_HEX);
	ret->createChild("owner_mask", FALSE)->setByteValue(4, (U8*)&mMaskOwner, LLXMLNode::ENCODING_HEX);
	ret->createChild("group_mask", FALSE)->setByteValue(4, (U8*)&mMaskGroup, LLXMLNode::ENCODING_HEX);
	ret->createChild("everyone_mask", FALSE)->setByteValue(4, (U8*)&mMaskEveryone, LLXMLNode::ENCODING_HEX);
	ret->createChild("next_owner_mask", FALSE)->setByteValue(4, (U8*)&mMaskNextOwner, LLXMLNode::ENCODING_HEX);

	ret->createChild("creator_id", FALSE)->setUUIDValue(1, &mCreator);
	ret->createChild("owner_id", FALSE)->setUUIDValue(1, &mOwner);
	ret->createChild("last_owner_id", FALSE)->setUUIDValue(1, &mLastOwner);
	ret->createChild("group_id", FALSE)->setUUIDValue(1, &mGroup);

	return ret;
}