当前位置: 首页>>代码示例>>C++>>正文


C++ LLPointer::updateServer方法代码示例

本文整理汇总了C++中LLPointer::updateServer方法的典型用法代码示例。如果您正苦于以下问题:C++ LLPointer::updateServer方法的具体用法?C++ LLPointer::updateServer怎么用?C++ LLPointer::updateServer使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在LLPointer的用法示例。


在下文中一共展示了LLPointer::updateServer方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: temp_upload_done_callback

void temp_upload_done_callback(const LLUUID& uuid, void* user_data, S32 result, LLExtStat ext_status) // StoreAssetData callback (fixed)
{
	LLResourceData* data = (LLResourceData*)user_data;
	if(result >= 0)
	{
		LLAssetType::EType dest_loc = (data->mPreferredLocation == LLAssetType::AT_NONE) ? data->mAssetInfo.mType : data->mPreferredLocation;
		LLUUID folder_id(gInventory.findCategoryUUIDForType(dest_loc));
		LLUUID item_id;
		item_id.generate();
		LLPermissions perm;
		perm.init(gAgentID,
				  gAgentID,
				  gAgentID,
				  gAgentID);
		perm.setMaskBase(PERM_ALL);
		perm.setMaskOwner(PERM_ALL);
		perm.setMaskEveryone(PERM_ALL);
		perm.setMaskGroup(PERM_ALL);
		LLPointer<LLViewerInventoryItem> item = new LLViewerInventoryItem(item_id, folder_id, perm, data->mAssetInfo.mTransactionID.makeAssetID(gAgent.getSecureSessionID()), data->mAssetInfo.mType, data->mInventoryType, data->mAssetInfo.getName(), "", LLSaleInfo::DEFAULT, LLInventoryItem::II_FLAGS_NONE, time_corrected());
		item->updateServer(TRUE);
		gInventory.updateItem(item);
		gInventory.notifyObservers();
	}else // 	if(result >= 0)
	{
		LLSD args;
		args["FILE"] = LLInventoryType::lookupHumanReadable(data->mInventoryType);
		args["REASON"] = std::string(LLAssetStorage::getErrorString(result));
		LLNotifications::instance().add("CannotUploadReason", args);
	}

	LLUploadDialog::modalUploadFinished();
	delete data;
}
开发者ID:meta7,项目名称:Meta7-Viewer-Imprud-refactor,代码行数:33,代码来源:llviewermenufile.cpp

示例2: doneIdle

// Checked: 2010-04-18 (RLVa-1.2.0e) | Added: RLVa-1.2.0e
void RlvGiveToRLVTaskOffer::doneIdle()
{
	const LLViewerInventoryCategory* pRlvRoot = RlvInventory::instance().getSharedRoot();
	if (pRlvRoot)
	{
		for (folder_ref_t::const_iterator itFolder = m_Folders.begin(); itFolder != m_Folders.end(); ++itFolder)
		{
			const LLViewerInventoryCategory* pFolder = gInventory.getCategory(*itFolder);
			if (!pFolder)
				continue;

			std::string strFolder = pFolder->getName();
			if ( (pRlvRoot->getUUID() == pFolder->getParentUUID() ) && (strFolder.find(RLV_PUTINV_PREFIX) == 0))
			{
				LLPointer<LLViewerInventoryCategory> pNewFolder = new LLViewerInventoryCategory(pFolder);
				pNewFolder->rename(strFolder.erase(0, strFolder.find(RLV_FOLDER_PREFIX_PUTINV)));
				pNewFolder->updateServer(FALSE);
				gInventory.updateCategory(pNewFolder);

				RlvBehaviourNotifyHandler::instance().sendNotification("accepted_in_rlv inv_offer " + pNewFolder->getName());

				gInventory.notifyObservers();
				break;
			}
		}
	}
	delete this;
}
开发者ID:zantrua,项目名称:SingularityViewer,代码行数:29,代码来源:rlvinventory.cpp

示例3: onBtnCpToInv

// <edit>
//static
void LLFloaterTexturePicker::onBtnCpToInv(void* userdata)
{
	LLFloaterTexturePicker* self = (LLFloaterTexturePicker*) userdata;

	LLUUID mUUID = self->mImageAssetID;
	LLAssetType::EType asset_type = LLAssetType::AT_TEXTURE;
	LLInventoryType::EType inv_type = LLInventoryType::IT_TEXTURE;
	const LLUUID folder_id = gInventory.findCategoryUUIDForType(LLFolderType::assetTypeToFolderType(asset_type));

	if(folder_id.notNull())
	{
		std::string name;
		std::string desc;
		name.assign("temp.");
		desc.assign(mUUID.asString());
		name.append(mUUID.asString());
		LLUUID item_id;
		item_id.generate();
		LLPermissions perm;
			perm.init(gAgentID,	gAgentID, LLUUID::null, LLUUID::null);
		U32 next_owner_perm = PERM_MOVE | PERM_TRANSFER;
			perm.initMasks(PERM_ALL, PERM_ALL, PERM_NONE,PERM_NONE, next_owner_perm);
		S32 creation_date_now = time_corrected();
		LLPointer<LLViewerInventoryItem> item
			= new LLViewerInventoryItem(item_id,
								folder_id,
								perm,
								mUUID,
								asset_type,
								inv_type,
								name,
								desc,
								LLSaleInfo::DEFAULT,
								LLInventoryItemFlags::II_FLAGS_NONE,
								creation_date_now);
		item->updateServer(TRUE);

		gInventory.updateItem(item);
		gInventory.notifyObservers();

		LLInventoryPanel *active_panel = LLInventoryPanel::getActiveInventoryPanel();
		if (active_panel)
		{
			active_panel->openSelected();
			LLFocusableElement* focus = gFocusMgr.getKeyboardFocus();
			gFocusMgr.setKeyboardFocus(focus);
		}
	}
	else
	{
		llwarns << "Can't find a folder to put it in" << llendl;
	}
}
开发者ID:ap0110,项目名称:Thunderstorm,代码行数:55,代码来源:lltexturectrl.cpp


注:本文中的LLPointer::updateServer方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。