Ejemplo n.º 1
0
	void CStorageManager::GenerateIncNumber(TInt aIndex, TDes& aDes)
		/**
		Generates number from int to string in range 0 - 999

		@param aIndex - Number
		@param aDes - A Descriptor
		*/

		{
		if (aIndex <= 9)
			{
			aDes.AppendNum(0);
			aDes.AppendNum(0);
			aDes.AppendNum(aIndex);
			}
		else if (aIndex <= 99)
			{
			aDes.AppendNum(0);
			aDes.AppendNum(aIndex);
			}
		else if (aIndex <= 999)
			{
			aDes.AppendNum(aIndex);
			}
		else
			{
			_LIT(KPanic1, "Number greater then 999 ");
			User::Panic(KPanic1, KErrNotSupported);
			}
		}
void CSCOMOAdapterDb::PrepareLuidQuery(TInt aLuid, TDes& aSqlQuery)
{
	aSqlQuery.Copy(_L("SELECT * FROM "));
    aSqlQuery.Append(KTableAMMgmtObject);
    aSqlQuery.Append(_L(" WHERE "));
    aSqlQuery.Append(NCol2);
    aSqlQuery.Append(_L(" = "));
    aSqlQuery.AppendNum(aLuid);
}
Ejemplo n.º 3
0
/*
-------------------------------------------------------------------------
-------------------------------------------------------------------------
*/
void CTraceContainer::GetInfoBufferL(TExampleItem& aItem,TDes& aBuffer)
{
	aBuffer.Zero();

	
	aBuffer.Append(_L("\n"));
	aBuffer.Append(_L("Time:\n"));
	aBuffer.AppendNum(aItem.iTime.DateTime().Hour());
	aBuffer.Append(_L(":"));
	if(aItem.iTime.DateTime().Minute() < 10)
	{
		aBuffer.AppendNum(0);	
	}
	aBuffer.AppendNum(aItem.iTime.DateTime().Minute());
	aBuffer.Append(_L(":"));
	if(aItem.iTime.DateTime().Second() < 10)
	{
		aBuffer.AppendNum(0);	
	}
	aBuffer.AppendNum(aItem.iTime.DateTime().Second());
	
	aBuffer.Append(_L(" - "));

	if(aItem.iTime.DateTime().Day() < 9)
	{
		aBuffer.AppendNum(0);	
	}
	aBuffer.AppendNum(aItem.iTime.DateTime().Day() + 1);
	aBuffer.Append(_L("/"));
	
	TMonthNameAbb ThisMonth(aItem.iTime.DateTime().Month());
	aBuffer.Append(ThisMonth);
	aBuffer.Append(_L("/"));
	
	TInt Yearrr = aItem.iTime.DateTime().Year();
	TInt Hudreds = Yearrr / 100;
	
	Yearrr = (Yearrr - (Hudreds * 100));
	if(Yearrr < 10)
	{
		aBuffer.AppendNum(0);	
	}
	
	aBuffer.AppendNum(Yearrr);
	aBuffer.Append(_L("\n"));
}
Ejemplo n.º 4
0
EXPORT_C void TE64Addr::Output(TDes& aBuf) const
{
	TPtrC8 e64Addr(AddrPtrC(), AddrLen());
	TUint i;

	for (i = 0; i < AddrLen(); i++)
	{
		if (i) {
			aBuf.Append(':');
		}

		aBuf.AppendNum(TUint(e64Addr[i]), EHex);
	}
}
Ejemplo n.º 5
0
void TlsCacheUtil::BuildCacheFileNameL(TDes& aFileName, TUid aSid, RFs& aFs)
	{
	TDriveUnit drive(SystemDrive());
	TDriveName driveName(drive.Name());
	aFileName.Append(driveName);
	
	TPath path;
	User::LeaveIfError(aFs.PrivatePath(path));
	aFileName.Append(path);
	
	_LIT(KCacheExtension, ".cce");
	aFileName.AppendNum(aSid.iUid, EHex);
	aFileName.Append(KCacheExtension);
	}
Ejemplo n.º 6
0
/**
This global function is used for the creation of the name of the semaphore, which helps
RWindows functionality to detect the moment, when the related Windows OS window can be 
destroyed safely - no more clients (Symbian OS screen devices).
@param aScreenNo Screen number
@param aScreenSemaphoreName An output parameter, where the semaphore name will be constructed
                            in the following format "WindowInUseSemaphore<ScreenNo>".
                            The length of aScreenSemaphoreName should be big enough for
                            the semaphore name.
@internalComponent
*/
void CreateScreenSemaphoreName(TInt aScreenNo, TDes& aScreenSemaphoreName)
    {
    aScreenSemaphoreName.Copy(KWindowInUseSemaphore);
    aScreenSemaphoreName.AppendNum(aScreenNo);
    }
Ejemplo n.º 7
0
/*
-------------------------------------------------------------------------
-------------------------------------------------------------------------
*/
void CCrashContainer::GetInfoBufferL(CExampleItem& aItem,TDes& aBuffer)
{
	aBuffer.Zero();
	
/*	if(aItem.iProcess)
	{
		aBuffer.Append(_L("Executable:\n"));
		aBuffer.Append(*aItem.iProcess);
	
		aBuffer.Append(_L("\n"));
	}
*/	
	if(aItem.iName)
	{
		aBuffer.Append(_L("Thread name:\n"));
		aBuffer.Append(*aItem.iName);
	
		aBuffer.Append(_L("\n"));
	}
	
	if(aItem.iExitCatogory)
	{
		aBuffer.Append(_L("Exit category:\n"));
		aBuffer.Append(*aItem.iExitCatogory);
	
		aBuffer.Append(_L("\n"));
	}
	
	aBuffer.Append(_L("Exit type:\n"));

	switch(aItem.iExitType)
	{
	case EExitKill:
		aBuffer.Append(_L("Kill"));
		break;
	case EExitTerminate:
		aBuffer.Append(_L("Terminate"));
		break;
	case EExitPanic:
		aBuffer.Append(_L("Panic"));
		break;
	case EExitPending:
		aBuffer.Append(_L("Pend"));
		break;
	}

	aBuffer.Append(_L("\n"));
	aBuffer.Append(_L("Exit reason:\n"));
	aBuffer.AppendNum(aItem.iExitReason);
	
	aBuffer.Append(_L("\n"));
	aBuffer.Append(_L("Time:\n"));
	aBuffer.AppendNum(aItem.iTime.DateTime().Hour());
	aBuffer.Append(_L(":"));
	if(aItem.iTime.DateTime().Minute() < 10)
	{
		aBuffer.AppendNum(0);	
	}
	aBuffer.AppendNum(aItem.iTime.DateTime().Minute());
	aBuffer.Append(_L(":"));
	if(aItem.iTime.DateTime().Second() < 10)
	{
		aBuffer.AppendNum(0);	
	}
	aBuffer.AppendNum(aItem.iTime.DateTime().Second());
	
	aBuffer.Append(_L(" - "));

	if(aItem.iTime.DateTime().Day() < 9)
	{
		aBuffer.AppendNum(0);	
	}
	aBuffer.AppendNum(aItem.iTime.DateTime().Day() + 1);
	aBuffer.Append(_L("/"));
	
	TMonthNameAbb ThisMonth(aItem.iTime.DateTime().Month());
	aBuffer.Append(ThisMonth);
	aBuffer.Append(_L("/"));
	
	TInt Yearrr = aItem.iTime.DateTime().Year();
	TInt Hudreds = Yearrr / 100;
	
	Yearrr = (Yearrr - (Hudreds * 100));
	if(Yearrr < 10)
	{
		aBuffer.AppendNum(0);	
	}
	
	aBuffer.AppendNum(Yearrr);
	aBuffer.Append(_L("\n"));
}