コード例 #1
0
//static
void LLMarketplaceInventoryImporter::update()
{
	if (instanceExists())
	{
		LLMarketplaceInventoryImporter::instance().updateImport();
	}
}
コード例 #2
0
//static
void LLFloaterAvatarList::toggle(void*)
{
// [RLVa:KB]
	if(gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
	{
		if(instanceExists())
			getInstance()->close();
	}
	else
// [/RLVa:KB]
	if(!instanceExists() || !getInstance()->getVisible())
	{
		showInstance();
	}
	else
	{
		getInstance()->close();
	}
}
コード例 #3
0
//static
void LLFloaterAvatarList::callbackIdle(void* userdata)
{
	if (instanceExists())
	{
		// Do not update at every frame: this would be insane!
		if (gFrameCount % getInstance()->mUpdateRate == 0)
		{
			getInstance()->updateAvatarList();
		}
	}
}
コード例 #4
0
//static
void LLMarketplaceInventoryImporter::update()
{
	if (instanceExists())
	{
		static LLTimer update_timer;
		if (update_timer.hasExpired())
		{
			LLMarketplaceInventoryImporter::instance().updateImport();
			//static LLCachedControl<F32> MARKET_IMPORTER_UPDATE_FREQUENCY("MarketImporterUpdateFreq", 1.0f);
			update_timer.setTimerExpirySec(MARKET_IMPORTER_UPDATE_FREQUENCY);
		}
	}
}
コード例 #5
0
/** Uid instance iterator ConstructL

Fetches all the related entries to the UID and sets the currently indexed time

@internalComponent
*/
void CCalInstanceIteratorUid::ConstructL(const TDesC8& aUid, const TCalTime& aInstanceTime, TCalCollectionId aCollectionId)
	{
	// record the time to use for undated todos
	TTime now;
	now.HomeTime();
	iUndatedTodoTime.SetTimeLocalL(now);
	
	// Fetch all the entries that relate to the instance
	RPointerArray<CAgnSimpleEntry> simpleEntries;
	TCleanSimpleEntryArray cleanSimpleEntryArray(simpleEntries, iInstanceViewImpl.GetServ());
	CleanupStack::PushL(TCleanupItem(CCalInstanceViewImpl::DestroySimpleEntryArray, &cleanSimpleEntryArray));
	RArray<TInt> fileIds;
	iInstanceViewImpl.GetShortFileIdLC(fileIds);//It is in order 
	iInstanceViewImpl.GetServ().FetchSimpleEntriesByGuidL(aUid, simpleEntries, fileIds);
	CleanupStack::PopAndDestroy(&fileIds);
	
	const TInt KEntryCount(simpleEntries.Count());
	
	// There must be entries associated with this UID
	__ASSERT_ALWAYS(KEntryCount != 0, User::Leave(KErrNotFound));
	
	TBool instanceExists(EFalse);
	
	for (TInt i(0) ; i < KEntryCount ; ++i)
		{
		CCalLiteEntry* liteEntry = CCalLiteEntry::NewL(*simpleEntries[0], iInstanceViewImpl.GetServ());
		liteEntry->IncrementRefCount();
		simpleEntries.Remove(0);
		TInt appendError = iCalLiteEntries.Append(liteEntry);	
		if (appendError != KErrNone)
			{
			liteEntry->DecrementRefCount();
			User::Leave(appendError);
			}
		
		if (iInstanceViewImpl.IsValidInstanceL(liteEntry->LiteEntry(), aInstanceTime))
			{//Add the index of the entry which has the same time as aInstanceTime into iEntryWithSameTime
			if(liteEntry->LiteEntry().CollectionId() == aCollectionId)
				{
				instanceExists = ETrue;
				iCurrentIndexTime = aInstanceTime;
				iCurrentIndex = iEntryWithSameTime.Count();
				}
			iEntryWithSameTime.AppendL(i);
			}
		}
	
	__ASSERT_ALWAYS(instanceExists, User::Leave(KErrNotFound));
	CleanupStack::PopAndDestroy(); // simpleEntries
	}
コード例 #6
0
ファイル: rlvhelper.cpp プロジェクト: Frans/SingularityViewer
// Checked: 2011-03-31 (RLVa-1.3.0f) | Modify: RLVa-1.3.0f
void RlvBehaviourNotifyHandler::sendNotification(const std::string& strText, const std::string& strSuffix)
{
	if (instanceExists())
	{
		RlvBehaviourNotifyHandler* pThis = getInstance();

		// NOTE: notifications have two parts (which are concatenated without token) where only the first part is subject to the filter
		for (std::multimap<LLUUID, notifyData>::const_iterator itNotify = pThis->m_Notifications.begin(); 
				itNotify != pThis->m_Notifications.end(); ++itNotify)
		{
			if ( (itNotify->second.strFilter.empty()) || (boost::icontains(strText, itNotify->second.strFilter)) )
				RlvUtil::sendChatReply(itNotify->second.nChannel, "/" + strText + strSuffix);
		}
	}
}
コード例 #7
0
/*static*/void LLPostProcess::cleanupClass()
{
	if(instanceExists())
		getInstance()->destroyGL() ;
}
コード例 #8
0
/*static*/void LLPostProcess::cleanupClass()
{
	if(instanceExists())
		getInstance()->invalidate() ;
}
コード例 #9
0
// static 
void LLFloaterAvatarPicker::processAvatarPickerReply(LLMessageSystem* msg, void**)
{
	LLUUID	agent_id;
	LLUUID	query_id;
	LLUUID	avatar_id;
	std::string first_name;
	std::string last_name;

	msg->getUUID("AgentData", "AgentID", agent_id);
	msg->getUUID("AgentData", "QueryID", query_id);

	// Not for us
	if (agent_id != gAgent.getID()) return;

	if(!instanceExists())
		return;
	LLFloaterAvatarPicker *floater = getInstance();

	// floater is closed or these are not results from our last request
	if (NULL == floater || query_id != floater->mQueryID)
	{
		return;
	}

	LLScrollListCtrl* search_results = floater->getChild<LLScrollListCtrl>("SearchResults");

	// clear "Searching" label on first results
	if (floater->mNumResultsReturned++ == 0)
	{
		search_results->deleteAllItems();
	}

	BOOL found_one = FALSE;
	S32 num_new_rows = msg->getNumberOfBlocks("Data");
	for (S32 i = 0; i < num_new_rows; i++)
	{			
		msg->getUUIDFast(  _PREHASH_Data,_PREHASH_AvatarID,	avatar_id, i);
		msg->getStringFast(_PREHASH_Data,_PREHASH_FirstName, first_name, i);
		msg->getStringFast(_PREHASH_Data,_PREHASH_LastName,	last_name, i);
	
		std::string avatar_name;
		if (avatar_id.isNull())
		{
			LLStringUtil::format_map_t map;
			map["[TEXT]"] = floater->getChild<LLUICtrl>("Edit")->getValue().asString();
			avatar_name = floater->getString("not_found", map);
			search_results->setEnabled(FALSE);
			floater->getChildView("ok_btn")->setEnabled(FALSE);
		}
		else
		{
			avatar_name = LLCacheName::buildFullName(first_name, last_name);
			search_results->setEnabled(TRUE);
			found_one = TRUE;

			LLAvatarName av_name;
			av_name.mLegacyFirstName = first_name;
			av_name.mLegacyLastName = last_name;
			av_name.mDisplayName = avatar_name;
			const LLUUID& agent_id = avatar_id;
			sAvatarNameMap[agent_id] = av_name;

		}
		LLSD element;
		element["id"] = avatar_id; // value
		element["columns"][0]["column"] = "name";
		element["columns"][0]["value"] = avatar_name;
		search_results->addElement(element);
	}

	if (found_one)
	{
		floater->getChildView("ok_btn")->setEnabled(TRUE);
		search_results->selectFirstItem();
		floater->onList();
		search_results->setFocus(TRUE);
	}
}
コード例 #10
0
//static
void wlfPanel_AdvSettings::updateClass()
{
	if (!instanceExists()) return;
	instance().build();
}