本文整理汇总了C++中LLMessageSystem::getCurrentSendTotal方法的典型用法代码示例。如果您正苦于以下问题:C++ LLMessageSystem::getCurrentSendTotal方法的具体用法?C++ LLMessageSystem::getCurrentSendTotal怎么用?C++ LLMessageSystem::getCurrentSendTotal使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLMessageSystem
的用法示例。
在下文中一共展示了LLMessageSystem::getCurrentSendTotal方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: deactivateSimilarGestures
void LLGestureMgr::deactivateSimilarGestures(LLMultiGesture* in, const LLUUID& in_item_id)
{
const LLUUID& base_in_item_id = get_linked_uuid(in_item_id);
uuid_vec_t gest_item_ids;
// Deactivate all gestures that match
item_map_t::iterator it;
for (it = mActive.begin(); it != mActive.end(); )
{
const LLUUID& item_id = (*it).first;
LLMultiGesture* gest = (*it).second;
// Don't deactivate the gesture we are looking for duplicates of
// (for replaceGesture)
if (!gest || item_id == base_in_item_id)
{
// legal, can have null pointers in list
++it;
}
else if ((!gest->mTrigger.empty() && gest->mTrigger == in->mTrigger)
|| (gest->mKey != KEY_NONE && gest->mKey == in->mKey && gest->mMask == in->mMask))
{
gest_item_ids.push_back(item_id);
stopGesture(gest);
delete gest;
gest = NULL;
mActive.erase(it++);
gInventory.addChangedMask(LLInventoryObserver::LABEL, item_id);
}
else
{
++it;
}
}
// Inform database of the change
LLMessageSystem* msg = gMessageSystem;
BOOL start_message = TRUE;
uuid_vec_t::const_iterator vit = gest_item_ids.begin();
while (vit != gest_item_ids.end())
{
if (start_message)
{
msg->newMessage("DeactivateGestures");
msg->nextBlock("AgentData");
msg->addUUID("AgentID", gAgent.getID());
msg->addUUID("SessionID", gAgent.getSessionID());
msg->addU32("Flags", 0x0);
start_message = FALSE;
}
msg->nextBlock("Data");
msg->addUUID("ItemID", *vit);
msg->addU32("GestureFlags", 0x0);
if (msg->getCurrentSendTotal() > MTUBYTES)
{
gAgent.sendReliableMessage();
start_message = TRUE;
}
++vit;
}
if (!start_message)
{
gAgent.sendReliableMessage();
}
// Add to the list of names for the user.
for (vit = gest_item_ids.begin(); vit != gest_item_ids.end(); ++vit)
{
LLViewerInventoryItem* item = gInventory.getItem(*vit);
if (!item) continue;
mDeactivateSimilarNames.append(item->getName());
mDeactivateSimilarNames.append("\n");
}
notifyObservers();
}
示例2: activateGestures
void LLGestureMgr::activateGestures(LLViewerInventoryItem::item_array_t& items)
{
// Load up the assets
S32 count = 0;
LLViewerInventoryItem::item_array_t::const_iterator it;
for (it = items.begin(); it != items.end(); ++it)
{
LLViewerInventoryItem* item = *it;
if (isGestureActive(item->getUUID()))
{
continue;
}
else
{ // Make gesture active and persistent through login sessions. -Aura 07-12-06
activateGesture(item->getUUID());
}
count++;
}
mLoadingCount = count;
mDeactivateSimilarNames.clear();
for (it = items.begin(); it != items.end(); ++it)
{
LLViewerInventoryItem* item = *it;
if (isGestureActive(item->getUUID()))
{
continue;
}
// Don't inform server, we'll do that in bulk
const BOOL no_inform_server = FALSE;
const BOOL deactivate_similar = TRUE;
activateGestureWithAsset(item->getUUID(), item->getAssetUUID(),
no_inform_server,
deactivate_similar);
}
// Inform the database of this change
LLMessageSystem* msg = gMessageSystem;
BOOL start_message = TRUE;
for (it = items.begin(); it != items.end(); ++it)
{
LLViewerInventoryItem* item = *it;
if (isGestureActive(item->getUUID()))
{
continue;
}
if (start_message)
{
msg->newMessage("ActivateGestures");
msg->nextBlock("AgentData");
msg->addUUID("AgentID", gAgent.getID());
msg->addUUID("SessionID", gAgent.getSessionID());
msg->addU32("Flags", 0x0);
start_message = FALSE;
}
msg->nextBlock("Data");
msg->addUUID("ItemID", item->getUUID());
msg->addUUID("AssetID", item->getAssetUUID());
msg->addU32("GestureFlags", 0x0);
if (msg->getCurrentSendTotal() > MTUBYTES)
{
gAgent.sendReliableMessage();
start_message = TRUE;
}
}
if (!start_message)
{
gAgent.sendReliableMessage();
}
}