本文整理汇总了C++中TFullName类的典型用法代码示例。如果您正苦于以下问题:C++ TFullName类的具体用法?C++ TFullName怎么用?C++ TFullName使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了TFullName类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: list
EXPORT_C TInt RAknKeylock2::Connect()
{
TInt ret = KErrNotReady;
CCoeEnv* coe = CCoeEnv::Static();
if (!coe)
{
return KErrNotSupported; // we need that window group list
}
TApaTaskList list(CCoeEnv::Static()->WsSession());
TApaTask task = list.FindApp(KAknCapServerUid);
if (task.Exists() )
{
if ( Handle() == NULL)
{
_LIT(KServerNameFormat, "%08x_%08x_AppServer");
TFullName serverName;
TUid serviceUid = KAknNotifierServiceUid;
serverName.Format(KServerNameFormat, KUikonUidPluginInterfaceNotifiers, KAknCapServerUid);
ret = CreateSession(serverName,*reinterpret_cast<TVersion*>(&serviceUid));
}
else
{
ret = KErrNone; // or should this be KErrAlreadyExist
}
}
return ret;
}
开发者ID:cdaffara,项目名称:symbiandump-mw1,代码行数:27,代码来源:AknKeyLock.cpp
示例2: NumberOfCpus
TInt CCpuMeter::Construct()
{
iNumCpus = NumberOfCpus();
iNullThreads = (RThread*)User::AllocZ(iNumCpus*sizeof(RThread));
iDelta = (TInt*)User::AllocZ(iNumCpus*sizeof(TInt));
iMeas[0] = (TTimeIntervalMicroSeconds*)User::AllocZ(iNumCpus*sizeof(TTimeIntervalMicroSeconds));
iMeas[1] = (TTimeIntervalMicroSeconds*)User::AllocZ(iNumCpus*sizeof(TTimeIntervalMicroSeconds));
if (!iNullThreads || !iDelta || !iMeas[0] || !iMeas[1])
return KErrNoMemory;
TFullName kname;
_LIT(KLitKernelName, "ekern.exe*");
_LIT(KLitNull, "::Null");
TFindProcess fp(KLitKernelName);
test_KErrNone(fp.Next(kname));
test.Printf(_L("Found kernel process: %S\n"), &kname);
kname.Append(KLitNull);
TInt i;
for (i=0; i<iNumCpus; ++i)
{
TFullName tname(kname);
TFullName tname2;
if (i>0)
tname.AppendNum(i);
TFindThread ft(tname);
test_KErrNone(ft.Next(tname2));
TInt r = iNullThreads[i].Open(ft);
test_KErrNone(r);
iNullThreads[i].FullName(tname2);
test.Printf(_L("Found and opened %S\n"), &tname2);
}
for (i=0; i<iNumCpus; ++i)
iNullThreads[i].GetCpuTime(iMeas[0][i]);
iNextMeas = 1;
return KErrNone;
}
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:35,代码来源:cpumeter.cpp
示例3: LOG1
/**
* To start silent preinstallations.
*/
void CSilentMIDletInstall::Start()
{
iState = EFindOutDeviceDrives;
// Check if an explicit roll-back of a previous installation is needed
// in the case there is nothing to pre-install (if there is something
// to pre-install, the potential roll-back is done automatically)
TUint attrs;
TInt err = iFs.Att(KISJournalFile, attrs);
LOG1(EJavaPreinstaller, EInfo,
"Checking IS journal file \\private\\102033E6\\installer\\is\\isjournal.dat, status %d", err);
if ((KErrNotFound == err) || (KErrPathNotFound == err))
{
iISRollbackNeeded = EFalse;
}
else
{
iISRollbackNeeded = ETrue;
// If JavaInstaller is running, then existence of the Java Installer
// integrity service directory is ok and rollback is not needed.
TFullName processName;
_LIT(KJavaInstallerProcess, "Installer*");
TFindProcess finder(KJavaInstallerProcess);
err = finder.Next(processName);
if (err == KErrNone)
{
iISRollbackNeeded = EFalse;
WLOG1(EJavaPreinstaller,
"Java Installer is running while checking need to rollback (%S)",
(wchar_t *)(processName.PtrZ()));
}
}
CompleteRequest();
}
开发者ID:cdaffara,项目名称:symbiandump-ossapps,代码行数:38,代码来源:silentmidletinstall.cpp
示例4: KillProcess
//This function is used in the test code to kill ECOMSERVER
//processes (or some other) when they leftover and may problem in ECOMSERVERTEST
static TInt KillProcess(const TDesC& aProcessName)
{
TFullName name;
RDebug::Print(_L("Find and kill \"%S\" process.\n"), &aProcessName);
TBuf<64> pattern(aProcessName);
TInt length = pattern.Length();
pattern += _L("*");
TFindProcess procFinder(pattern);
while(procFinder.Next(name) == KErrNone)
{
if(name.Length() > length)
{
//If found name is a string containing aProcessName string.
TChar c(name[length]);
if(c.IsAlphaDigit() || c == TChar('_') || c == TChar('-'))
{
//If the found name is other valid application name starting with aProcessName string.
RDebug::Print(_L(":: Process name: \"%S\".\n"), &name);
continue;
}
}
RProcess proc;
if(proc.Open(name) == KErrNone)
{
proc.Kill(0);
RDebug::Print(_L("\"%S\" process killed.\n"), &name);
}
proc.Close();
}
return KErrNone;
}
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:36,代码来源:t_processkillprocess.cpp
示例5: defined
void CWsTop::NewSession(const CWsClient *aClient)
{
if (iShellClient==NULL && iShell)
{
#if defined(__WINS__)
RThread proc;
proc=aClient->Client();
#else
RProcess proc;
aClient->Client().Process(proc);
#endif
TFullName procName = proc.FullName();
// Before comparing the proc name with iShell name , truncate the proc name up to the actual name
// referring to the process, by removing the part which starts with ':', if exists.
TInt colonLocation = procName.Locate(':');
if( KErrNotFound != colonLocation)
{
procName = procName.Left(colonLocation);
}
if (procName ==iShell->FullName())
{
iShellClient=aClient;
if (!iPreviousShellClient)
{
iPreviousShellClient=ETrue;
aClient->Screen()->RootWindow()->SetColorIfClear();
}
}
#if !defined(__WINS__)
proc.Close();
#endif
}
}
开发者ID:,项目名称:,代码行数:33,代码来源:
示例6: HTI_LOG_FUNC_IN
// -----------------------------------------------------------------------------
// CHtiFramework::IsHtiRunning
// Checks whether HTI Framework process is already running.
// -----------------------------------------------------------------------------
TBool CHtiFramework::IsHtiRunning()
{
HTI_LOG_FUNC_IN( "CHtiFramework::IsHtiRunning" );
TInt htiInstanceCount = 0;
TBool isRunning = EFalse;
TFullName processName;
TFindProcess finder( KHtiFrameworkMatchPattern );
TInt err = finder.Next( processName );
while ( err == KErrNone && processName.Length() > 0 )
{
HTI_LOG_FORMAT( "Found process %S", &processName );
RProcess process;
err = process.Open( finder );
if ( err == KErrNone )
{
if ( process.ExitType() == EExitPending )
{
HTI_LOG_TEXT( "Process is running" );
htiInstanceCount++;
}
process.Close();
}
err = finder.Next( processName );
}
if ( htiInstanceCount > 1 )
{
isRunning = ETrue;
}
HTI_LOG_FUNC_OUT( "CHtiFramework::IsHtiRunning" );
return isRunning;
}
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:35,代码来源:HtiFramework.cpp
示例7: ProfileAllThreads
LOCAL_C void ProfileAllThreads()
{
TFindThread ft(_L("*"));
TFullName fullname;
test.Console()->ClearScreen();
FOREVER
{
TInt r=ft.Next(fullname);
if (r!=KErrNone)
break;
RThread t;
r=t.Open(ft);
if (r==KErrNone)
{
TProfileData data;
r=Profile.Read(t,data);
if (r==KErrNone)
{
while(fullname.Length()<40)
fullname.Append(TChar(' '));
test.Printf(_L("%S T=%9d C=%9d Y=%9d\n"),
&fullname,data.iTotalCpuTime,data.iMaxContinuousCpuTime,data.iMaxTimeBeforeYield);
}
t.Close();
}
}
}
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:27,代码来源:t_prof.cpp
示例8: IsAlreadyRunning
TBool IsAlreadyRunning()
{
RDebug::Print(_L("TrkLauncher::IsAlreadyRunning()"));
_LIT(KTrkConsoleSearchPattern, "*TRKPROCESS*");
_LIT(KTrkConsoleProcessPattern, "*");
TFindProcess finder;
TFullName fullName;
TBool found = EFalse;
finder.Find(KTrkConsoleProcessPattern);
while (!found && finder.Next(fullName) == KErrNone)
{
fullName.UpperCase();
if (fullName.Match(KTrkConsoleSearchPattern) != KErrNotFound)
{
found = ETrue;
RDebug::Print(_L("process found Inside while"));
break;
}
}
if (found)
{
RDebug::Print(_L("TrkLauncher - Process found outside while"));
}
else
{
RDebug::Print(_L("TrkLauncher - Process was never found"));
}
return found;
}
开发者ID:fedor4ever,项目名称:devicedbgsrvs,代码行数:35,代码来源:trklauncher.cpp
示例9: new
void CSuspendTest::CreateL()
{
//
// Create the eraser thread
//
iEraser = new(ELeave) CEraser;
iEraser->CreateL();
//
// Load the device drivers
//
TInt r;
#ifndef SKIP_PDD_LOAD
test.Printf( _L("Loading %S\n"), &KLfsDriverName );
r = User::LoadPhysicalDevice( KLfsDriverName );
test( KErrNone == r || KErrAlreadyExists == r );
#endif
#ifdef UNMOUNT_DRIVE
RFs fs;
test( KErrNone == fs.Connect() );
test( KErrNone == fs.SetSessionPath( _L("Z:\\") ) );
TFullName name;
fs.FileSystemName( name, KLffsLogicalDriveNumber );
if( name.Length() > 0 )
{
test.Printf( _L("Unmounting drive") );
test( KErrNone == fs.DismountFileSystem( _L("Lffs"), KLffsLogicalDriveNumber) );
User::After( 2000000 );
test.Printf( _L("Drive unmounted") );
}
fs.Close();
#endif
//
// Open a TBusLogicalDevice to it
//
test.Printf( _L("Opening media channel\n") );
TBool changedFlag = EFalse;
r = iDrive.Connect( KDriveNumber, changedFlag );
User::LeaveIfError( r );
iDriveOpened = ETrue;
//
// Get size of Flash drive, block size, block count
//
TLocalDriveCapsV2Buf info;
iDrive.Caps(info);
iFlashSize = I64LOW(info().iSize);
iBlockSize = info().iEraseBlockSize;
iBlockCount = iFlashSize / iBlockSize;
test.Printf( _L("Flash size is 0x%x bytes\n"), iFlashSize );
test.Printf( _L("Block size is 0x%x bytes\n"), iBlockSize );
test.Printf( _L("Block count is %d\n"), iBlockCount );
test.Printf( _L("CreateL complete\n") );
}
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:58,代码来源:tf_suspendsoakw.cpp
示例10: AppendProcessToBuffer
/**
* Writes the required process details to the stop mode response buffer in the form of a
* TProcessListEntry structure
* @param aProc Process to write
* @param aBuffer Buffer to write to
* @param aBufferEnd Where the buffer ends
* @return TInt KErrTooBig if there is no more space in buffer or one of the other system wide error codes
*/
TInt StopModeDebug::AppendProcessToBuffer(DProcess* aProc, TUint8* aBuffer, TUint8* aBufferEnd, TUint32& aProcSize)
{
TFullName procName;
GetObjectFullName(aProc, procName);
TUint32 dynamicNameLength = procName.Length();
DCodeSeg* codeSeg = aProc->iCodeSeg;
TUint16 fileNameLength = (codeSeg) ? (*codeSeg->iFileName).Length() : 0;
//Struct size is unicode so the filenames are twice as long, plus the size of the struct minus one character that
//lives inside the struct itself. Also, this is word aligned
TUint32 structSize = Align4( (2*fileNameLength) + (2*dynamicNameLength) + sizeof(TProcessListEntry) - sizeof(TUint16));
aProcSize = structSize;
//Is there space to write this to the buffer
if(aBuffer + structSize < aBufferEnd)
{
TProcessListEntry& entry = *(TProcessListEntry*)(aBuffer);
entry.iProcessId = (TUint64)aProc->iId;
entry.iFileNameLength = fileNameLength;
entry.iDynamicNameLength = dynamicNameLength;
entry.iUid3 = aProc->iUids.iUid[2].iUid;
entry.iAttributes = aProc->iAttributes;
//Write the filename
if(codeSeg)
{
//create TPtr to where the file name should be written
TPtr name = TPtr((TUint8*)&(entry.iNames[0]), fileNameLength*2, fileNameLength*2);
//copy the file name
TInt err = CopyAndExpandDes(*codeSeg->iFileName, name);
if(KErrNone != err)
{
return KErrGeneral;
}
}
//create TPtr to where the dynamic name should be written
TPtr name = TPtr((TUint8*)(&(entry.iNames[0]) + fileNameLength), dynamicNameLength*2, dynamicNameLength*2);
//copy the dynamic name
TInt err = CopyAndExpandDes(procName, name);
if(KErrNone != err)
{
return KErrGeneral;
}
return KErrNone;
}
else
{
return KErrTooBig;
}
}
开发者ID:,项目名称:,代码行数:64,代码来源:
示例11: IsProcessRunning
TBool IsProcessRunning(const TDesC& aProcessName)
{
TFullName name;
TBool IsProcessRunning(EFalse);
TBuf<64> pattern(aProcessName);
TInt length = pattern.Length();
pattern += _L("*");
TFindProcess procFinder(pattern);
while(procFinder.Next(name) == KErrNone)
{
if(name.Length() > length)
{//If found name is a string containing aProcessName string.
TChar c(name[length]);
if(c.IsAlphaDigit() || c == TChar('_') || c == TChar('-'))
{//If the found name is other valid application name starting with aProcessName string.
RDebug::Print(_L(":: Process name: \"%S\".\n"), &name);
continue;
}
}
RProcess proc;
if(proc.Open(name) == KErrNone)
{
if (EExitKill == proc.ExitType())
{
RDebug::Print(_L("\"%S\" process killed.\n"), &name);
proc.Close();
IsProcessRunning = EFalse;
}
else
{
IsProcessRunning = ETrue;
RDebug::Print(_L("\"%S\" process is running.\n"), &name);
}
if(IsProcessRunning)
{
RDebug::Print(_L("Waiting additional time...\n"), &name);
User::After(1000000);
if (EExitKill == proc.ExitType())
{
RDebug::Print(_L("\"%S\" process now killed.\n"), &name);
IsProcessRunning = EFalse;
}
proc.Close();
}
}
}
return IsProcessRunning;
}
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:55,代码来源:t_sysagt2.cpp
示例12: _LIT
//-----------------------------------------------------------------------------
// RDynNotifier::Connect
//-----------------------------------------------------------------------------
//
TInt RDynNotifier::Connect()
{
TInt ret = KErrNone;
if ( Handle() == NULL)
{
_LIT(KServerNameFormat, "%08x_%08x_AppServer");
TFullName serverName;
TUid serviceUid = KAknNotifierServiceUid;
serverName.Format(KServerNameFormat, KUikonUidPluginInterfaceNotifiers, KAknCapServerUid);
ret = CreateSession(serverName,*reinterpret_cast<TVersion*>(&serviceUid));
}
return ret;
}
开发者ID:cdaffara,项目名称:symbiandump-mw1,代码行数:17,代码来源:AknDynamicNotifier.cpp
示例13: GetObjectFullName
/**
* Reads the raw name for this object instead of using API in DObject,
* as we can't meet the preconditions
* @param DObject object whose name we want
*/
void StopModeDebug::GetObjectFullName(const DObject* aObj, TFullName& aName)
{
if(aObj->iOwner)
{
GetObjectFullName(aObj->iOwner, aName);
aName.Append(KColonColon);
}
if (aObj->iName)
{
aName.Append(*aObj->iName);
}
else
{
aName.Append(KLitLocal);
aName.AppendNumFixedWidth((TInt)aObj,EHex,8);
}
}
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:23,代码来源:d_stopmode.cpp
示例14: pathdes
wchar_t * PosixFilesystem::getcwd (RFs& aFs, wchar_t* buf, unsigned long len, int& anErrno)
{
TFullName name;
TInt err = aFs.SessionPath(name);
if (!err)
{
TPtr16 pathdes((TText16 *)buf, len);
if (pathdes.MaxLength() >= (name.Length() + 1)) //+1 to allow for the null terminator
{
pathdes.Copy(name);
pathdes.ZeroTerminate();
return buf;
}
else
err = ERANGE; //out of range
}
MapError(err, anErrno);
return 0;
}
开发者ID:kuailexs,项目名称:symbiandump-os2,代码行数:19,代码来源:POSIXFS.CPP
示例15: MountNTFS
TInt MountNTFS()
{
TBuf<256> cmd;
User::CommandLine(cmd);
TLex cmdlex(cmd);
cmdlex.SkipSpace();
TUint c = (TUint)cmdlex.Get();
if (c>='a' && c<='z')
c-=0x20;
if (c<'A' || c>'Z')
return KErrArgument;
TBuf<4> driveLetter;
driveLetter.SetLength(1);
driveLetter[0] = (TText)c;
RDebug::Print(_L("Drive %S"), &driveLetter);
TInt driveNumber = TInt(c-'A') + TInt(EDriveA);
TInt r;
driveLetter.Append(_L(":\\"));
RDebug::Print(_L("Add file system: %S"), &KFileSystemDllName);
r=TheFs.AddFileSystem(KFileSystemDllName);
if (r!=KErrNone && r!=KErrAlreadyExists)
{
RDebug::Print(_L("Failed: %d"), r);
return r;
}
TFullName name;
r = TheFs.FileSystemName(name, driveNumber);
if (name.Length() != 0)
{
RDebug::Print(_L("Dismounting %S on drive %S\r\n"), &name, &driveLetter);
r=TheFs.DismountFileSystem(name, driveNumber);
RDebug::Print(_L("Dismount ret=%d"), r);
}
RDebug::Print(_L("Mount NTFS on drive %S\r\n"), &driveLetter);
r = TheFs.MountFileSystem(KFileSystemName, driveNumber);
RDebug::Print(_L("Mount r=%d"),r);
return KErrNone;
}
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:42,代码来源:loadntfs.cpp
示例16: CheckMMC
// -----------------------------------------------------------------------------
// CDevEncStarterMmcObserver::CheckMMC
//
// -----------------------------------------------------------------------------
TInt CDevEncStarterMmcObserver::CheckMMC()
{
// Check if MMC mounted, mount if required
TFullName fsname;
// If can't use the drive, returns KErrNotFound
TInt err = iFs.FileSystemName( fsname, mmcDrive );
if ( !err )
{
// MMC found. Checking if it is mounted
if ( fsname.Length( ) == 0 )
{
// MMC not mounted ( file system name is empty )
DFLOG( "Mmc not mounted" );
err = KErrDisMounted;
}
}
return err;
}
开发者ID:kuailexs,项目名称:symbiandump-mw3,代码行数:24,代码来源:DevEncStarterMmcObserver.cpp
示例17: FindNullThread
/**
* Opens a handle to the null thread.
*/
static TBool FindNullThread( RThread& aThread )
{
TFindProcess fp( KNullThreadProcessName );
TFullName kernelName;
if ( fp.Next( kernelName ) == KErrNone )
{
kernelName.Append( KNullThreadName );
TFindThread ft( kernelName );
TFullName threadName;
if ( ft.Next( threadName ) == KErrNone )
{
if ( aThread.Open( threadName ) != KErrNone )
{
return EFalse;
}
}
}
return ( aThread.Handle() != 0 );
}
开发者ID:cdaffara,项目名称:symbiandump-mw1,代码行数:24,代码来源:aknphysics.cpp
示例18: DoKillProcessL
// ==============================================================
// ============ DoKillProcessL() =============
// ==============================================================
void DoKillProcessL( const TDesC& aProcessName )
{
TFullName psName;
psName.Append( _L("*") );
psName.Append( aProcessName );
psName.Append( _L("*") );
TFindProcess psFinder;
psFinder.Find( psName );
TInt killCount( 0 );
while( psFinder.Next( psName ) != KErrNotFound )
{
RProcess ps;
User::LeaveIfError( ps.Open( psFinder ) );
ps.Kill( -666 );
ps.Close();
killCount++;
}
User::Leave( killCount );
}
开发者ID:kuailexs,项目名称:symbiandump-mw1,代码行数:25,代码来源:prfwtestprocessmaster.cpp
示例19: CALLSTACKITEM_N
void CLogAlarmImpl::GetAlarm()
{
#ifndef __WINS__
CALLSTACKITEM_N(_CL("CLogAlarmImpl"), _CL("GetAlarm"));
TAlarmInfo info;
TAlarmSetState state;
TInt i, err=-1;
auto_ptr<CAlarmIdArray> ids(new (ELeave) CAlarmIdArray(8));
iAlarmServer.AlarmArrayPopulateL(*ids.get(), RAlarmServer::EArrayNext, 8);
iValue()=TTime(0);
for (i=0; i<ids->Count(); i++) {
err=iAlarmServer.AlarmInfo(info, RAlarmServer::EInfoClock, ids->At(i));
TFullName owner;
if (err==KErrNone) {
iAlarmServer.AlarmOwner(owner, ids->At(i));
}
if (err==KErrNone ) {
state=iAlarmServer.AlarmState(info.iAlarmId);
if (state!=EAlarmNotSet && state!=EAlarmDisabled && info.iType==EAlarmTypeClock &&
owner.FindF(_L("Agenda"))==KErrNotFound)
break;
}
if (err!=KErrNotFound) {
User::LeaveIfError(err);
}
err=KErrNotFound;
}
if (err==KErrNone) {
/* AlarmTime is when the alarm will next go off,
* e.g., after a snooze
*/
iValue()=info.iAlarmTime;
}
#endif
}
开发者ID:flaithbheartaigh,项目名称:jaikuengine-mobile-client,代码行数:36,代码来源:log_alarm.cpp
示例20: KillProcess
static TInt KillProcess(const TDesC& aProcessName)
{
TFullName name;
//TheTest.Printf(_L("Find and kill \"%S\" process.\n"), &aProcessName);
TBuf<64> pattern(aProcessName);
TInt length = pattern.Length();
pattern += _L("*");
TFindProcess procFinder(pattern);
while (procFinder.Next(name) == KErrNone)
{
if (name.Length() > length)
{//If found name is a string containing aProcessName string.
TChar c(name[length]);
if (c.IsAlphaDigit() ||
c == TChar('_') ||
c == TChar('-'))
{
// If the found name is other valid application name
// starting with aProcessName string.
//TheTest.Printf(_L(":: Process name: \"%S\".\n"), &name);
continue;
}
}
RProcess proc;
if (proc.Open(name) == KErrNone)
{
//RPorcess::Kill() is expected to be used here.
//But it is impossible, because the test application will need "PowerMgmt" capability.
//But if the test application has "PowerMgmt" capability, then it won't be possible to use the
//sqlite3_secure library, which has "ProtServ" capability only.
}
proc.Close();
}
return KErrNone;
}
开发者ID:cdaffara,项目名称:symbiandump-mw1,代码行数:36,代码来源:tsqlitesecure_perf.cpp
注:本文中的TFullName类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论