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


C++ LLNotificationPtr::getName方法代码示例

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


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

示例1: canSpawnIMSession

// static
bool LLHandlerUtil::canSpawnIMSession(const LLNotificationPtr& notification)
{
//	return OFFER_FRIENDSHIP == notification->getName()
//			|| USER_GIVE_ITEM == notification->getName()
//			|| TELEPORT_OFFERED == notification->getName();
// [SL:KB] - Patch: UI-Notifications | Checked: 2011-04-11 (Catznip-2.5.0a) | Added: Catznip-2.5.0a
//	return 
//		(canEmbedNotificationInIM(notification)) && 
//		( (OFFER_FRIENDSHIP == notification->getName()) || (USER_GIVE_ITEM == notification->getName()) || 
//		  (TELEPORT_OFFERED == notification->getName()) );
// [/SL:KB]
// [RLVa:KB] - Checked: 2011-04-11 (RLVa-1.3.0h) | Added: RLVa-1.3.0h
	return 
		(canEmbedNotificationInIM(notification)) && 
		( (!rlv_handler_t::isEnabled()) || (gRlvHandler.canStartIM(notification->getPayload()["from_id"].asUUID())) ) &&
		( (OFFER_FRIENDSHIP == notification->getName()) || (USER_GIVE_ITEM == notification->getName()) || 
		  (TELEPORT_OFFERED == notification->getName()) );
// [/RLVa:KB]
}
开发者ID:DarkSpyro003,项目名称:DarkSpyros_Viewer,代码行数:20,代码来源:llnotificationhandlerutil.cpp

示例2: uniqueHandler

bool LLNotifications::uniqueHandler(const LLSD& payload)
{
	LLNotificationPtr pNotif = LLNotifications::instance().find(payload["id"].asUUID());
	if (pNotif && pNotif->hasUniquenessConstraints()) 
	{
		if (payload["sigtype"].asString() == "add")
		{
			// not a duplicate according to uniqueness criteria, so we keep it
			// and store it for future uniqueness checks
			mUniqueNotifications.insert(std::make_pair(pNotif->getName(), pNotif));
		}
		else if (payload["sigtype"].asString() == "delete")
		{
			mUniqueNotifications.erase(pNotif->getName());
		}
	}

	return false;
}
开发者ID:CasperWarden,项目名称:CasperViewer,代码行数:19,代码来源:llnotifications.cpp

示例3: cancel

void LLNotifications::cancel(LLNotificationPtr pNotif)
{
	LLNotificationSet::iterator it=mItems.find(pNotif);
	if (it == mItems.end())
	{
		llerrs << "Attempted to delete nonexistent notification " << pNotif->getName() << llendl;
	}
	updateItem(LLSD().insert("sigtype", "delete").insert("id", pNotif->id()), pNotif);
	pNotif->cancel();
}
开发者ID:CasperWarden,项目名称:CasperViewer,代码行数:10,代码来源:llnotifications.cpp

示例4: onLLNotification

bool GrowlManager::onLLNotification(const LLSD& notice)
{
	if (notice["sigtype"].asString() != "add")
	{
		return false;
	}

	LLNotificationPtr notification = LLNotifications::instance().find(notice["id"].asUUID());
	std::string name = notification->getName();
	LLSD substitutions = notification->getSubstitutions();
	if (gGrowlManager->mNotifications.find(name) != gGrowlManager->mNotifications.end())
	{
		GrowlNotification* growl_notification = &gGrowlManager->mNotifications[name];
		std::string body = "";
		std::string title = "";
		if (growl_notification->useDefaultTextForTitle)
		{
			title = notification->getMessage();
		}
		else if (!growl_notification->growlTitle.empty())
		{
			title = growl_notification->growlTitle;
			LLStringUtil::format(title, substitutions);
		}
		if (growl_notification->useDefaultTextForBody)
		{
			body = notification->getMessage();
		}
		else if (!growl_notification->growlBody.empty())
		{
			body = growl_notification->growlBody;
			LLStringUtil::format(body, substitutions);
		}
		//TM:FS no need to log whats sent to growl
		//LL_INFOS("GrowlLLNotification") << "Notice: " << title << ": " << body << LL_ENDL;
		if (name == "ObjectGiveItem" || name == "OwnObjectGiveItem" || name == "ObjectGiveItemUnknownUser" || name == "UserGiveItem" || name == "SystemMessageTip")
		{
			LLUrlMatch urlMatch;
			LLWString newLine = utf8str_to_wstring(body);
			LLWString workLine = utf8str_to_wstring(body);
			while (LLUrlRegistry::instance().findUrl(workLine, urlMatch) && !urlMatch.getUrl().empty())
			{
				LLWStringUtil::replaceString(newLine, utf8str_to_wstring(urlMatch.getUrl()), utf8str_to_wstring(urlMatch.getLabel()));

				// Remove the URL from the work line so we don't end in a loop in case of regular URLs!
				// findUrl will always return the very first URL in a string
				workLine = workLine.erase(0, urlMatch.getEnd() + 1);
			}
			body = wstring_to_utf8str(newLine);
		}
		gGrowlManager->notify(title, body, growl_notification->growlName);
	}
	return false;
}
开发者ID:gabeharms,项目名称:firestorm,代码行数:54,代码来源:growlmanager.cpp

示例5: filterIgnoredNotifications

bool filterIgnoredNotifications(LLNotificationPtr notification)
{
	LLNotificationFormPtr form = notification->getForm();
	// Check to see if the user wants to ignore this alert
	if (form->getIgnoreType() != LLNotificationForm::IGNORE_NO)
	{
		return LLUI::sConfigGroup->getWarning(notification->getName());
	}

	return true;
}
开发者ID:CasperWarden,项目名称:CasperViewer,代码行数:11,代码来源:llnotifications.cpp

示例6: cancel

void LLNotifications::cancel(LLNotificationPtr pNotif)
{
	if (pNotif == NULL || pNotif->isCancelled()) return;

	AILOCK_mItems;
	LLNotificationSet::iterator it=mItems.find(pNotif);
	if (it == mItems.end())
	{
		LL_ERRS() << "Attempted to delete nonexistent notification " << pNotif->getName() << LL_ENDL;
	}
	UpdateItemSM::add(UpdateItem("delete", pNotif));
}
开发者ID:Shyotl,项目名称:SingularityViewer,代码行数:12,代码来源:llnotifications.cpp

示例7: canSpawnToast

// static
bool LLHandlerUtil::canSpawnToast(const LLNotificationPtr& notification)
{
	if(INVENTORY_DECLINED == notification->getName() 
		|| INVENTORY_ACCEPTED == notification->getName())
	{
		// return false for inventory accepted/declined notifications if respective IM window is open (EXT-5909)
		return ! isIMFloaterOpened(notification);
	}

	if(FRIENDSHIP_ACCEPTED == notification->getName())
	{
		// don't show FRIENDSHIP_ACCEPTED if IM window is opened and focused - EXT-6441
		return ! isIMFloaterFocused(notification);
	}

	if(OFFER_FRIENDSHIP == notification->getName()
		|| USER_GIVE_ITEM == notification->getName()
		|| TELEPORT_OFFERED == notification->getName())
	{
		// When ANY offer arrives, show toast, unless IM window is already open - EXT-5904
		return ! isIMFloaterOpened(notification);
	}

	return true;
}
开发者ID:HyangZhao,项目名称:NaCl-main,代码行数:26,代码来源:llnotificationhandlerutil.cpp

示例8: canSpawnToast

// static
bool LLHandlerUtil::canSpawnToast(const LLNotificationPtr& notification)
{
	if(INVENTORY_DECLINED == notification->getName() 
		|| INVENTORY_ACCEPTED == notification->getName())
	{
		// return false for inventory accepted/declined notifications if respective IM window is open (EXT-5909)
		return ! isIMFloaterOpened(notification);
	}

	if(FRIENDSHIP_ACCEPTED == notification->getName())
	{
		// don't show FRIENDSHIP_ACCEPTED if IM window is opened and focused - EXT-6441
		return ! isIMFloaterFocused(notification);
	}

	if(OFFER_FRIENDSHIP == notification->getName()
		|| USER_GIVE_ITEM == notification->getName()
		|| TELEPORT_OFFERED == notification->getName())
	{
		// When ANY offer arrives, show toast, unless IM window is already open - EXT-5904
//		return ! isIMFloaterOpened(notification);
// [SL:KB] - Patch: UI-Notifications | Checked: 2011-04-11 (Catznip-2.5.0a) | Added: Catznip-2.5.0a
		// Force a toast if the user opted not to embed notifications panels in IMs
		return (!canEmbedNotificationInIM(notification)) || (!isIMFloaterOpened(notification));
// [/SL:KB]
	}

	return true;
}
开发者ID:DarkSpyro003,项目名称:DarkSpyros_Viewer,代码行数:30,代码来源:llnotificationhandlerutil.cpp

示例9: matches

		bool matches(const LLNotificationPtr notification) const
		{
			for (std::set<std::string>::const_iterator it = mExclGroup.begin(); it
					!= mExclGroup.end(); it++)
			{
				std::string from_name = LLHandlerUtil::getSubstitutionName(notification);
				if (notification->getName() == *it && from_name == mFromName)
				{
					return true;
				}
			}
			return false;
		}
开发者ID:HyangZhao,项目名称:NaCl-main,代码行数:13,代码来源:llnotificationhandlerutil.cpp

示例10: LLUUID

// static
void LLHandlerUtil::logToIMP2P(const LLNotificationPtr& notification, bool to_file_only)
{
	// don't create IM p2p session with objects, it's necessary condition to log
	if (notification->getName() != OBJECT_GIVE_ITEM)
	{
		LLUUID from_id = notification->getPayload()["from_id"];

		if (from_id.isNull())
		{
			llwarns << " from_id for notification " << notification->getName() << " is null " << llendl;
			return;
		}

		if(to_file_only)
		{
			gCacheName->get(from_id, false, boost::bind(&log_name_callback, _2, "", notification->getMessage(), LLUUID()));
		}
		else
		{
			gCacheName->get(from_id, false, boost::bind(&log_name_callback, _2, INTERACTIVE_SYSTEM_FROM, notification->getMessage(), from_id));
		}
	}
}
开发者ID:OS-Development,项目名称:VW.Dolphin_v3,代码行数:24,代码来源:llnotificationhandlerutil.cpp

示例11: disableRespondedOptions

void LLToastNotifyPanel::disableRespondedOptions(LLNotificationPtr& notification)
{
	LLSD response = notification->getResponse();
	for (LLSD::map_const_iterator response_it = response.beginMap(); 
		response_it != response.endMap(); ++response_it)
	{
		if (response_it->second.isBoolean() && response_it->second.asBoolean())
		{
			// that after multiple responses there can be many pressed buttons
			// need to process them all
			disableButtons(notification->getName(), response_it->first);
		}
	}
}
开发者ID:AlexRa,项目名称:Kirstens-clone,代码行数:14,代码来源:lltoastnotifypanel.cpp

示例12: onAlertModal

bool LLProgressView::onAlertModal(const LLSD& notify)
{
	// if the progress view is visible, it will obscure the notification window
	// in this case, we want to auto-accept WebLaunchExternalTarget notifications
	if (isInVisibleChain() && notify["sigtype"].asString() == "add")
	{
		LLNotificationPtr notifyp = LLNotifications::instance().find(notify["id"].asUUID());
		if (notifyp && notifyp->getName() == "WebLaunchExternalTarget")
		{
			notifyp->respondWithDefault();
		}
	}
	return false;
}
开发者ID:OS-Development,项目名称:VW.Dolphin_v3,代码行数:14,代码来源:llprogressview.cpp

示例13: onNotification

//static 
bool LLNotifyBox::onNotification(const LLSD& notify)
{
	LLNotificationPtr notification = LLNotifications::instance().find(notify["id"].asUUID());
	
	if (!notification) return false;

	if(notify["sigtype"].asString() == "add" || notify["sigtype"].asString() == "change")
	{
		//bring existing notification to top
		//This getInstance is ugly, as LLNotifyBox is derived from both LLInstanceTracker and LLEventTimer, which also is derived from its own LLInstanceTracker
		//Have to explicitly determine which getInstance function to use.
		LLNotifyBox* boxp = LLInstanceTracker<LLNotifyBox, LLUUID>::getInstance(notification->getID());
		if (boxp && !boxp->isDead())
		{
			gNotifyBoxView->showOnly(boxp);
		}
		else
		{
			bool is_script_dialog = (notification->getName() == "ScriptDialog" || notification->getName() == "ScriptDialogGroup");
			LLNotifyBox* notify_box = new LLNotifyBox(
				notification,
				is_script_dialog); //layout_script_dialog);

			gNotifyBoxView->addChild(notify_box);
		}
	}
	else if (notify["sigtype"].asString() == "delete")
	{
		LLNotifyBox* boxp = LLInstanceTracker<LLNotifyBox, LLUUID>::getInstance(notification->getID());
		if (boxp && !boxp->isDead())
		{
			boxp->close();
		}
	}

	return false;
}
开发者ID:Barosonix,项目名称:AstraViewer,代码行数:38,代码来源:llnotify.cpp

示例14: name

// static
void LLHandlerUtil::logToIMP2P(const LLNotificationPtr& notification, bool to_file_only)
{
	const std::string name = LLHandlerUtil::getSubstitutionName(notification);

	std::string session_name = notification->getPayload().has(
			"SESSION_NAME") ? notification->getPayload()["SESSION_NAME"].asString() : name;

	// don't create IM p2p session with objects, it's necessary condition to log
	if (notification->getName() != OBJECT_GIVE_ITEM && notification->getName()
			!= OBJECT_GIVE_ITEM_UNKNOWN_USER)
	{
		LLUUID from_id = notification->getPayload()["from_id"];

		//*HACK for ServerObjectMessage the sesson name is really weird, see EXT-4779
		if (SERVER_OBJECT_MESSAGE == notification->getName())
		{
			session_name = "chat";
		}

		//there still appears a log history file with weird name " .txt"
		if (" " == session_name || "{waiting}" == session_name || "{nobody}" == session_name)
		{
			llwarning("Weird session name (" + session_name + ") for notification " + notification->getName(), 666)
		}

		if(to_file_only)
		{
			logToIM(IM_NOTHING_SPECIAL, session_name, "", notification->getMessage(),
					LLUUID(), LLUUID());
		}
		else
		{
			logToIM(IM_NOTHING_SPECIAL, session_name, INTERACTIVE_SYSTEM_FROM, notification->getMessage(),
					from_id, LLUUID());
		}
	}
开发者ID:Xara,项目名称:Opensource-V2-SL-Viewer,代码行数:37,代码来源:llnotificationhandlerutil.cpp

示例15: processNotification

bool LLViewerAlertHandler::processNotification(const LLNotificationPtr& p)
{
	if (gHeadlessClient)
	{
		LL_INFOS("LLViewerAlertHandler") << "Alert: " << p->getName() << LL_ENDL;
	}

	// If we're in mouselook, the mouse is hidden and so the user can't click 
	// the dialog buttons.  In that case, change to First Person instead.
	if( gAgentCamera.cameraMouselook() )
	{
		gAgentCamera.changeCameraToDefault();
	}

	return false;
}
开发者ID:CaseyraeStarfinder,项目名称:Firestorm-Viewer,代码行数:16,代码来源:llnotificationalerthandler.cpp


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