本文整理汇总了C++中LLNotificationPtr::isPersisted方法的典型用法代码示例。如果您正苦于以下问题:C++ LLNotificationPtr::isPersisted方法的具体用法?C++ LLNotificationPtr::isPersisted怎么用?C++ LLNotificationPtr::isPersisted使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLNotificationPtr
的用法示例。
在下文中一共展示了LLNotificationPtr::isPersisted方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: processNotification
//--------------------------------------------------------------------------
bool LLScriptHandler::processNotification(const LLSD& notify)
{
if(!mChannel)
{
return false;
}
LLNotificationPtr notification = LLNotifications::instance().find(notify["id"].asUUID());
if(!notification)
return false;
// arrange a channel on a screen
if(!mChannel->getVisible())
{
initChannel();
}
if(notify["sigtype"].asString() == "add")
{
// Don't log persisted notifications a second time
if (!notification->isPersisted())
{
// Archive message in nearby chat if desired
if (LLHandlerUtil::canLogToNearbyChat(notification))
{
LLHandlerUtil::logToNearbyChat(notification, CHAT_SOURCE_SYSTEM);
}
// Archive message in instant message if desired
if (LLHandlerUtil::canLogToIM(notification))
{
LLHandlerUtil::logToIMP2P(notification);
}
}
if(SCRIPT_DIALOG == notification->getName() || SCRIPT_DIALOG_GROUP == notification->getName() || SCRIPT_LOAD_URL == notification->getName())
{
LLScriptFloaterManager::getInstance()->onAddNotification(notification->getID());
}
else
{
LLToastNotifyPanel* notify_box = new LLToastNotifyPanel(notification);
LLToast::Params p;
p.notif_id = notification->getID();
p.notification = notification;
p.panel = notify_box;
p.on_delete_toast = boost::bind(&LLScriptHandler::onDeleteToast, this, _1);
LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel);
if(channel)
{
channel->addToast(p);
}
// send a signal to the counter manager
mNewNotificationSignal();
}
}
else if (notify["sigtype"].asString() == "delete")
{
if(SCRIPT_DIALOG == notification->getName() || SCRIPT_DIALOG_GROUP == notification->getName() || SCRIPT_LOAD_URL == notification->getName())
{
LLScriptFloaterManager::getInstance()->onRemoveNotification(notification->getID());
}
else
{
mChannel->killToastByNotificationID(notification->getID());
}
}
return false;
}