• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ LLSLURL函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中LLSLURL函数的典型用法代码示例。如果您正苦于以下问题:C++ LLSLURL函数的具体用法?C++ LLSLURL怎么用?C++ LLSLURL使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: LLSLURL

	void slurlTestObject::test<2>()
	{
		LLSLURL slurl = LLSLURL("mygrid.com", "my region");
		ensure_equals("grid/region - type", slurl.getType(), LLSLURL::LOCATION);
		ensure_equals("grid/region", slurl.getSLURLString(), 
					  "https://mygrid.com/region/my%20region/128/128/0");	
		
		slurl = LLSLURL("mygrid.com", "my region", LLVector3(1,2,3));
		ensure_equals("grid/region/vector - type", slurl.getType(), LLSLURL::LOCATION);
		ensure_equals(" grid/region/vector", slurl.getSLURLString(), 
					  "https://mygrid.com/region/my%20region/1/2/3");			

		LLGridManager::getInstance()->setGridChoice("foo.bar.com.bar");			
		slurl = LLSLURL("my region", LLVector3(1,2,3));
		ensure_equals("grid/region/vector - type", slurl.getType(), LLSLURL::LOCATION);
		ensure_equals(" grid/region/vector", slurl.getSLURLString(), 
					  "https://foo.bar.com.bar/region/my%20region/1/2/3");	
		
		LLGridManager::getInstance()->setGridChoice("util.agni.lindenlab.com");	
		slurl = LLSLURL("my region", LLVector3(1,2,3));
		ensure_equals("default grid/region/vector - type", slurl.getType(), LLSLURL::LOCATION);
		ensure_equals(" default grid/region/vector", slurl.getSLURLString(), 
					  "http://maps.secondlife.com/secondlife/my%20region/1/2/3");	
		
	}
开发者ID:otwstephanie,项目名称:hpa2oar,代码行数:25,代码来源:llslurl_test.cpp


示例2: switch

// static
void LLPanelLogin::updateStartSLURL()
{
	if (!sInstance) return;
	
	LLComboBox* combo = sInstance->getChild<LLComboBox>("start_location_combo");
	S32 index = combo->getCurrentIndex();
	
	switch (index)
	{
		case 0:
		{
			LLStartUp::setStartSLURL(LLSLURL(LLSLURL::SIM_LOCATION_LAST));
			break;
		}			
		case 1:
		{
			LLStartUp::setStartSLURL(LLSLURL(LLSLURL::SIM_LOCATION_HOME));
			break;
		}
		default:
		{
			LLSLURL slurl = LLSLURL(combo->getValue().asString());
			if(slurl.getType() == LLSLURL::LOCATION)
			{
				// we've changed the grid, so update the grid selection
				LLStartUp::setStartSLURL(slurl);
			}
			break;
		}			
	}
}
开发者ID:Katharine,项目名称:kittyviewer,代码行数:32,代码来源:llpanellogin.cpp


示例3: if

void LLLoginHandler::parse(const LLSD& queryMap)
{

    if (queryMap.has("grid"))
    {
        LLGridManager::getInstance()->setGridChoice(queryMap["grid"].asString());
    }


    std::string startLocation = queryMap["location"].asString();

    if (startLocation == "specify")
    {
        LLStartUp::setStartSLURL(LLSLURL(LLGridManager::getInstance()->getGridLoginID(),
                                         queryMap["region"].asString()));
    }
    else if (startLocation == "home")
    {
        LLStartUp::setStartSLURL(LLSLURL(LLSLURL::SIM_LOCATION_HOME));
    }
    else if (startLocation == "last")
    {
        LLStartUp::setStartSLURL(LLSLURL(LLSLURL::SIM_LOCATION_LAST));
    }
}
开发者ID:jimjesus,项目名称:kittyviewer,代码行数:25,代码来源:llloginhandler.cpp


示例4: gridfile

	void slurlTestObject::test<2>()
	{
		llofstream gridfile(TEST_FILENAME);
		gridfile << gSampleGridFile;
		gridfile.close();

		LLGridManager::getInstance()->initialize(TEST_FILENAME);

		LLSLURL slurl = LLSLURL("my.grid.com", "my region");
		ensure_equals("grid/region - type", slurl.getType(), LLSLURL::LOCATION);
		ensure_equals("grid/region", slurl.getSLURLString(),
					  "https://my.grid.com/region/my%20region/128/128/0");

		slurl = LLSLURL("my.grid.com", "my region", LLVector3(1,2,3));
		ensure_equals("grid/region/vector - type", slurl.getType(), LLSLURL::LOCATION);
		ensure_equals(" grid/region/vector", slurl.getSLURLString(),
					  "https://my.grid.com/region/my%20region/1/2/3");

		LLGridManager::getInstance()->setGridChoice("util.agni.lindenlab.com");
		slurl = LLSLURL("my region", LLVector3(1,2,3));
		ensure_equals("default grid/region/vector - type", slurl.getType(), LLSLURL::LOCATION);
		ensure_equals(" default grid/region/vector", slurl.getSLURLString(),
					  "http://maps.secondlife.com/secondlife/my%20region/1/2/3");

		LLGridManager::getInstance()->setGridChoice("MyGrid");
		slurl = LLSLURL("my region", LLVector3(1,2,3));
		ensure_equals("default grid/region/vector - type", slurl.getType(), LLSLURL::LOCATION);
		ensure_equals(" default grid/region/vector", slurl.getSLURLString(),
					  "https://my.grid.com/region/my%20region/1/2/3");

	}
开发者ID:Belxjander,项目名称:Kirito,代码行数:31,代码来源:llslurl_test.cpp


示例5: make_ui_sound

// static
LLUUID LLGroupActions::startIM(const LLUUID& group_id)
{
	if (group_id.isNull()) return LLUUID::null;

// [RLVa:KB] - Checked: 2013-05-09 (RLVa-1.4.9)
	if ( (!RlvActions::canStartIM(group_id)) && (!RlvActions::hasOpenGroupSession(group_id)) )
	{
		make_ui_sound("UISndInvalidOp");
		RlvUtil::notifyBlocked(RLV_STRING_BLOCKED_STARTIM, LLSD().with("RECIPIENT", LLSLURL("group", group_id, "about").getSLURLString()));
		return LLUUID::null;
	}
// [/RLVa:KB]

// [RLVa:KB] - Checked: 2013-05-09 (RLVa-1.4.9)
	if ( (!RlvActions::canStartIM(group_id)) && (!RlvActions::hasOpenGroupSession(group_id)) )
	{
		make_ui_sound("UISndInvalidOp");
		RlvUtil::notifyBlocked(RLV_STRING_BLOCKED_STARTIM, LLSD().with("RECIPIENT", LLSLURL("group", group_id, "about").getSLURLString()));
		return LLUUID::null;
	}
// [/RLVa:KB]

	LLGroupData group_data;
	if (gAgent.getGroupData(group_id, group_data))
	{
		// <exodus>
		// Unmute the group if the user tries to start a session with it.
		exoGroupMuteList::instance().remove(group_id);
		// </exodus>
		LLUUID session_id = gIMMgr->addSession(
			group_data.mName,
			IM_SESSION_GROUP_START,
			group_id);
		if (session_id != LLUUID::null)
		{
			// <FS:Ansariel> [FS communication UI]
			//LLFloaterIMContainer::getInstance()->showConversation(session_id);
			FSFloaterIM::show(session_id);
			// </FS:Ansariel> [FS communication UI]
		}
		make_ui_sound("UISndStartIM");
		return session_id;
	}
	else
	{
		// this should never happen, as starting a group IM session
		// relies on you belonging to the group and hence having the group data
		make_ui_sound("UISndInvalidOp");
		return LLUUID::null;
	}
}
开发者ID:CaseyraeStarfinder,项目名称:Firestorm-Viewer,代码行数:52,代码来源:llgroupactions.cpp


示例6: LLSLURL

// Multiple calls to showInstance("inspect_avatar", foo) will provide different
// LLSD for foo, which we will catch here.
//virtual
void LLInspectAvatar::onOpen(const LLSD& data)
{
    // Start open animation
    LLInspect::onOpen(data);

    // Extract appropriate avatar id
    mAvatarID = data["avatar_id"];

    // Position the inspector relative to the mouse cursor
    // Similar to how tooltips are positioned
    // See LLToolTipMgr::createToolTip
    if (data.has("pos"))
    {
        LLUI::positionViewNearMouse(this, data["pos"]["x"].asInteger(), data["pos"]["y"].asInteger());
    }
    else
    {
        LLUI::positionViewNearMouse(this);
    }

    // Generate link to avatar profile.
    getChild<LLUICtrl>("avatar_profile_link")->setTextArg("[LINK]", LLSLURL("agent", mAvatarID, "about").getSLURLString());

    // can't call from constructor as widgets are not built yet
    requestUpdate();

    updateVolumeSlider();
}
开发者ID:Belxjander,项目名称:Kirito,代码行数:31,代码来源:llinspectavatar.cpp


示例7: handle

	bool handle(const LLSD& tokens, const LLSD& query_map,
				LLMediaCtrl* web)
	{
		// construct a "normal" SLURL, resolve the region to
		// a global position, and teleport to it
		if (tokens.size() < 1) return false;

		LLVector3 coords(128, 128, 0);
		if (tokens.size() <= 4)
		{
			coords = LLVector3(tokens[1].asReal(), 
							   tokens[2].asReal(), 
							   tokens[3].asReal());
		}

		LLSD args;
		args["LOCATION"] = tokens[0];

		// Region names may be %20 escaped.
		std::string region_name = LLURI::unescape(tokens[0]);


		LLSD payload;
		payload["region_name"] = region_name;
		payload["callback_url"] = LLSLURL(region_name, coords).getSLURLString();

		LLNotificationsUtil::add("TeleportViaSLAPP", args, payload);
		return true;
	}
开发者ID:1234-,项目名称:SingularityViewer,代码行数:29,代码来源:llurldispatcher.cpp


示例8: LL_WARNS

// static
void LLGroupActions::startCall(const LLUUID& group_id)
{
	// create a new group voice session
	LLGroupData gdata;

	if (!gAgent.getGroupData(group_id, gdata))
	{
		LL_WARNS() << "Error getting group data" << LL_ENDL;
		return;
	}

// [RLVa:KB] - Checked: 2013-05-09 (RLVa-1.4.9)
	if ( (!RlvActions::canStartIM(group_id)) && (!RlvActions::hasOpenGroupSession(group_id)) )
	{
		make_ui_sound("UISndInvalidOp");
		RlvUtil::notifyBlocked(RLV_STRING_BLOCKED_STARTIM, LLSD().with("RECIPIENT", LLSLURL("group", group_id, "about").getSLURLString()));
		return;
	}
// [/RLVa:KB]

	LLUUID session_id = gIMMgr->addSession(gdata.mName, IM_SESSION_GROUP_START, group_id, true);
	if (session_id == LLUUID::null)
	{
		LL_WARNS() << "Error adding session" << LL_ENDL;
		return;
	}

	// start the call
	gIMMgr->autoStartCallOnStartup(session_id);

	make_ui_sound("UISndStartIM");
}
开发者ID:CaseyraeStarfinder,项目名称:Firestorm-Viewer,代码行数:33,代码来源:llgroupactions.cpp


示例9: LL_INFOS

// static
void LLPanelLogin::onSelectServer(LLUICtrl*, void*)
{
	// *NOTE: The paramters for this method are ignored. 
	// LLPanelLogin::onServerComboLostFocus(LLFocusableElement* fe, void*)
	// calls this method.
	LL_INFOS("AppInit") << "onSelectServer" << LL_ENDL;
	// The user twiddled with the grid choice ui.
	// apply the selection to the grid setting.
	LLPointer<LLCredential> credential;
	
	LLComboBox* combo = sInstance->getChild<LLComboBox>("server_combo");
	LLSD combo_val = combo->getSelectedValue();
	if (combo_val.isUndefined())
	{
		combo_val = combo->getValue();
	}
	
	combo = sInstance->getChild<LLComboBox>("start_location_combo");	
	combo->setCurrentByIndex(1);
	LLStartUp::setStartSLURL(LLSLURL(gSavedSettings.getString("LoginLocation")));
	LLGridManager::getInstance()->setGridChoice(combo_val.asString());
	// This new selection will override preset uris
	// from the command line.
	updateServer();
	updateLocationCombo(false);
	updateLoginPanelLinks();
}
开发者ID:Katharine,项目名称:kittyviewer,代码行数:28,代码来源:llpanellogin.cpp


示例10: LLSLURL

void LLPanelPlacesTab::onRegionResponse(const LLVector3d& landmark_global_pos,
										U64 region_handle,
										const std::string& url,
										const LLUUID& snapshot_id,
										bool teleport)
{
	std::string sim_name;
	bool gotSimName = LLWorldMap::getInstance()->simNameFromPosGlobal( landmark_global_pos, sim_name );

	std::string sl_url;
	if ( gotSimName )
	{
		sl_url = LLSLURL(sim_name, landmark_global_pos).getSLURLString();
	}
	else
	{
		sl_url = "";
	}

	LLView::getWindow()->copyTextToClipboard(utf8str_to_wstring(sl_url));
		
	LLSD args;
	args["SLURL"] = sl_url;

	LLNotificationsUtil::add("CopySLURL", args);
}
开发者ID:OS-Development,项目名称:VW.Kirsten,代码行数:26,代码来源:llpanelplacestab.cpp


示例11: add_timestamped_line

void add_timestamped_line(LLViewerTextEditor* edit, LLChat chat, const LLColor4& color)
{
	std::string line = chat.mText;
	bool prepend_newline = true;
	if (gSavedSettings.getBOOL("ChatShowTimestamps"))
	{
		edit->appendTime(prepend_newline);
		prepend_newline = false;
	}

	// If the msg is from an agent (not yourself though),
	// extract out the sender name and replace it with the hotlinked name.
	if (chat.mSourceType == CHAT_SOURCE_AGENT &&
		chat.mFromID != LLUUID::null)
	{
		chat.mURL = LLSLURL("agent", chat.mFromID, "inspect").getSLURLString();
	}

	// If the chat line has an associated url, link it up to the name.
	if (!chat.mURL.empty()
		&& (line.length() > chat.mFromName.length() && line.find(chat.mFromName,0) == 0))
	{
		std::string start_line = line.substr(0, chat.mFromName.length() + 1);
		line = line.substr(chat.mFromName.length() + 1);
		edit->appendText(start_line, prepend_newline, LLStyleMap::instance().lookup(chat.mFromID,chat.mURL));
		edit->blockUndo();
		prepend_newline = false;
	}
	edit->appendText(line, prepend_newline, LLStyle::Params().color(color));
	edit->blockUndo();
}
开发者ID:OS-Development,项目名称:VW.Kirsten,代码行数:31,代码来源:llfloaterchat.cpp


示例12: dispatch

// static
bool LLURLDispatcher::dispatch(const std::string& slurl,
							   const std::string& nav_type,
							   LLMediaCtrl* web,
							   bool trusted_browser)
{
	return LLURLDispatcherImpl::dispatch(LLSLURL(slurl), nav_type, web, trusted_browser);
}
开发者ID:wish-ds,项目名称:firestorm-ds,代码行数:8,代码来源:llurldispatcher.cpp


示例13: tooltip

void LLNavigationBar::onTeleportFinished(const LLVector3d& global_agent_pos)
{
	if (!mSaveToLocationHistory)
		return;
	LLLocationHistory* lh = LLLocationHistory::getInstance();

	//TODO*: do we need convert slurl into readable format?
	std::string location;
	/*NOTE:
	 * We can't use gAgent.getPositionAgent() in case of local teleport to build location.
	 * At this moment gAgent.getPositionAgent() contains previous coordinates.
	 * according to EXT-65 agent position is being reseted on each frame.  
	 */
		LLAgentUI::buildLocationString(location, LLAgentUI::LOCATION_FORMAT_NO_MATURITY,
					gAgent.getPosAgentFromGlobal(global_agent_pos));
	std::string tooltip (LLSLURL(gAgent.getRegion()->getName(), global_agent_pos).getSLURLString());
	
	LLLocationHistoryItem item (location,
			global_agent_pos, tooltip,TYPED_REGION_SLURL);// we can add into history only TYPED location
	//Touch it, if it is at list already, add new location otherwise
	if ( !lh->touchItem(item) ) {
		lh->addItem(item);
	}

	lh->save();
	
	mSaveToLocationHistory = false;
	
}
开发者ID:HyangZhao,项目名称:NaCl-main,代码行数:29,代码来源:llnavigationbar.cpp


示例14: make_ui_sound

// static
void LLGroupActions::startCall(const LLUUID& group_id)
{
	// create a new group voice session
	LLGroupData gdata;

	if (!gAgent.getGroupData(group_id, gdata))
	{
		llwarns << "Error getting group data" << llendl;
		return;
	}

// [RLVa:KB] - Checked: 2011-04-11 (RLVa-1.3.0h) | Added: RLVa-1.3.0h
	if ( (rlv_handler_t::isEnabled()) && (!gRlvHandler.canStartIM(group_id)) && (!gIMMgr->hasSession(group_id)) )
	{
		make_ui_sound("UISndInvalidOp");
		RlvUtil::notifyBlocked(RLV_STRING_BLOCKED_STARTIM, LLSD().with("RECIPIENT", LLSLURL("group", group_id, "about").getSLURLString()));
		return;
	}
// [/RLVa:KB]

	LLUUID session_id = gIMMgr->addSession(gdata.mName, IM_SESSION_GROUP_START, group_id, true);
	if (session_id == LLUUID::null)
	{
		llwarns << "Error adding session" << llendl;
		return;
	}

	// start the call
	gIMMgr->autoStartCallOnStartup(session_id);

	make_ui_sound("UISndStartIM");
}
开发者ID:wish-ds,项目名称:firestorm-ds,代码行数:33,代码来源:llgroupactions.cpp


示例15: LLSLURL

void LLFloaterReporter::setFromAvatarID(const LLUUID& avatar_id)
{
	mAbuserID = mObjectID = avatar_id;
	std::string avatar_link = LLSLURL("agent", mObjectID, "inspect").getSLURLString();
	getChild<LLUICtrl>("owner_name")->setValue(avatar_link);

	LLAvatarNameCache::get(avatar_id, boost::bind(&LLFloaterReporter::onAvatarNameCache, this, _1, _2));
}
开发者ID:NickyPerian,项目名称:viewer-development,代码行数:8,代码来源:llfloaterreporter.cpp


示例16: LLSLURL

void LLInspectObject::updateCreator(LLSelectNode* nodep)
{
	// final information for display
	LLStringUtil::format_map_t args;
	std::string text;
	
	// Leave text blank until data loaded
	if (nodep->mValid)
	{
		// Utilize automatic translation of SLURL into name to display 
		// a clickable link		
		// Objects cannot be created by a group, so use agent URL format
		LLUUID creator_id = nodep->mPermissions->getCreator();
		std::string creator_url =
			LLSLURL("agent", creator_id, "about").getSLURLString();
		args["[CREATOR]"] = creator_url;
				
		// created by one user but owned by another
		std::string owner_url;
		LLUUID owner_id;
		bool group_owned = nodep->mPermissions->isGroupOwned();
		if (group_owned)
		{
			owner_id = nodep->mPermissions->getGroup();
			owner_url =	LLSLURL("group", owner_id, "about").getSLURLString();
		}
		else
		{
			owner_id = nodep->mPermissions->getOwner();
			owner_url =	LLSLURL("agent", owner_id, "about").getSLURLString();
		}
		args["[OWNER]"] = owner_url;
		
		if (creator_id == owner_id)
		{
			// common case, created and owned by one user
			text = getString("Creator", args);
		}
		else
		{
			text = getString("CreatorAndOwner", args);
		}
	}
	getChild<LLUICtrl>("object_creator")->setValue(text);
}
开发者ID:HyangZhao,项目名称:NaCl-main,代码行数:45,代码来源:llinspectobject.cpp


示例17:

// create a slurl from a global position
LLSLURL::LLSLURL(const std::string& grid,
                 const std::string& region,
                 const LLVector3d& global_position)
{
    *this = LLSLURL(grid,
                    region, LLVector3(global_position.mdV[VX],
                                      global_position.mdV[VY],
                                      global_position.mdV[VZ]));
}
开发者ID:WoLf-,项目名称:NaCl-main,代码行数:10,代码来源:llslurl.cpp


示例18: LLFloater

FloaterHop::FloaterHop( const Params& params )
:	LLFloater( params ),
	LLInstanceTracker<FloaterHop, std::string>(params.id()),
	mWebBrowser(NULL),
	mUUID(params.id()),
	mShowPageTitle(params.show_page_title)
{
	mSLURL = LLSLURL(params.url);
}
开发者ID:DarkSpyro003,项目名称:DarkSpyros_Viewer,代码行数:9,代码来源:floaterhop.cpp


示例19:

// create a slurl from a global position
LLSLURL::LLSLURL(const std::string& grid, 
		 const std::string& region, 
		 const LLVector3d& global_position)
{
	*this = LLSLURL(LLGridManager::getInstance()->getGridId(grid),
		  region, LLVector3(global_position.mdV[VX],
				    global_position.mdV[VY],
				    global_position.mdV[VZ]));
}
开发者ID:JohnMcCaffery,项目名称:Armadillo-Phoenix,代码行数:10,代码来源:llslurl.cpp


示例20: LLSLURL

void LLFloaterReporter::setPickedObjectProperties(const std::string& object_name, const std::string& owner_name, const LLUUID owner_id)
{
	getChild<LLUICtrl>("object_name")->setValue(object_name);
	std::string owner_link =
		LLSLURL("agent", owner_id, "inspect").getSLURLString();
	getChild<LLUICtrl>("owner_name")->setValue(owner_link);
	getChild<LLUICtrl>("abuser_name_edit")->setValue(owner_name);
	mAbuserID = owner_id;
	mOwnerName = owner_name;
}
开发者ID:otwstephanie,项目名称:hpa2oar,代码行数:10,代码来源:llfloaterreporter.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ LLURI函数代码示例发布时间:2022-05-30
下一篇:
C++ LLQuaternion函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap