Original Symbian headers
Selected EUSER, Window Server, networking, graphics and device declarations
Loading...
Searching...
No Matches
User Class Reference

Set of static user functions. More...

#include <e32std.h>

Inheritance diagram for User:
UserHeap

Public Types

enum  TCritical {
  ENotCritical , EProcessCritical , EProcessPermanent , EAllThreadsCritical ,
  ESystemCritical , ESystemPermanent
}
 A set of values that defines the effect that terminating a thread has, either on its owning process or on the whole system. More...
 
enum  TRealtimeState { ERealtimeStateOff , ERealtimeStateOn , ERealtimeStateWarn }
 
- Public Types inherited from UserHeap
enum  TChunkHeapCreateMode { EChunkHeapSwitchTo = 0x1 , EChunkHeapDuplicate = 0x2 , EChunkHeapMask = EChunkHeapSwitchTo | EChunkHeapDuplicate }
 Flags to control the heap creation. More...
 

Static Public Member Functions

static IMPORT_C void InitProcess ()
 Internal component API.
 
static IMPORT_C void Exit (TInt aReason)
 Terminates the current thread, specifying a reason.
 
static IMPORT_C void Panic (const TDesC &aCategory, TInt aReason)
 Panics the current thread, specifying a category name and panic number.
 
static IMPORT_C void HandleException (TAny *aInfo)
 Internal component API.
 
static IMPORT_C void Leave (TInt aReason)
 Leaves the currently executing function, unwinds the call stack, and returns from the most recently entered trap harness.
 
static IMPORT_C void LeaveNoMemory ()
 Leaves with the specific reason code KErrNoMemory.
 
static IMPORT_C TInt LeaveIfError (TInt aReason)
 Leaves or returns with a specified reason code.
 
static IMPORT_C TAny * LeaveIfNull (TAny *aPtr)
 Leaves with the reason code KErrNoMemory, if the specified pointer is NULL.
 
static const TAny * LeaveIfNull (const TAny *aPtr)
 Leaves with the reason code KErrNoMemory, if the specified pointer is NULL.
 
static IMPORT_C TTrapHandler * SetTrapHandler (TTrapHandler *aHandler)
 Sets the current thread's trap handler and returns a pointer to any pre-existing trap handler.
 
static IMPORT_C TTrapHandler * TrapHandler ()
 Gets a pointer to the current thread's trap handler.
 
static IMPORT_C TTrapHandler * MarkCleanupStack ()
 Internal component API.
 
static IMPORT_C void UnMarkCleanupStack (TTrapHandler *aHandler)
 Internal component API.
 
static IMPORT_C void LeaveEnd ()
 Internal component API.
 
static IMPORT_C TInt InfoPrint (const TDesC &aDes)
 Invokes the notifier server to display a text message on the screen for a short time.
 
static IMPORT_C void RequestComplete (TRequestStatus *&aStatus, TInt aReason)
 Signals the current thread that the asynchronous request associated with the specified request status object is complete.
 
static IMPORT_C void WaitForAnyRequest ()
 Waits for any asynchronous request to complete.
 
static IMPORT_C void WaitForRequest (TRequestStatus &aStatus)
 Waits for a specific asynchronous request to complete.
 
static IMPORT_C void WaitForRequest (TRequestStatus &aStatus1, TRequestStatus &aStatus2)
 Waits for either of two specific asynchronous requests to complete.
 
static IMPORT_C void WaitForNRequest (TRequestStatus *aStatusArray[], TInt aNum)
 Waits for any one of specific asynchronous requests to complete.
 
static IMPORT_C TInt AllocLen (const TAny *aCell)
 Gets the length of the specified allocated heap cell.
 
static IMPORT_C TAny * Alloc (TInt aSize)
 Allocates a cell of specified size from the current thread's heap.
 
static IMPORT_C TAny * AllocL (TInt aSize)
 Allocates a cell of specified size from the current thread's heap, and leaves if there is insufficient memory in the heap.
 
static IMPORT_C TAny * AllocLC (TInt aSize)
 Allocates a cell of specified size from the current thread's default heap, and, if successful, places a pointer to the cell onto the cleanup stack.
 
static IMPORT_C TAny * AllocZ (TInt aSize)
 Allocates a cell of specified size from the current thread's default heap, and clears it to binary zeroes.
 
static IMPORT_C TAny * AllocZL (TInt aSize)
 Allocates a cell of specified size from the current thread's default heap, clears it to binary zeroes, and leaves if there is insufficient memory in the heap.
 
static IMPORT_C TInt AllocSize (TInt &aTotalAllocSize)
 Gets the total number of cells allocated on the current thread's default heap, and the total space allocated to them.
 
static IMPORT_C TInt Available (TInt &aBiggestBlock)
 Gets the total free space currently available on the current thread's default heap, and the space available in the largest free block.
 
static IMPORT_C TInt CountAllocCells ()
 Gets the total number of cells allocated on the current thread's default heap.
 
static IMPORT_C TInt CountAllocCells (TInt &aFreeCount)
 Gets the the total number of cells allocated, and the number of free cells, on the current thread's default heap.
 
static IMPORT_C void Free (TAny *aCell)
 Frees the specified cell and returns it to the current thread's default heap.
 
static IMPORT_C void FreeZ (TAny *&aCell)
 Frees the specified cell, returns it to the current thread's default heap, and resets the pointer to NULL.
 
static IMPORT_C RAllocator & Allocator ()
 Gets the current thread's default current heap.
 
static RHeap & Heap ()
 Gets a reference to the handle to the current thread's heap.
 
static IMPORT_C TAny * ReAlloc (TAny *aCell, TInt aSize, TInt aMode=0)
 Increases or decreases the size of an existing cell in the current thread's heap.
 
static IMPORT_C TAny * ReAllocL (TAny *aCell, TInt aSize, TInt aMode=0)
 Increases or decreases the size of an existing cell, and leaves if there is insufficient memory in the current thread's default heap.
 
static IMPORT_C RAllocator * SwitchAllocator (RAllocator *aAllocator)
 Changes the current thread's heap.
 
static RHeap * SwitchHeap (RAllocator *aHeap)
 Changes the current thread's heap.
 
static IMPORT_C TInt CompressAllHeaps ()
 Compresses all the chunks containing heaps.
 
static IMPORT_C void After (TTimeIntervalMicroSeconds32 aInterval)
 Suspends the current thread until a specified time interval has expired.
 
static IMPORT_C TInt At (const TTime &aTime)
 Suspends the current thread until the specified absolute time, in the current time zone.
 
static IMPORT_C void AfterHighRes (TTimeIntervalMicroSeconds32 aInterval)
 Suspends the current thread until a specified time interval has expired to a resolution of 1ms .
 
static IMPORT_C TInt SetHomeTime (const TTime &aTime)
 Sets the home time to a specified time value.
 
static IMPORT_C TInt SetHomeTimeSecure (const TTime &aTime)
 Sets the secure home time to a specified time value.
 
static IMPORT_C TInt SetUTCTime (const TTime &aUTCTime)
 Sets the UTC time to a specified time value.
 
static IMPORT_C TInt SetUTCTimeSecure (const TTime &aUTCTime)
 Sets the secure UTC time to a specified time value.
 
static IMPORT_C TTimeIntervalSeconds UTCOffset ()
 Gets the UTC offset - the difference between UTC and the current local time due to any time zones and daylight savings time that may be in effect.
 
static IMPORT_C void SetUTCOffset (TTimeIntervalSeconds aOffset)
 Sets the UTC offset to the given number of seconds.
 
static IMPORT_C TInt SetUTCTimeAndOffset (const TTime &aUTCTime, TTimeIntervalSeconds aOffset)
 Sets the UTC time and UTC offset to the specified values, atomically.
 
static IMPORT_C TInt SetCurrencySymbol (const TDesC &aSymbol)
 Sets the system wide currency symbol.
 
static IMPORT_C TInt SetFloatingPointMode (TFloatingPointMode aMode, TFloatingPointRoundingMode aRoundingMode=EFpRoundToNearest)
 Sets the hardware floating point mode for the current thread.
 
static IMPORT_C TUint TickCount ()
 Gets the current tick count.
 
static IMPORT_C TUint32 NTickCount ()
 Gets the nanokernel tick count.
 
static IMPORT_C TTimerLockSpec LockPeriod ()
 Returns which of the periods the clock is currently in.
 
static IMPORT_C TTimeIntervalSeconds InactivityTime ()
 Gets the time since the last user activity.
 
static IMPORT_C void ResetInactivityTime ()
 Resets all user inactivity timers.
 
static IMPORT_C TUint32 FastCounter ()
 Gets the fast counter.
 
static IMPORT_C TInt LockedInc (TInt &aValue)
 Atomically (i.e.
 
static IMPORT_C TInt LockedDec (TInt &aValue)
 Atomically (i.e.
 
static IMPORT_C TInt SafeInc (TInt &aValue)
 Atomically increments the specified value by 1, if the value is > 0.
 
static IMPORT_C TInt SafeDec (TInt &aValue)
 Atomically decrements the specified value by 1, if the value is > 0.
 
static IMPORT_C TInt Beep (TInt aFrequency, TTimeIntervalMicroSeconds32 aDuration)
 Makes a beep tone with a specified frequency and duration.
 
static IMPORT_C TInt IsRomAddress (TBool &aBool, TAny *aPtr)
 Tests whether the specified address is in the ROM.
 
static IMPORT_C TInt BinarySearch (TInt aCount, const TKey &aKey, TInt &aPos)
 Performs a binary search for an array element containing a specified key.
 
static IMPORT_C TInt QuickSort (TInt aCount, const TKey &aKey, const TSwap &aSwap)
 Quick sorts array elements.
 
static IMPORT_C TLanguage Language ()
 Gets the language of the current locale.
 
static IMPORT_C TRegionCode RegionCode ()
 
static IMPORT_C TUint Collate (TUint aChar)
 Converts the character to its collated form.
 
static IMPORT_C TUint Fold (TUint aChar)
 Folds the specified character.
 
static IMPORT_C TUint LowerCase (TUint aChar)
 Converts the specified character to lower case.
 
static IMPORT_C TUint UpperCase (TUint aChar)
 Converts a specified character to upper case.
 
static IMPORT_C TUint Fold (TUint aChar, TInt aFlags)
 Folds the character according to a specified folding method.
 
static IMPORT_C TUint TitleCase (TUint aChar)
 Converts a specified character to its title case version.
 
static IMPORT_C TInt StringLength (const TUint8 *aString)
 Gets the length of a C style, null terminated, string of single-byte valued characters.
 
static IMPORT_C TInt StringLength (const TUint16 *aString)
 Gets the length of a C style, null terminated, string of double-byte valued characters.
 
static IMPORT_C TInt FreeLogicalDevice (const TDesC &aDeviceName)
 Frees the logical device driver DLL associated with a specified driver name.
 
static IMPORT_C TInt FreePhysicalDevice (const TDesC &aDriverName)
 Frees the physical device driver DLL associated with a specified driver name.
 
static IMPORT_C TInt LoadLogicalDevice (const TDesC &aFileName)
 Loads the logical device driver (LDD) DLL with the specified filename.
 
static IMPORT_C TInt LoadPhysicalDevice (const TDesC &aFileName)
 Loads the physical device driver (PDD) DLL with the specified filename.
 
static IMPORT_C TBool QueryVersionSupported (const TVersion &aCurrent, const TVersion &aRequested)
 Compares two version objects and returns true if the test version is less than the current version.
 
static IMPORT_C TVersion Version ()
 Retrieves the E32 component version number, which is the kernel architecture version number.
 
static IMPORT_C TInt SetMachineConfiguration (const TDesC8 &aConfig)
 Sets the machine configuration.
 
static IMPORT_C TInt MachineConfiguration (TDes8 &aConfig, TInt &aSize)
 Gets the machine configuration.
 
static IMPORT_C void SetDebugMask (TUint32 aVal)
 Sets the debug mask.
 
static IMPORT_C void SetDebugMask (TUint32 aVal, TUint aIndex)
 Sets the debug mask at the given index.
 
static IMPORT_C void SetJustInTime (const TBool aBoolean)
 Sets just-in-time debugging for this process on or off.
 
static IMPORT_C void Check ()
 Checks the validity of the current thread's default heap.
 
static IMPORT_C void Invariant ()
 Panics the current thread with a USER 0 panic.
 
static IMPORT_C TBool JustInTime ()
 Tests whether just-in-time debugging is on or off.
 
static IMPORT_C void __DbgMarkStart (TBool aKernel)
 Marks the start of heap cell checking for the current thread's default heap, or for the kernel heap.
 
static IMPORT_C void __DbgMarkCheck (TBool aKernel, TBool aCountAll, TInt aCount, const TUint8 *aFileName, TInt aLineNum)
 Checks the current number of allocated heap cells for the current thread's default heap, or the kernel heap.
 
static IMPORT_C TUint32 __DbgMarkEnd (TBool aKernel, TInt aCount)
 Marks the end of heap cell checking at the current nested level for the current thread's default heap, or the kernel heap.
 
static IMPORT_C void __DbgSetAllocFail (TBool aKernel, RAllocator::TAllocFail aFail, TInt aRate)
 Simulates a heap allocation failure for the current thread's default heap, or the kernel heap.
 
static IMPORT_C RAllocator::TAllocFail __DbgGetAllocFail (TBool aKernel)
 
static IMPORT_C void __DbgSetBurstAllocFail (TBool aKernel, RAllocator::TAllocFail aFail, TUint aRate, TUint aBurst)
 Simulates a heap allocation failure for the current thread's default heap, or the kernel heap.
 
static IMPORT_C TUint __DbgCheckFailure (TBool aKernel)
 Returns the number of heap allocation failures the current debug allocator fail function has caused so far.
 
static IMPORT_C void PanicUnexpectedLeave ()
 Internal component API.
 
static IMPORT_C TInt ValidateName (const TDesC &aName)
 Checks whether a specified name is a valid CObject name.
 
static IMPORT_C void IMB_Range (TAny *aStart, TAny *aEnd)
 Does the necessary preparations to guarantee correct execution of code in the specified virtual address range.
 
static IMPORT_C TInt CommandLineLength ()
 Gets the length of the data which is passed as an argument to the thread function of the current process's main thread when it is first scheduled to run.
 
static IMPORT_C void CommandLine (TDes &aCommand)
 Gets a copy of the data which is passed as an argument to the thread function of the current process's main thread when it is first scheduled to run.
 
static IMPORT_C TExceptionHandler ExceptionHandler ()
 Gets a pointer to the exception handler for the current thread.
 
static IMPORT_C TInt SetExceptionHandler (TExceptionHandler aHandler, TUint32 aMask)
 Sets a new exception handler for the current thread.
 
static IMPORT_C void ModifyExceptionMask (TUint32 aClearMask, TUint32 aSetMask)
 Changes the set of exceptions which the current thread's exception handler can deal with.
 
static IMPORT_C TInt RaiseException (TExcType aType)
 Raises an exception of a specified type on the current thread.
 
static IMPORT_C TBool IsExceptionHandled (TExcType aType)
 Tests whether the specified exception type can be handled by the current thread.
 
static IMPORT_C TCritical Critical ()
 Gets the critical state associated with the current thread.
 
static IMPORT_C TCritical Critical (RThread aThread)
 Gets the critical state associated with the specified thread.
 
static IMPORT_C TInt SetCritical (TCritical aCritical)
 Sets up or changes the effect that termination of the current thread has, either on its owning process, or on the whole system.
 
static IMPORT_C TCritical ProcessCritical ()
 Gets the critical state associated with the current process.
 
static IMPORT_C TCritical ProcessCritical (RProcess aProcess)
 Gets the critical state associated with the specified process.
 
static IMPORT_C TInt SetProcessCritical (TCritical aCritical)
 Sets up or changes the effect that termination of subsequently created threads will have, either on the owning process, or on the whole system.
 
static IMPORT_C TBool PriorityControl ()
 Tests whether the current process allows other processes to switch its priority between 'foreground' and 'background'.
 
static IMPORT_C void SetPriorityControl (TBool aEnable)
 Allows the current process to choose to have its priority switched by another process between 'foreground' and 'background'.
 
static IMPORT_C TInt SetRealtimeState (TRealtimeState aState)
 
static IMPORT_C TSecureId CreatorSecureId ()
 
static IMPORT_C TVendorId CreatorVendorId ()
 
static TBool CreatorHasCapability (TCapability aCapability, const char *aDiagnostic=0)
 
static TBool CreatorHasCapability (TCapability aCapability1, TCapability aCapability2, const char *aDiagnostic=0)
 
static IMPORT_C TInt ParameterLength (TInt aSlot)
 Gets the length of the specified item of environment data belonging to the current process.
 
static IMPORT_C TInt GetTIntParameter (TInt aSlot, TInt &aData)
 Gets the specified environment data item belonging to the current process; this is assumed to be a 32 bit value.
 
static IMPORT_C TInt GetDesParameter (TInt aSlot, TDes8 &aDes)
 Gets the specified environment data item belonging to the current process; this is assumed to be an 8-bit descriptor.
 
static IMPORT_C TInt GetDesParameter (TInt aSlot, TDes16 &aDes)
 Gets the specified environment data item belonging to the current process; this is assumed to be an 16-bit descriptor.
 
static IMPORT_C TInt RenameThread (const TDesC &aName)
 Assigns a new name to the current thread, replacing any existing name that may have been set.
 
static IMPORT_C TInt RenameProcess (const TDesC &aName)
 Assigns a new name to the current process, replacing any existing name.
 
static TUid Identity ()
 
static TUid CreatorIdentity ()
 
static IMPORT_C void NotifyOnIdle (TRequestStatus &aStatus)
 Internal technology API.
 
static IMPORT_C void CancelMiscNotifier (TRequestStatus &aStatus)
 Internal technology API.
 
- Static Public Member Functions inherited from UserHeap
static IMPORT_C RHeap * FixedHeap (TAny *aBase, TInt aMaxLength, TInt aAlign=0, TBool aSingleThread=ETrue)
 Creates a fixed length heap at a specified location.
 
static IMPORT_C RHeap * ChunkHeap (const TDesC *aName, TInt aMinLength, TInt aMaxLength, TInt aGrowBy=1, TInt aAlign=0, TBool aSingleThread=EFalse)
 Creates a heap in a local or global chunk.
 
static IMPORT_C RHeap * ChunkHeap (RChunk aChunk, TInt aMinLength, TInt aGrowBy=1, TInt aMaxLength=0, TInt aAlign=0, TBool aSingleThread=EFalse, TUint32 aMode=0)
 Creates a heap in an existing chunk.
 
static IMPORT_C RHeap * OffsetChunkHeap (RChunk aChunk, TInt aMinLength, TInt aOffset, TInt aGrowBy=1, TInt aMaxLength=0, TInt aAlign=0, TBool aSingleThread=EFalse, TUint32 aMode=0)
 Creates a heap in an existing chunk, offset from the beginning of the chunk.
 
static IMPORT_C RHeap * ChunkHeap (const TChunkHeapCreateInfo &aCreateInfo)
 Creates a chunk heap of the type specified by the parameter aCreateInfo.
 
static IMPORT_C TInt SetupThreadHeap (TBool aNotFirst, SStdEpocThreadCreateInfo &aInfo)
 
static IMPORT_C TInt CreateThreadHeap (SStdEpocThreadCreateInfo &aInfo, RHeap *&aHeap, TInt aAlign=0, TBool aSingleThread=EFalse)
 

Detailed Description

Set of static user functions.

These functions are related to a number of System component APIs.

The majority of the functions are related to either the current thread, or its heap. Examples in this category include User::Exit(), which causes the thread to terminate, and User::Alloc(), which allocates memory from the current thread's heap.

Some of these functions are equivalent to functions in the RThread or RHeap classes. In these cases, the User function is a convenient way to access the function without first having to get a handle to the current thread.

Functions are also provided to support debugging of memory leaks. These function calls can be written explicitly or can be generated using a corresponding macro - the advantage of using a macro is that the function call is only generated for debug builds.

A final category of functions, which includes User::BinarySearch() and User::QuickSort(), are just useful functions which have no other natural home.

See also
RThread
RHeap
API status
Published to all clients. Released API.

Definition at line 5021 of file e32std.h.

Member Enumeration Documentation

◆ TCritical

A set of values that defines the effect that terminating a thread has, either on its owning process or on the whole system.

A thread is said to be critical if its owning process or the entire system terminates when the thread itself terminates.

You pass one of these values to the functions:

The meaning of a value when passed to one function is different to its meaning when passed the other function. See the description of each individual value.

See also
User::SetCritical()
User::SetProcessCritical()
Enumerator
ENotCritical 

This value can be passed to both:

  • User::SetCritical(), which means that the current thread is no longer critical, i.e. termination of the current thread will no longer cause termination of the current thread's owning process (i.e. the current process) or a reboot of the system.
  • User::SetProcessCritical(), which means that threads subsequently created in the current thread's owning process (i.e. the current process) will no longer cause termination of that process or a reboot of the system. Note, however, that existing threads are NOT affected when you call this function.
See also
User::SetCritical()
User::SetProcessCritical()
EProcessCritical 

This value can only be passed to User::SetCritical() and affects the current thread only.

It means that the owning process (i.e.the current process) terminates if:

  • the current thread is terminated.
  • the current thread panics.
See also
User::SetCritical()
EProcessPermanent 

This value can only be passed to User::SetCritical() and affects the current thread only.

It means that the owning process (i.e.the current process) terminates if the current thread terminates for any reason.

See also
User::SetCritical()
EAllThreadsCritical 

This value can only be passed to User::SetProcessCritical() and affects any new threads created in the current process.

It means that the current process terminates if:

  • any new thread subsequently created in the current process is terminated.
  • any new thread subsequently created in the current process panics.

Note, however, that existing threads in the current process are NOT affected when you call User::SetProcessCritical() with this value.

See also
EProcessCritical
User::SetProcessCritical()
ESystemCritical 

This value can be passed to both: User::SetCritical() and User::SetProcessCritical().

When passed to User::SetCritical(), it means that the entire system is rebooted if:

  • the current thread is terminated.
  • the current thread panics.

When passed to User::SetProcessCritical(), it means that the entire system is rebooted if:

  • any new thread subsequently created in the current process is terminated.
  • any new thread subsequently created in the current process panics.
  • the process itself is terminated
  • the process itself panics

Note:

  1. existing threads in the current process are NOT affected when you call User::SetProcessCritical() with this value.
  2. Only a process with 'Protected Server' capability can set a thread to system-critical.
See also
User::SetCritical()
User::SetProcessCritical()
ESystemPermanent 

This value can be passed to both: User::SetCritical() and User::SetProcessCritical().

When passed to User::SetCritical(), it means that the entire system is rebooted if the current thread exits for any reason.

When passed to User::SetProcessCritical(), it means that the entire system is rebooted if any new thread subsequently created in the current process exits for any reason, or if the process itself exits for any reason.

Note:

  1. existing threads in the current process are NOT affected when you call User::SetProcessCritical() with this value.
  2. Only a process with 'Protected Server' capability can set a thread to system-permanent.
See also
User::SetCritical()
User::SetProcessCritical()

Definition at line 5172 of file e32std.h.

◆ TRealtimeState

A threads realtime state.
Some non-realtime behaviour can be detected by the kernel. When it does so,
action is taken depending on the thread state:
-   ERealtimeStateOff - no action.
-   ERealtimeStateOn - the the thread will be panicked with KERN-EXEC 61 (EIllegalFunctionForRealtimeThread).
-   ERealtimeStateWarn - no action. However, if the kernel trace flag KREALTIME is enabled
                         then tracing will be emitted as if the thread state was ERealtimeStateOn.
API status
Published to platform partners. Released API.
Enumerator
ERealtimeStateOff 

Thread is not realtime.

ERealtimeStateOn 

Thread is realtime.

ERealtimeStateWarn 

Thread is realtime but doesn't want this enforced.

Definition at line 5311 of file e32std.h.

Member Function Documentation

◆ __DbgCheckFailure()

static IMPORT_C TUint User::__DbgCheckFailure ( TBool  aKernel)
static

Returns the number of heap allocation failures the current debug allocator fail function has caused so far.

This is intended to only be used with fail types RAllocator::EFailNext, RAllocator::EBurstFailNext, RAllocator::EDeterministic and RAllocator::EBurstDeterministic. The return value is unreliable for all other fail types.

RAllocator::TAllocFail

(generated from Symbian Developer Library)

◆ __DbgGetAllocFail()

static IMPORT_C RAllocator::TAllocFail User::__DbgGetAllocFail ( TBool  aKernel)
static

◆ __DbgMarkCheck()

static IMPORT_C void User::__DbgMarkCheck ( TBool  aKernel,
TBool  aCountAll,
TInt  aCount,
const TUint8 *  aFileName,
TInt  aLineNum 
)
static

Checks the current number of allocated heap cells for the current thread's default heap, or the kernel heap.

If aCountAll is true, the function checks that the total number of allocated cells on the heap is the same as aCount. If aCountAll is false, the function checks that the number of allocated cells at the current nested level is the same as aCount.

If checking fails, the function raises a panic. Information about the failure is put into the panic category, which takes the form:

ALLOC COUNT\rExpected aaa\rAllocated bbb\rLn: ccc ddd

Where aaa is the value aCount, bbb is the number of allocated heap cells, ccc is a line number, copied from aLineNum, and ddd is a file name, copied from the descriptor aFileName.

Note that the panic number is 1.

Parameters
aKernelETrue, if checking is being done for the kernel heap; EFalse, if checking is being done for the current thread's default heap.
aCountAllIf true, the function checks that the total number of allocated cells on the heap is the same as aCount. If false, the function checks that the number of allocated cells at the current nested level is the same as aCount.
aCountThe expected number of allocated cells.
aFileNameA filename; this is displayed as part of the panic category, if the check fails.
aLineNumA line number; this is displayed as part of the panic category, if the check fails.

(generated from Symbian Developer Library)

◆ __DbgMarkEnd()

static IMPORT_C TUint32 User::__DbgMarkEnd ( TBool  aKernel,
TInt  aCount 
)
static

Marks the end of heap cell checking at the current nested level for the current thread's default heap, or the kernel heap.

The function checks that the number of heap cells allocated, at the current nested level, is aCount. The most common value for aCount is zero, reflecting the fact that the most common requirement is to check that all memory allocated since a previous call to __DbgStartCheck() has been freed.

A call to this function should match an earlier call to __DbgMarkStart(). If there are more calls to this function than calls to __DbgMarkStart(), then this function raises a USER 51 panic.

If the check fails for a user heap, the function raises an ALLOC: nnnnnnnn panic, where nnnnnnnn is a hexadecimal pointer to the first orphaned heap cell.

If the check fails for the kernel heap, the kernel server raises a KERN-EXEC 17 panic.

Parameters
aKernelETrue, if checking is being done for the kernel heap; EFalse, if checking is being done for the current thread's default heap.
aCountThe number of allocated heap cells expected.

(generated from Symbian Developer Library)

◆ __DbgMarkStart()

static IMPORT_C void User::__DbgMarkStart ( TBool  aKernel)
static

Marks the start of heap cell checking for the current thread's default heap, or for the kernel heap.

If earlier calls to __DbgMarkStart() have been made, then this call to __DbgMarkStart() marks the start of a new nested level of heap cell checking.

Every call to __DbgMarkStart() should be matched by a later call to __DbgMarkEnd() to verify that the number of heap cells allocated, at the current nested level, is as expected. This expected number of heap cells is passed to __DbgMarkEnd() as a parameter; however, the most common expected number is zero, reflecting the fact that the most common requirement is to check that all memory allocated since a previous call to __DbgStartCheck() has been freed.

Parameters
aKernelETrue, if checking is being done for the kernel heap; EFalse, if checking is being done for the current thread's default heap.

(generated from Symbian Developer Library)

◆ __DbgSetAllocFail()

static IMPORT_C void User::__DbgSetAllocFail ( TBool  aKernel,
RAllocator::TAllocFail  aFail,
TInt  aRate 
)
static

Simulates a heap allocation failure for the current thread's default heap, or the kernel heap.

The failure occurs on subsequent calls to new or any of the functions which allocate memory from the heap.

The timing of the allocation failure depends on the type of allocation failure requested, i.e. on the value of aType.

The simulation of heap allocation failure is cancelled if aType is given the value RAllocator::ENone.

Notes:

  1. If the failure type is RHeap::EFailNext, the next attempt to allocate from the heap fails; however, no further failures will occur.
  2. For failure types RHeap::EFailNext and RHeap::ENone, set aRate to 1.
Parameters
aKernelETrue, if checking is being done for the kernel heap; EFalse, if checking is being done for the current thread's default heap.
aFailAn enumeration which indicates how to simulate heap allocation failure.
aRateThe rate of failure; when aType is RAllocator::EDeterministic, heap allocation fails every aRate attempts.

(generated from Symbian Developer Library)

◆ __DbgSetBurstAllocFail()

static IMPORT_C void User::__DbgSetBurstAllocFail ( TBool  aKernel,
RAllocator::TAllocFail  aFail,
TUint  aRate,
TUint  aBurst 
)
static

Simulates a heap allocation failure for the current thread's default heap, or the kernel heap.

The aBurst failures will occur after subsequent calls to new or any of the functions which allocate memory from the heap.

The timing of the allocation failures will depend on the type of allocation failure requested, i.e. on the value of aType.

The simulation of heap allocation failure is cancelled if aType is given the value RAllocator::ENone.

Parameters
aKernelETrue, if checking is being done for the kernel heap; EFalse, if checking is being done for the current thread's default heap.
aFailAn enumeration which indicates how to simulate heap allocation failure.
aRateThe rate of failure; when aType is RAllocator::EDeterministic, heap allocation fails every aRate attempts.
aBurstThe number of consecutive allocations that should fail.

(generated from Symbian Developer Library)

◆ After()

static IMPORT_C void User::After ( TTimeIntervalMicroSeconds32  aInterval)
static

Suspends the current thread until a specified time interval has expired.

The resolution of the timer depends on the hardware, but is normally 1 Symbian OS tick (approximately 1/64 second).

Parameters
aIntervalThe time interval for which the current thread is to be suspended, in microseconds.

Panic condition: USER 86, if the time interval is negative.

(generated from Symbian Developer Library)

◆ AfterHighRes()

static IMPORT_C void User::AfterHighRes ( TTimeIntervalMicroSeconds32  aInterval)
static

Suspends the current thread until a specified time interval has expired to a resolution of 1ms .

Parameters
aIntervalThe time interval for which the current thread is to be suspended, in microseconds.

Panic condition: USER 86, if the time interval is negative.

(generated from Symbian Developer Library)

◆ Alloc()

static IMPORT_C TAny * User::Alloc ( TInt  aSize)
static

Allocates a cell of specified size from the current thread's heap.

If there is insufficient memory available on the heap from which to allocate a cell of the required size, the function returns NULL.

The resulting size of the allocated cell may be rounded up to a value greater than aSize, but is guaranteed to be not less than aSize.

Parameters
aSizeThe size of the cell to be allocated from the current thread's heap.

Panic condition: USER 47, if the maximum unsigned value of aSize is greater than or equal to KMaxTInt/2. For example, calling Alloc(-1) raises this panic.

(generated from Symbian Developer Library)

◆ Allocator()

static IMPORT_C RAllocator & User::Allocator ( )
static

Gets the current thread's default current heap.

(generated from Symbian Developer Library)

◆ AllocL()

static IMPORT_C TAny * User::AllocL ( TInt  aSize)
static

Allocates a cell of specified size from the current thread's heap, and leaves if there is insufficient memory in the heap.

The resulting size of the allocated cell may be rounded up to a value greater than aSize, but is guaranteed to be not less than aSize.

Parameters
aSizeThe size of the cell to be allocated from the current thread's heap.

Panic condition: USER 47, if the maximum unsigned value of aSize is greater than or equal to KMaxTInt/2. For example, calling Alloc(-1) raises this panic.

(generated from Symbian Developer Library)

◆ AllocLC()

static IMPORT_C TAny * User::AllocLC ( TInt  aSize)
static

Allocates a cell of specified size from the current thread's default heap, and, if successful, places a pointer to the cell onto the cleanup stack.

The function leaves if there is insufficient memory in the heap.

The resulting size of the allocated cell may be rounded up to a value greater than aSize, but is guaranteed to be not less than aSize.

Parameters
aSizeThe size of the cell to be allocated from the current thread's default heap.

Panic condition: USER 47, if the maximum unsigned value of aSize is greater than or equal to KMaxTInt/2. For example, calling Alloc(-1) raises this panic.

(generated from Symbian Developer Library)

◆ AllocLen()

static IMPORT_C TInt User::AllocLen ( const TAny *  aCell)
static

Gets the length of the specified allocated heap cell.

The cell is assumed to be in the current thread's heap.

Parameters
aCellA pointer to the allocated cell whose length is to be fetched.

(generated from Symbian Developer Library)

◆ AllocSize()

static IMPORT_C TInt User::AllocSize ( TInt &  aTotalAllocSize)
static

Gets the total number of cells allocated on the current thread's default heap, and the total space allocated to them.

Parameters
aTotalAllocSizeOn return, contains the total space allocated to the cells.

(generated from Symbian Developer Library)

◆ AllocZ()

static IMPORT_C TAny * User::AllocZ ( TInt  aSize)
static

Allocates a cell of specified size from the current thread's default heap, and clears it to binary zeroes.

If there is insufficient memory available on the heap from which to allocate a cell of the required size, the function returns NULL.

The resulting size of the allocated cell may be rounded up to a value greater than aSize, but is guaranteed to be not less than aSize.

Parameters
aSizeThe size of the cell to be allocated from the current thread's default heap.

Panic condition: USER 47, if the maximum unsigned value of aSize is greater than or equal to KMaxTInt/2. For example, calling Alloc(-1) raises this panic.

(generated from Symbian Developer Library)

◆ AllocZL()

static IMPORT_C TAny * User::AllocZL ( TInt  aSize)
static

Allocates a cell of specified size from the current thread's default heap, clears it to binary zeroes, and leaves if there is insufficient memory in the heap.

The resulting size of the allocated cell may be rounded up to a value greater than aSize, but is guaranteed to be not less than aSize.

Parameters
aSizeThe size of the cell to be allocated from the current thread's heap.

Panic condition: USER 47, if the maximum unsigned value of aSize is greater than or equal to KMaxTInt/2. For example, calling Alloc(-1) raises this panic.

(generated from Symbian Developer Library)

◆ At()

static IMPORT_C TInt User::At ( const TTime &  aTime)
static

Suspends the current thread until the specified absolute time, in the current time zone.

If the machine is off at that time, the machine will be turned on again.

KErrNone - suspension of the current thread completed normally at the requested time.

KErrAbort - suspension of the current thread was aborted because the system time changed.

KErrUnderflow - the requested completion time is in the past.

KErrOverFlow - the requested completion time is too far in the future.

Parameters
aTimeThe absolute time, in the current time zone, until which the current thread is to be suspended.

(generated from Symbian Developer Library)

◆ Available()

static IMPORT_C TInt User::Available ( TInt &  aBiggestBlock)
static

Gets the total free space currently available on the current thread's default heap, and the space available in the largest free block.

The space available represents the total space which can be allocated.

Note that compressing the heap may reduce the total free space available and the space available in the largest free block.

Parameters
aBiggestBlockOn return, contains the space available in the largest free block on the current thread's default heap.

(generated from Symbian Developer Library)

◆ Beep()

static IMPORT_C TInt User::Beep ( TInt  aFrequency,
TTimeIntervalMicroSeconds32  aDuration 
)
static

Makes a beep tone with a specified frequency and duration.

This function should not be used. It exists to maintain compatibility with older versions of Symban OS.

(generated from Symbian Developer Library)

◆ BinarySearch()

static IMPORT_C TInt User::BinarySearch ( TInt  aCount,
const TKey &  aKey,
TInt &  aPos 
)
static

Performs a binary search for an array element containing a specified key.

It can be used on any kind of array where elements can be identified by key. It is used by the standard Symbian OS arrays having CArrayFix, CArrayVar or CArrayPak in their class hierarchy in the implementation of the various functions for inserting, deleting and finding elements by key. The function can be used by other arrays.

The function returns a zero value if the search is successful and a non-zero value otherwise.

If the search is successful, the function puts the position (i.e. the index) of the element into aPos. If the search is unsuccessful, then the function puts into aPos the position of the first element in the array whose key is greater than the search key.

If the array is empty, i.e. aCount is zero, then the search is unsuccessful and aPos is not defined.

Parameters
aCountThe number of elements in the array.
aKeyA reference to a suitably initialised TKey derived object. In particular, the object will have been initialised with a pointer to a sample element containing the search key.
aPosIf the element is found, the reference is set to the position of that element within the array. The position is relative to zero, (i.e. the first element in the array is at position 0). If the element is not found and the array is not empty, then the reference is set to the position of the first element in the array with a key which is greater than the search key. If the element is not found and the array is empty, then the reference is undefined.

Panic condition: USER 97, if aCount is negative.

(generated from Symbian Developer Library)

◆ CancelMiscNotifier()

static IMPORT_C void User::CancelMiscNotifier ( TRequestStatus &  aStatus)
static

Internal technology API.

◆ Check()

static IMPORT_C void User::Check ( )
static

Checks the validity of the current thread's default heap.

The function walks through the list of allocated cells and the list of free cells checking that the heap is consistent and complete.

Panic condition: USER 47 if any corruption is found, specifically a bad allocated heap cell size.

Panic condition: USER 48 if any corruption is found, specifically a bad allocated heap cell address.

Panic condition: USER 49 if any corruption is found, specifically a bad free heap cell address.

(generated from Symbian Developer Library)

◆ Collate()

static IMPORT_C TUint User::Collate ( TUint  aChar)
static

Converts the character to its collated form.

Collating is the process of removing differences between characters that are deemed unimportant for the purposes of ordering characters. The result of the conversion depends on the locale and on whether this is a UNICODE build or not.

Note that for a non UNICODE build, if the binary value of the character aChar is greater than or equal to 0x100, then the character returned is the same as the character passed to the function.

Parameters
aCharThe character to be folded.

(generated from Symbian Developer Library)

◆ CommandLine()

static IMPORT_C void User::CommandLine ( TDes &  aCommand)
static

Gets a copy of the data which is passed as an argument to the thread function of the current process's main thread when it is first scheduled to run.

User::CommandLineLength()

Parameters
aCommandA modifiable descriptor supplied by the caller into which the argument data is put. The descriptor must be big enough to contain the expected data, otherwise the function raises a panic.

(generated from Symbian Developer Library)

◆ CommandLineLength()

static IMPORT_C TInt User::CommandLineLength ( )
static

Gets the length of the data which is passed as an argument to the thread function of the current process's main thread when it is first scheduled to run.

(generated from Symbian Developer Library)

◆ CompressAllHeaps()

static IMPORT_C TInt User::CompressAllHeaps ( )
static

Compresses all the chunks containing heaps.

This function is no longer supported, and calling it has no effect.

(generated from Symbian Developer Library)

◆ CountAllocCells() [1/2]

static IMPORT_C TInt User::CountAllocCells ( )
static

Gets the total number of cells allocated on the current thread's default heap.

(generated from Symbian Developer Library)

◆ CountAllocCells() [2/2]

static IMPORT_C TInt User::CountAllocCells ( TInt &  aFreeCount)
static

Gets the the total number of cells allocated, and the number of free cells, on the current thread's default heap.

Parameters
aFreeCountOn return, contains the number of free cells on the current thread's default heap.

(generated from Symbian Developer Library)

◆ CreatorHasCapability() [1/2]

static TBool User::CreatorHasCapability ( TCapability  aCapability,
const char *  aDiagnostic = 0 
)
inlinestatic
Check if the process that created the current process has a given capability

When a check fails the action taken is determined by the system wide Platform Security
configuration. If PlatSecDiagnostics is ON, then a diagnostic message is emitted.
If PlatSecEnforcement is OFF, then this function will return ETrue even though the
check failed.

@param aCapability The capability to test.
@param aDiagnostic A string that will be emitted along with any diagnostic message
                            that may be issued if the test finds the capability is not present.
                            This string must be enclosed in the __PLATSEC_DIAGNOSTIC_STRING macro
                            which enables it to be easily removed from the system.
@return ETrue if the creator process has the capability, EFalse otherwise.
API status
Published to all clients. Released API.
Parameters
aCapabilityThe capability to test.
aDiagnosticA string that will be emitted along with any diagnostic message that may be issued if the test finds the capability is not present. This string must be enclosed in the __PLATSEC_DIAGNOSTIC_STRING macro which enables it to be easily removed from the system.

(generated from Symbian Developer Library)

◆ CreatorHasCapability() [2/2]

static TBool User::CreatorHasCapability ( TCapability  aCapability1,
TCapability  aCapability2,
const char *  aDiagnostic = 0 
)
inlinestatic
Check if the process that created the current process has both of the given capabilities

When a check fails the action taken is determined by the system wide Platform Security
configuration. If PlatSecDiagnostics is ON, then a diagnostic message is emitted.
If PlatSecEnforcement is OFF, then this function will return ETrue even though the
check failed.

@param aCapability1 The first capability to test.
@param aCapability2 The second capability to test.
@param aDiagnostic A string that will be emitted along with any diagnostic message
                            that may be issued if the test finds a capability is not present.
                            This string must be enclosed in the __PLATSEC_DIAGNOSTIC_STRING macro
                            which enables it to be easily removed from the system.
@return ETrue if the creator process has both the capabilities, EFalse otherwise.
API status
Published to all clients. Released API.
Parameters
aCapability1The first capability to test.
aCapability2The second capability to test.
aDiagnosticA string that will be emitted along with any diagnostic message that may be issued if the test finds a capability is not present. This string must be enclosed in the __PLATSEC_DIAGNOSTIC_STRING macro which enables it to be easily removed from the system.

(generated from Symbian Developer Library)

◆ CreatorIdentity()

static TUid User::CreatorIdentity ( )
inlinestatic

Definition at line 5435 of file e32std.h.

◆ CreatorSecureId()

static IMPORT_C TSecureId User::CreatorSecureId ( )
static
Return the Secure ID of the process that created the current process.
@return The Secure ID.
API status
Published to all clients. Released API.

◆ CreatorVendorId()

static IMPORT_C TVendorId User::CreatorVendorId ( )
static
Return the Vendor ID of the process that created the current process.
@return The Vendor ID.
API status
Published to all clients. Released API.

◆ Critical() [1/2]

static IMPORT_C TCritical User::Critical ( )
static

Gets the critical state associated with the current thread.

User::SetCritical()

(generated from Symbian Developer Library)

◆ Critical() [2/2]

static IMPORT_C TCritical User::Critical ( RThread  aThread)
static

Gets the critical state associated with the specified thread.

User::SetCritical()

Parameters
aThreadThe thread whose critical state is to be retrieved.

(generated from Symbian Developer Library)

◆ ExceptionHandler()

static IMPORT_C TExceptionHandler User::ExceptionHandler ( )
static

Gets a pointer to the exception handler for the current thread.

(generated from Symbian Developer Library)

◆ Exit()

static IMPORT_C void User::Exit ( TInt  aReason)
static

Terminates the current thread, specifying a reason.

All child threads are terminated and all resources are cleaned up.

If the current thread is the main thread in a process, the process is also terminated.

Parameters
aReasonThe reason code.

(generated from Symbian Developer Library)

◆ FastCounter()

static IMPORT_C TUint32 User::FastCounter ( )
static

Gets the fast counter.

This is the current value of the machine's high resolution timer. If a high resolution timer is not available, it uses the millisecond timer instead.

The freqency of this counter can be determined by reading the HAL attribute EFastCounterFrequency.

This function is intended for use in profiling and testing; it should not be used in production code. User::NTickCount() should be used instead.

This is because the implementation of the FastCounter is platform-specific: its frequency can be anywhere from a few KHz to many MHz. It may also not be activated when needed, since it is expensive in terms of clock cycles and battery life, and use of a platform-specific API may be necessary to enable it.

User::NTickCount()

(generated from Symbian Developer Library)

◆ Fold() [1/2]

static IMPORT_C TUint User::Fold ( TUint  aChar)
static

Folds the specified character.

Folding converts the character to a form which can be used in tolerant comparisons without control over the operations performed. Tolerant comparisons are those which ignore character differences like case and accents.

The result of folding a character depends on the locale and on whether this is a UNICODE build or not.

Note that for a non-UNICODE build, if the binary value of the character aChar is greater than or equal to 0x100, then the character returned is the same as the character passed to the function.

TChar::Fold()

Parameters
aCharThe character to be folded.

(generated from Symbian Developer Library)

◆ Fold() [2/2]

static IMPORT_C TUint User::Fold ( TUint  aChar,
TInt  aFlags 
)
static

Folds the character according to a specified folding method.

TChar::EFoldCase, convert characters to their lower case form, if any;

TChar::EFoldAccents, strip accents;

TChar::EFoldDigits, convert digits representing values 0..9 to characters '0'..'9';

TChar::EFoldSpaces, convert all spaces (ordinary, fixed-width, ideographic, etc.) to ' ';

TChar::EFoldKana, convert hiragana to katakana;

TChar::EFoldWidth, fold full width and half width variants to their standard forms;

TChar::EFoldAll, use all of the above folding methods.

TChar::Fold()

Parameters
aCharThe character to be folded.
aFlagsA set of flags defining the folding method. They are:

(generated from Symbian Developer Library)

◆ Free()

static IMPORT_C void User::Free ( TAny *  aCell)
static

Frees the specified cell and returns it to the current thread's default heap.

Parameters
aCellA pointer to a valid cell to be freed. If NULL this function call will be ignored.

Panic condition: USER 42, if aCell is not NULL and does not point to a valid cell.

(generated from Symbian Developer Library)

◆ FreeLogicalDevice()

static IMPORT_C TInt User::FreeLogicalDevice ( const TDesC &  aDeviceName)
static

Frees the logical device driver DLL associated with a specified driver name.

Parameters
aDeviceNameThe name of the logical device driver object. This must match the name set during installation of the logical device. Typically, this is done in an implementation of DLogicalDevice::Install() through a call to SetName(). Note that the name is rarely the same as the device's filename. The name of a logical device driver object can be discovered by using TFindLogicalDevice.

(generated from Symbian Developer Library)

◆ FreePhysicalDevice()

static IMPORT_C TInt User::FreePhysicalDevice ( const TDesC &  aDriverName)
static

Frees the physical device driver DLL associated with a specified driver name.

Parameters
aDriverNameThe name of the physical device driver object. This must match the name set during installation of the physical device. Typically, this is done in an implementation of DPhysicalDevice::Install() through a call to SetName(). Note that the name is rarely the same as the device's filename. The name of a physical device driver object can be discovered by using TFindPhysicalDevice.

(generated from Symbian Developer Library)

◆ FreeZ()

static IMPORT_C void User::FreeZ ( TAny *&  aCell)
static

Frees the specified cell, returns it to the current thread's default heap, and resets the pointer to NULL.

Parameters
aCellA reference to a pointer to a valid cell to be freed. If NULL this function call will be ignored.

Panic condition: USER 42, if aCell is not NULL and does not point to a valid cell.

(generated from Symbian Developer Library)

◆ GetDesParameter() [1/2]

static IMPORT_C TInt User::GetDesParameter ( TInt  aSlot,
TDes16 &  aDes 
)
static

Gets the specified environment data item belonging to the current process; this is assumed to be an 16-bit descriptor.

Environment data may be stored in the process and is passed to a child process on creation of that child process.

On successful return from this function, the data item is deleted from the process.

Parameters
aSlotAn index that identifies the data item. This is an index whose value is relative to zero; i.e. 0 is the first item/slot. This can range from 0 to 15, i.e. there are 16 slots.
aDesOn sucessful return, contains the environment data item; the length of the descriptor is set to the length of the data item.

Panic condition: KERN-EXEC 51, if aSlot is negative or is greater than or equal to 16.

(generated from Symbian Developer Library)

◆ GetDesParameter() [2/2]

static IMPORT_C TInt User::GetDesParameter ( TInt  aSlot,
TDes8 &  aDes 
)
static

Gets the specified environment data item belonging to the current process; this is assumed to be an 8-bit descriptor.

Environment data may be stored in the process and is passed to a child process on creation of that child process.

On successful return from this function, the data item is deleted from the process.

Parameters
aSlotAn index that identifies the data item. This is an index whose value is relative to zero; i.e. 0 is the first item/slot. This can range from 0 to 15, i.e. there are 16 slots.
aDesOn sucessful return, contains the environment data item; the length of the descriptor is set to the length of the data item.

Panic condition: KERN-EXEC 51, if aSlot is negative or is greater than or equal to 16.

(generated from Symbian Developer Library)

◆ GetTIntParameter()

static IMPORT_C TInt User::GetTIntParameter ( TInt  aSlot,
TInt &  aData 
)
static

Gets the specified environment data item belonging to the current process; this is assumed to be a 32 bit value.

Environment data may be stored in the process and is passed to a child process on creation of that child process.

On successful return from this function, the data item is deleted from the process.

Parameters
aSlotAn index that identifies the data item. This is an index whose value is relative to zero; i.e. 0 is the first item/slot. This can range from 0 to 15, i.e. there are 16 slots.
aDataOn sucessful return, contains the environment data item.

Panic condition: KERN-EXEC 51, if aSlot is negative or is greater than or equal to 16.

(generated from Symbian Developer Library)

◆ HandleException()

static IMPORT_C void User::HandleException ( TAny *  aInfo)
static

Internal component API.

Parameters
aInfoA pointer to a TExcType type containing the exception information.

(generated from Symbian Developer Library)

◆ Heap()

static RHeap & User::Heap ( )
inlinestatic

Gets a reference to the handle to the current thread's heap.

(generated from Symbian Developer Library)

◆ Identity()

static TUid User::Identity ( )
inlinestatic

Definition at line 5425 of file e32std.h.

◆ IMB_Range()

static IMPORT_C void User::IMB_Range ( TAny *  aStart,
TAny *  aEnd 
)
static

Does the necessary preparations to guarantee correct execution of code in the specified virtual address range.

The function assumes that this code has been loaded or modified by user code. Calling this function against uncommitted memory region is considered as S/W bug and may generate exception on some memory models.

The specified addresses are associated with a user writable code chunk as created by RChunk::CreateLocalCode().

The function cleans the data cache to ensure that written data has been committed to main memory and then flushes the instruction cache and branch target buffer (BTB) to ensure that the code is loaded from main memory when it is executed. The Kernel uses the size of the range specified to decide whether to clean/flush line-by-line or to simply clean/flush the entire cache.

RChunk::CreateLocalCode() UserHeap::ChunkHeap()

Parameters
aStartThe start virtual address of the region.
aEndThe end virtual address of the region. This location is not within the region.

(generated from Symbian Developer Library)

◆ InactivityTime()

static IMPORT_C TTimeIntervalSeconds User::InactivityTime ( )
static

Gets the time since the last user activity.

(generated from Symbian Developer Library)

◆ InfoPrint()

static IMPORT_C TInt User::InfoPrint ( const TDesC &  aDes)
static

Invokes the notifier server to display a text message on the screen for a short time.

RNotifier

Parameters
aDesA reference to the descriptor containing the text to be sent to the notifier server.

(generated from Symbian Developer Library)

◆ InitProcess()

static IMPORT_C void User::InitProcess ( )
static

Internal component API.

◆ Invariant()

static IMPORT_C void User::Invariant ( )
static

Panics the current thread with a USER 0 panic.

Typically, this is called when a test for a class invariant fails, i.e. when a test which checks that the internal data of an object is self-consistent, fails.

Such tests are almost always done in debug builds, commonly using the __ASSERT_DEBUG macro.

(generated from Symbian Developer Library)

◆ IsExceptionHandled()

static IMPORT_C TBool User::IsExceptionHandled ( TExcType  aType)
static

Tests whether the specified exception type can be handled by the current thread.

Parameters
aTypeThe type of exception.

(generated from Symbian Developer Library)

◆ IsRomAddress()

static IMPORT_C TInt User::IsRomAddress ( TBool &  aBool,
TAny *  aPtr 
)
static

Tests whether the specified address is in the ROM.

Parameters
aBoolTrue, if the address at aPtr is within the ROM; false, otherwise.
aPtrThe address to be tested.

(generated from Symbian Developer Library)

◆ JustInTime()

static IMPORT_C TBool User::JustInTime ( )
static

Tests whether just-in-time debugging is on or off.

The function is used by the Kernel, on the Emulator, to decide whether to do just-in-time debugging for panics. The function applies to the current process.

Unless overridden by calling User::SetJustInTime(EFalse), just-in-time debugging is on by default.

RProcess::JustInTime

(generated from Symbian Developer Library)

◆ Language()

static IMPORT_C TLanguage User::Language ( )
static

Gets the language of the current locale.

(generated from Symbian Developer Library)

◆ Leave()

static IMPORT_C void User::Leave ( TInt  aReason)
static

Leaves the currently executing function, unwinds the call stack, and returns from the most recently entered trap harness.

TRAP TRAPD

Parameters
aReasonThe value returned from the most recent call to TRAP or TRAPD. This is known as the reason code and, typically, it gives the reason for the environment or user error causing this leave to occur.

(generated from Symbian Developer Library)

◆ LeaveEnd()

static IMPORT_C void User::LeaveEnd ( )
static

Internal component API.

◆ LeaveIfError()

static IMPORT_C TInt User::LeaveIfError ( TInt  aReason)
static

Leaves or returns with a specified reason code.

If the reason code is negative the function leaves, and the reason code is returned through the trap harness.

If the reason code is zero or positive, the function simply returns with the reason value.

Parameters
aReasonThe reason code.

(generated from Symbian Developer Library)

◆ LeaveIfNull() [1/2]

static const TAny * User::LeaveIfNull ( const TAny *  aPtr)
inlinestatic

Leaves with the reason code KErrNoMemory, if the specified pointer is NULL.

If the pointer is not NULL, the function simply returns with the value of the pointer.

Used to check pointers to const objects.

Parameters
aPtrThe pointer to be tested.

(generated from Symbian Developer Library)

◆ LeaveIfNull() [2/2]

static IMPORT_C TAny * User::LeaveIfNull ( TAny *  aPtr)
static

Leaves with the reason code KErrNoMemory, if the specified pointer is NULL.

If the pointer is not NULL, the function simply returns with the value of the pointer.

Parameters
aPtrThe pointer to be tested.

(generated from Symbian Developer Library)

◆ LeaveNoMemory()

static IMPORT_C void User::LeaveNoMemory ( )
static

Leaves with the specific reason code KErrNoMemory.

KErrNoMemory

(generated from Symbian Developer Library)

◆ LoadLogicalDevice()

static IMPORT_C TInt User::LoadLogicalDevice ( const TDesC &  aFileName)
static

Loads the logical device driver (LDD) DLL with the specified filename.

The function searches the system path for the LDD DLL, and loads it. It then makes a kernel server call that:

  1. creates the LDD factory object, an instance of a DLogicalDevice derived class; this involves checking the first UID value to make sure that the DLL is a valid LDD before proceeding to call the exported function at ordinal 1, which creates the LDD factory object on the kernel heap
  2. calls the LDD factory object's Install() function to complete the installation
  3. adds the new LDD factory object to the kernel's list of LDD factory objects.
Parameters
aFileNameA reference to the descriptor containing the name of the physical device driver DLL. If the filename has no extension, .LDD is assumed by default.

(generated from Symbian Developer Library)

◆ LoadPhysicalDevice()

static IMPORT_C TInt User::LoadPhysicalDevice ( const TDesC &  aFileName)
static

Loads the physical device driver (PDD) DLL with the specified filename.

The function searches the system path for the PDD DLL, and loads it. It then makes a kernel server call that:

  1. creates the PDD factory object, an instance of a DPhysicalDevice derived class; this involves checking the first UID value to make sure that the DLL is a valid PDD before proceeding to call the exported function at ordinal 1, which creates the PDD factory object on the kernel heap
  2. calls the PDD factory object's Install() function to complete the installation
  1. adds the new PDD factory object to the kernel's list of PDD factory objects.
Parameters
aFileNameA reference to the descriptor containing the name of the physical device driver DLL. If the filename has no extension, .PDD is assumed by default.

(generated from Symbian Developer Library)

◆ LockedDec()

static IMPORT_C TInt User::LockedDec ( TInt &  aValue)
static

Atomically (i.e.

in a manner which is safe against concurrent access by other threads) decrements a TInt value by 1.

As an example of its use, the function is used in the implementation of critical sections.

User::LockedInc RCrticalSection

Parameters
aValueA reference to an integer whose value is to be decremented. On return contains the decremented value.

(generated from Symbian Developer Library)

◆ LockedInc()

static IMPORT_C TInt User::LockedInc ( TInt &  aValue)
static

Atomically (i.e.

in a manner which is safe against concurrent access by other threads) increments a TInt value by 1.

As an example of its use, the function is used in the implementation of critical sections.

User::LockedDec RCrticalSection

Parameters
aValueA reference to an integer whose value is to be incremented. On return contains the incremented value.

(generated from Symbian Developer Library)

◆ LockPeriod()

static IMPORT_C TTimerLockSpec User::LockPeriod ( )
static

Returns which of the periods the clock is currently in.

(generated from Symbian Developer Library)

◆ LowerCase()

static IMPORT_C TUint User::LowerCase ( TUint  aChar)
static

Converts the specified character to lower case.

The result of the conversion depends on the locale and on whether this is a UNICODE build or not.

Note that for a non-UNICODE build, if the binary value of the character aChar is greater than or equal to 0x100, then the character returned is the same as the character passed to the function.

Parameters
aCharThe character to be converted to lower case.

(generated from Symbian Developer Library)

◆ MachineConfiguration()

static IMPORT_C TInt User::MachineConfiguration ( TDes8 &  aConfig,
TInt &  aSize 
)
static

Gets the machine configuration.

Parameters
aConfigOn return contains the machine configuration data.
aSizeOn return, contains the size of the data.
capability
ReadDeviceData

(generated from Symbian Developer Library)

◆ MarkCleanupStack()

static IMPORT_C TTrapHandler * User::MarkCleanupStack ( )
static

Internal component API.

◆ ModifyExceptionMask()

static IMPORT_C void User::ModifyExceptionMask ( TUint32  aClearMask,
TUint32  aSetMask 
)
static

Changes the set of exceptions which the current thread's exception handler can deal with.

aClearMask is the set of flags defining the set of exceptions which the exception handler no longer deals with, while aSetMask is the set of flags defining the new set of exceptions to be set.

Flag clearing is done before flag setting.

Parameters
aClearMaskOne or more flags defining the exceptions which the current exception handler no longer deals with.
aSetMaskOne or more flags defining the new set of exceptions which the current exception handler is to deal with.

(generated from Symbian Developer Library)

◆ NotifyOnIdle()

static IMPORT_C void User::NotifyOnIdle ( TRequestStatus &  aStatus)
static

Internal technology API.

◆ NTickCount()

static IMPORT_C TUint32 User::NTickCount ( )
static

Gets the nanokernel tick count.

This is the current value of the machine's millisecond tick counter.

epoc.exe - Dtimerresolution = 3

On most hardware the resolution is about 1 millisecond.

You can get the nanokernel tick period in microseconds by calling into the Hardware Abstraction Layer:

TInt nanokernel_tick_period;
HAL::Get(HAL::ENanoTickPeriod, nanokernel_tick_period);
static IMPORT_C TInt Get(TAttribute aAttribute, TInt &aValue)
Gets the value of the specified HAL attribute.

(generated from Symbian Developer Library)

◆ Panic()

static IMPORT_C void User::Panic ( const TDesC &  aCategory,
TInt  aReason 
)
static

Panics the current thread, specifying a category name and panic number.

Keep the length of the category name small; it is limited to 16 characters.

Parameters
aCategoryA reference to the descriptor containing the text that defines the category for this panic.
aReasonThe panic number.

(generated from Symbian Developer Library)

◆ PanicUnexpectedLeave()

static IMPORT_C void User::PanicUnexpectedLeave ( )
static

Internal component API.

◆ ParameterLength()

static IMPORT_C TInt User::ParameterLength ( TInt  aSlot)
static

Gets the length of the specified item of environment data belonging to the current process.

Environment data may be stored in the process and is passed to a child process on creation of that child process.

Parameters
aSlotAn index that identifies the data item whose length is to be retrieved. This is an index whose value is relative to zero; i.e. 0 is the first item/slot. This can range from 0 to 15, i.e. there are 16 slots.

Panic condition: KERN-EXEC 51, if aSlot is negative or is greater than or equal to 16.

(generated from Symbian Developer Library)

◆ PriorityControl()

static IMPORT_C TBool User::PriorityControl ( )
static

Tests whether the current process allows other processes to switch its priority between 'foreground' and 'background'.

(generated from Symbian Developer Library)

◆ ProcessCritical() [1/2]

static IMPORT_C TCritical User::ProcessCritical ( )
static

Gets the critical state associated with the current process.

User::SetProcessCritical()

(generated from Symbian Developer Library)

◆ ProcessCritical() [2/2]

static IMPORT_C TCritical User::ProcessCritical ( RProcess  aProcess)
static

Gets the critical state associated with the specified process.

User::SetProcessCritical()

Parameters
aProcessThe process whose critical state is to be retrieved.

(generated from Symbian Developer Library)

◆ QueryVersionSupported()

static IMPORT_C TBool User::QueryVersionSupported ( const TVersion &  aCurrent,
const TVersion &  aRequested 
)
static

Compares two version objects and returns true if the test version is less than the current version.

Version information is encapsulated by a TVersion type object and consists of a major version number, a minor version number and a build number.

The function returns true if one of the following conditions is true:

  1. the test major version is strictly less than the current major version
  2. the test major version is equal to the current major version and the test minor version is less than or equal to the current minor version

If neither condition is true, the function returns false.

Parameters
aCurrentA reference to the current version against which aRequested is compared.
aRequestedA reference to the test version to be compared against aCurrent.

(generated from Symbian Developer Library)

◆ QuickSort()

static IMPORT_C TInt User::QuickSort ( TInt  aCount,
const TKey &  aKey,
const TSwap &  aSwap 
)
static

Quick sorts array elements.

It is used by the standard Symbian OS arrays having CArrayFixBase, CArrayVarBase or CArrayPakBase in their class hierarchy in the implementation of their sort functions. The function can be used by other arrays.

The function returns KErrNone if the operation is successful otherwise it returns KErrGeneral.

Parameters
aCountThe number of elements in the array.
aKeyA reference to a suitably initialised TKey derived object.
aSwapA reference to a suitably initialised TSwap derived object.

Panic condition: USER 96, if aCount is negative.

(generated from Symbian Developer Library)

◆ RaiseException()

static IMPORT_C TInt User::RaiseException ( TExcType  aType)
static

Raises an exception of a specified type on the current thread.

If the thread has an exception handler to handle this type of exception, then it is called.

If the thread has no exception handler to handle this type of exception, then the function raises a USER-EXEC 3 panic.

Note that exception handlers are executed in the context of the thread on which the exception is raised; control returns to the point of the exception.

Parameters
aTypeThe type of exception.

(generated from Symbian Developer Library)

◆ ReAlloc()

static IMPORT_C TAny * User::ReAlloc ( TAny *  aCell,
TInt  aSize,
TInt  aMode = 0 
)
static

Increases or decreases the size of an existing cell in the current thread's heap.

If the cell is being decreased in size, then it is guaranteed not to move, and the function returns the pointer originally passed in aCell. Note that the length of the cell will be the same if the difference between the old size and the new size is smaller than the minimum cell size.

  • if the cell cannot be moved, i.e. aMode has the ENeverMove bit set, then the function returns NULL.
  • if the cell can be moved, i.e. aMode does not have the ENeverMove bit set, then the function tries to allocate a new replacement cell, and, if successful, returns a pointer to the new cell; if unsuccessful, it returns NULL.

Note that in debug mode, the function returns NULL if the cell cannot be grown in place, regardless of whether the ENeverMove bit is set.

If the reallocated cell is at a different location from the original cell, then the content of the original cell is copied to the reallocated cell.

If the supplied pointer, aCell is NULL, then the function attempts to allocate a new cell, but only if the cell can be moved, i.e. aMode does not have the ENeverMove bit set.

  • If reallocation fails, the content of the original cell is preserved.
  • The resulting size of the re-allocated cell may be rounded up to a value greater than aSize, but is guaranteed to be not less than aSize.
Parameters
aCellA pointer to the cell to be reallocated. This may be NULL.
aSizeThe new size of the cell. This may be bigger or smaller than the size of the original cell. The value can also be zero, but this is interpreted as a request for a cell of minimum size; the net effect is the same as if the caller had explicitly requested a cell of minimum size. Note that the minimum size of a heap cell is device dependent.
aModeFlags controlling the reallocation. The only bit which has any effect on this function is that defined by the enumeration ENeverMove of the enum RAllocator::TReAllocMode. If this is set, then any successful reallocation guarantees not to have changed the start address of the cell. By default, this parameter is zero.

Panic condition: USER 42, if aCell is not NULL, and does not point to a valid cell.

Panic condition: USER 47, if the maximum unsigned value of aSize is greater than or equal to KMaxTInt/2. For example, calling ReAlloc(someptr,-1) raises this panic.

(generated from Symbian Developer Library)

◆ ReAllocL()

static IMPORT_C TAny * User::ReAllocL ( TAny *  aCell,
TInt  aSize,
TInt  aMode = 0 
)
static

Increases or decreases the size of an existing cell, and leaves if there is insufficient memory in the current thread's default heap.

If the cell is being decreased in size, then it is guaranteed not to move, and the function returns the pointer originally passed in aCell. Note that the length of the cell will be the same if the difference between the old size and the new size is smaller than the minimum cell size.

  • if the cell cannot be moved, i.e. aMode has the ENeverMove bit set, then the function leaves.
  • if the cell can be moved, i.e. aMode does not have the ENeverMove bit set, then the function tries to allocate a new replacement cell, and, if successful, returns a pointer to the new cell; if unsuccessful, it leaves.

Note that in debug mode, the function leaves if the cell cannot be grown in place, regardless of whether the ENeverMove bit is set.

If the reallocated cell is at a different location from the original cell, then the content of the original cell is copied to the reallocated cell.

If the supplied pointer, aCell is NULL, then the function attempts to allocate a new cell, but only if the cell can be moved, i.e. aMode does not have the ENeverMove bit set.

  • If reallocation fails, the content of the original cell is preserved.
  • The resulting size of the re-allocated cell may be rounded up to a value greater than aSize, but is guaranteed to be not less than aSize.
Parameters
aCellA pointer to the cell to be reallocated. This may be NULL.
aSizeThe new size of the cell. This may be bigger or smaller than the size of the original cell. The value can also be zero, but this is interpreted as a request for a cell of minimum size; the net effect is the same as if the caller had explicitly requested a cell of minimum size. Note that the minimum size of a heap cell is device dependent.
aModeFlags controlling the reallocation. The only bit which has any effect on this function is that defined by the enumeration ENeverMove of the enum RAllocator::TReAllocMode. If this is set, then any successful reallocation guarantees not to have changed the start address of the cell. By default, this parameter is zero.

Panic condition: USER 42, if aCell is not NULL, and does not point to a valid cell.

Panic condition: USER 47, if the maximum unsigned value of aSize is greater than or equal to KMaxTInt/2. For example, calling ReAlloc(someptr,-1) raises this panic.

(generated from Symbian Developer Library)

◆ RegionCode()

static IMPORT_C TRegionCode User::RegionCode ( )
static

◆ RenameProcess()

static IMPORT_C TInt User::RenameProcess ( const TDesC &  aName)
static

Assigns a new name to the current process, replacing any existing name.

When a process is created, its default name is the name portion of the filename from which the executable is loaded.

The new name must be a valid name and it must also be such that the process's new fullname remains unique amongst processes.

Parameters
aNameA reference to the descriptor containing the new name of the process.

(generated from Symbian Developer Library)

◆ RenameThread()

static IMPORT_C TInt User::RenameThread ( const TDesC &  aName)
static

Assigns a new name to the current thread, replacing any existing name that may have been set.

The new name must be a valid name and it must also be such that the thread's new fullname remains unique amongst threads. The length of the new name must be less than or equal to 80 (maximum length of kernel objects) otherwise a panic is raised.

Parameters
aNameA reference to the descriptor containing the new name for the thread.

(generated from Symbian Developer Library)

◆ RequestComplete()

static IMPORT_C void User::RequestComplete ( TRequestStatus *&  aStatus,
TInt  aReason 
)
static

Signals the current thread that the asynchronous request associated with the specified request status object is complete.

This function is used to complete an asynchronous request originating in the same thread as the code that is currently executing. If a request originates in another thread, then executing code must use RThread::RequestComplete() to signal the completion of that request.

The request is completed with the completion code passed in aReason. This value is copied into the request status, pointed to by aStatus, before signalling the current thread's request semaphore.

The meaning of the completion code passed in aReason is a matter of convention to be decided between the service requester and the service provider.

RThread::RequestComplete

Parameters
aStatusA reference to a pointer to the request status object. This is a pointer into the current thread's address space. On return, the pointer to the request status is set to NULL. Note that setting the pointer to NULL is a convenience, not all servers need it, and is done before the function returns.
aReasonThe completion code of this request.

(generated from Symbian Developer Library)

◆ ResetInactivityTime()

static IMPORT_C void User::ResetInactivityTime ( )
static

Resets all user inactivity timers.

(generated from Symbian Developer Library)

◆ SafeDec()

static IMPORT_C TInt User::SafeDec ( TInt &  aValue)
static

Atomically decrements the specified value by 1, if the value is > 0.

Parameters
aValueThe value to be decremented; on return the decremented value.

(generated from Symbian Developer Library)

◆ SafeInc()

static IMPORT_C TInt User::SafeInc ( TInt &  aValue)
static

Atomically increments the specified value by 1, if the value is > 0.

Parameters
aValueThe value to be incremented; on return the incremented value.

(generated from Symbian Developer Library)

◆ SetCritical()

static IMPORT_C TInt User::SetCritical ( TCritical  aCritical)
static

Sets up or changes the effect that termination of the current thread has, either on its owning process, or on the whole system.

  • ENotCritical
  • EProcessCritical
  • EProcessPermanent
  • ESystemCritical
  • ESystemPermanent
  • The enum value EAllThreadsCritical cannot be set using this function. It is associated with a process, not a thread, and, if appropriate, should be set using User::SetProcessCritical().
  • The states associated with ENotCritical, EProcessCritical, EProcessPermanent, ESystemCritical and ESystemPermanent are all mutually exclusive, i.e. the thread can only be in one of these states at any one time
Parameters
aCriticalThe state to be set.
capability
ProtServ if aCritical==ESystemCritical or ESystemPermanent

(generated from Symbian Developer Library)

◆ SetCurrencySymbol()

static IMPORT_C TInt User::SetCurrencySymbol ( const TDesC &  aSymbol)
static

Sets the system wide currency symbol.

On successful return from this function, a call to the Set() member function of a TCurrencySymbol object fetches the new currency symbol.

Parameters
aSymbolA reference to the descriptor containing the currency symbol to be set.
capability
WriteDeviceData

Panic condition: USER 119, if the length of aSymbol is greater than KMaxCurrencySymbol.

(generated from Symbian Developer Library)

◆ SetDebugMask() [1/2]

static IMPORT_C void User::SetDebugMask ( TUint32  aVal)
static

Sets the debug mask.

Parameters
aValA set of bit values as defined in nk_trace.h

(generated from Symbian Developer Library)

◆ SetDebugMask() [2/2]

static IMPORT_C void User::SetDebugMask ( TUint32  aVal,
TUint  aIndex 
)
static

Sets the debug mask at the given index.

Parameters
aValA set of bit values as defined in nk_trace.h
aIndexAn index of which 32 bit mask word is to be accessed

(generated from Symbian Developer Library)

◆ SetExceptionHandler()

static IMPORT_C TInt User::SetExceptionHandler ( TExceptionHandler  aHandler,
TUint32  aMask 
)
static

Sets a new exception handler for the current thread.

Note that the handler is not guaranteed to receive floating point exceptions (KExceptionFpe) when a hardware floating point implementation is in use - see User::SetFloatingPointMode for hardware floating point modes and whether they cause user-trappable exceptions.

KExceptionAbort KExceptionKill KExceptionUserInterrupt KExceptionFpe KExceptionFault KExceptionInteger KExceptionDebug

Parameters
aHandlerThe new exception handler.
aMaskOne or more flags defining the exception categories which the handler can handle.

(generated from Symbian Developer Library)

◆ SetFloatingPointMode()

static IMPORT_C TInt User::SetFloatingPointMode ( TFloatingPointMode  aMode,
TFloatingPointRoundingMode  aRoundingMode = EFpRoundToNearest 
)
static

Sets the hardware floating point mode for the current thread.

This does not affect software floating point calculations. The rounding mode can also be set. New threads created by this thread will inherit the mode, thus to set the mode for a whole process, call this method before you create any new threads.

TFloatingPointMode TFloatingPointRoundingMode

Parameters
aModeThe floating point calculation mode to use.
aRoundingModeThe floating point rounding mode to use, defaults to nearest.

(generated from Symbian Developer Library)

◆ SetHomeTime()

static IMPORT_C TInt User::SetHomeTime ( const TTime &  aTime)
static

Sets the home time to a specified time value.

Set the time using User::SetUTCTime if the UTC time is known; otherwise, use the timezone server to set the time.

Parameters
aTimeA reference to a time representation object containing the time value.
capability
WriteDeviceData

(generated from Symbian Developer Library)

◆ SetHomeTimeSecure()

static IMPORT_C TInt User::SetHomeTimeSecure ( const TTime &  aTime)
static

Sets the secure home time to a specified time value.

Parameters
aTimeA reference to a time representation object containing the secure time value.
capability
TCB
capability
WriteDeviceData

(generated from Symbian Developer Library)

◆ SetJustInTime()

static IMPORT_C void User::SetJustInTime ( const TBool  aBoolean)
static

Sets just-in-time debugging for this process on or off.

While the function can be called by code running on both the Emulator and ARM, it only has an effect on the Emulator. Turning just-in-time debugging off prevents the debug Emulator closing down when a panic occurs.

By default, just-in-time debugging is on.

Note that the emulator handles panics in the nomal manner, i.e. by killing the thread.

RProcess::SetJustInTime

Parameters
aBooleanETrue, if just-in-time debugging is to be set on. EFalse, if just-in-time debugging is to be set off. EFalse causes _asm 3 calls to be disabled.

(generated from Symbian Developer Library)

◆ SetMachineConfiguration()

static IMPORT_C TInt User::SetMachineConfiguration ( const TDesC8 &  aConfig)
static

Sets the machine configuration.

Parameters
aConfigDescriptor containing the machine configuration data
capability
WriteDeviceData

(generated from Symbian Developer Library)

◆ SetPriorityControl()

static IMPORT_C void User::SetPriorityControl ( TBool  aEnable)
static

Allows the current process to choose to have its priority switched by another process between 'foreground' and 'background'.

By default a process does not allow this.

Parameters
aEnableIf ETrue, allows other processes to switch the current process's priority. If EFalse, prevents other processes from switching the current process's priority.

(generated from Symbian Developer Library)

◆ SetProcessCritical()

static IMPORT_C TInt User::SetProcessCritical ( TCritical  aCritical)
static

Sets up or changes the effect that termination of subsequently created threads will have, either on the owning process, or on the whole system.

It is important to note that we are not referring to threads that have already been created, but threads that will be created subsequent to a call to this function.

  • ENotCritical
  • EAllThreadsCritical
  • ESystemCritical
  • ESystemPermanent
  • The enum values EProcessCritical and EProcessPermanent cannot be set using this function. They are states associated with a thread, not a process, and, if appropriate, should be set using User::SetCritical().
  • The states associated with ENotCritical, EAllThreadsCritical, ESystemCritical and ESystemPermanent are all mutually exclusive, i.e. the process can only be in one of these states at any one time.
Parameters
aCriticalThe state to be set.
capability
ProtServ if aCritical==ESystemCritical or ESystemPermanent

(generated from Symbian Developer Library)

◆ SetRealtimeState()

static IMPORT_C TInt User::SetRealtimeState ( TRealtimeState  aState)
static
Set the current threads realtime state.
@see TRealtimeState
@param aState The state
@return KErrNone if successful. KErrArgument if aState is invalid.
API status
Published to platform partners. Released API.
Parameters
aStateThe state

(generated from Symbian Developer Library)

◆ SetTrapHandler()

static IMPORT_C TTrapHandler * User::SetTrapHandler ( TTrapHandler *  aHandler)
static

Sets the current thread's trap handler and returns a pointer to any pre-existing trap handler.

Pass a NULL pointer to this function to clear the trap handler.

The trap handler works with the TRAP mechanism to handle the effects of a leave.

Note that TTrapHandler is an abstract base class; a trap handler must be implemented as a derived class.

TRAP TRAPD

Parameters
aHandlerA pointer to the trap handler which is to be installed as the current thread's trap handler.

(generated from Symbian Developer Library)

◆ SetUTCOffset()

static IMPORT_C void User::SetUTCOffset ( TTimeIntervalSeconds  aOffset)
static

Sets the UTC offset to the given number of seconds.

This should include both time zone differences and the effect of any applicable daylight savings time. A positive offset indicates a time ahead of UTC, a negative offset indicates a time behind UTC.

Parameters
aOffsetThe UTC offset, in seconds.
capability
WriteDeviceData

(generated from Symbian Developer Library)

◆ SetUTCTime()

static IMPORT_C TInt User::SetUTCTime ( const TTime &  aUTCTime)
static

Sets the UTC time to a specified time value.

Parameters
aUTCTimeA reference to a time representation object containing the time value.
capability
WriteDeviceData

(generated from Symbian Developer Library)

◆ SetUTCTimeAndOffset()

static IMPORT_C TInt User::SetUTCTimeAndOffset ( const TTime &  aUTCTime,
TTimeIntervalSeconds  aOffset 
)
static

Sets the UTC time and UTC offset to the specified values, atomically.

This is equivalent to calling both SetUTCTime and SetUTCOffset, but without the possibility of an incorrect time being observed between the two calls. If the operation is not successful, an error code will be returned and both the time and offset will be left unchanged.

Parameters
aUTCTimeA reference to a time representation object containing the time value.
aOffsetThe UTC offset, in seconds.
capability
WriteDeviceData

(generated from Symbian Developer Library)

◆ SetUTCTimeSecure()

static IMPORT_C TInt User::SetUTCTimeSecure ( const TTime &  aUTCTime)
static

Sets the secure UTC time to a specified time value.

Parameters
aUTCTimeA reference to a time representation object containing the secure time value.
capability
TCB
capability
WriteDeviceData

(generated from Symbian Developer Library)

◆ StringLength() [1/2]

static IMPORT_C TInt User::StringLength ( const TUint16 *  aString)
static

Gets the length of a C style, null terminated, string of double-byte valued characters.

The length does not include the null terminator.

Parameters
aStringA pointer to the double-byte valued, null terminated, string.

(generated from Symbian Developer Library)

◆ StringLength() [2/2]

static IMPORT_C TInt User::StringLength ( const TUint8 *  aString)
static

Gets the length of a C style, null terminated, string of single-byte valued characters.

The length does not include the null terminator.

Parameters
aStringA pointer to the single byte valued, null terminated, string.

(generated from Symbian Developer Library)

◆ SwitchAllocator()

static IMPORT_C RAllocator * User::SwitchAllocator ( RAllocator *  aAllocator)
static

Changes the current thread's heap.

Parameters
aAllocatorA pointer to the new heap handle.

(generated from Symbian Developer Library)

◆ SwitchHeap()

static RHeap * User::SwitchHeap ( RAllocator *  aHeap)
inlinestatic

Changes the current thread's heap.

Parameters
aHeapA pointer to the new heap handle.

(generated from Symbian Developer Library)

◆ TickCount()

static IMPORT_C TUint User::TickCount ( )
static

Gets the current tick count.

The period between ticks is usually 1/64 second, but may be hardware dependent.

(generated from Symbian Developer Library)

◆ TitleCase()

static IMPORT_C TUint User::TitleCase ( TUint  aChar)
static

Converts a specified character to its title case version.

Parameters
aCharThe character to be converted.

(generated from Symbian Developer Library)

◆ TrapHandler()

static IMPORT_C TTrapHandler * User::TrapHandler ( )
static

Gets a pointer to the current thread's trap handler.

Note that TTrapHandler is an abstract base class; a trap handler must be implemented as a derived class.

(generated from Symbian Developer Library)

◆ UnMarkCleanupStack()

static IMPORT_C void User::UnMarkCleanupStack ( TTrapHandler *  aHandler)
static

Internal component API.

◆ UpperCase()

static IMPORT_C TUint User::UpperCase ( TUint  aChar)
static

Converts a specified character to upper case.

The result of the conversion depends on the locale and on whether this is a UNICODE build or not.

Note that for a non UNICODE build, if the binary value of the character aChar is greater than or equal to 0x100, then the character returned is the same as the character passed to the function.

Parameters
aCharThe character to be converted to upper case.

(generated from Symbian Developer Library)

◆ UTCOffset()

static IMPORT_C TTimeIntervalSeconds User::UTCOffset ( )
static

Gets the UTC offset - the difference between UTC and the current local time due to any time zones and daylight savings time that may be in effect.

A positive offset indicates a time ahead of UTC, a negative offset indicates a time behind UTC.

(generated from Symbian Developer Library)

◆ ValidateName()

static IMPORT_C TInt User::ValidateName ( const TDesC &  aName)
static

Checks whether a specified name is a valid CObject name.

A name is deemed to be invalid, if it contains any of the characters: "*", "?", ":" i.e. the characters: asterisk, question mark and single colon.

CObject

Parameters
aNameA reference to the descriptor containing the name to be checked.

(generated from Symbian Developer Library)

◆ Version()

static IMPORT_C TVersion User::Version ( )
static

Retrieves the E32 component version number, which is the kernel architecture version number.

For example for EKA2 the major part of the version number will be 2.

(generated from Symbian Developer Library)

◆ WaitForAnyRequest()

static IMPORT_C void User::WaitForAnyRequest ( )
static

Waits for any asynchronous request to complete.

The current thread waits on its request semaphore.

The function completes, and control returns to the caller when the current thread's request semaphore is signalled by any of the service providers which handle these asynchronous requests.

The request status of all outstanding asynchronous requests must be examined to determine which request is complete.

TRequestStatus

(generated from Symbian Developer Library)

◆ WaitForNRequest()

static IMPORT_C void User::WaitForNRequest ( TRequestStatus *  aStatusArray[],
TInt  aNum 
)
static

Waits for any one of specific asynchronous requests to complete.

The current thread waits on its request semaphore.

The function completes and control returns to the caller when the current thread's request semaphore is signalled by the service provider handling the request associated with any member of aStatusArray[]. Before signalling, the completing service provider sets an appropriate value in the status object, other than KRequestPending.

Note that if other asynchronous requests complete before the ones associated with aStatusArray the request semaphore is adjusted so that knowledge of their completion is not lost. In this a case, a subsequent call to User::WaitForAnyRequest() or User::WaitForRequest() will complete and return immediately.

(generated from Symbian Developer Library)

◆ WaitForRequest() [1/2]

static IMPORT_C void User::WaitForRequest ( TRequestStatus &  aStatus)
static

Waits for a specific asynchronous request to complete.

The current thread waits on its request semaphore.

The function completes and control returns to the caller when the current thread's request semaphore is signalled by the service provider handling the request associated with aStatus. Before signalling, the service provider sets an appropriate value in aStatus, other than KRequestPending.

Note that if other asynchronous requests complete before the one associated with aStatus, the request semaphore is adjusted so that knowledge of their completion is not lost. In this a case, a subsequent call to User::WaitForAnyRequest() or User::WaitForRequest() will complete and return immediately.

KRequestPending

Parameters
aStatusA reference to the request status object associated with the specific asynchronous request.

(generated from Symbian Developer Library)

◆ WaitForRequest() [2/2]

static IMPORT_C void User::WaitForRequest ( TRequestStatus &  aStatus1,
TRequestStatus &  aStatus2 
)
static

Waits for either of two specific asynchronous requests to complete.

The current thread waits on its request semaphore.

The function completes and control returns to the caller when the current thread's request semaphore is signalled by either the service provider handling the request associated with aStatus1 or the service provider handling the request associated with aStatus2. Before signalling, the completing service provider sets an appropriate value in the status object, other than KRequestPending.

Note that if other asynchronous requests complete before the ones associated with aStatus1 and aStatus2, the request semaphore is adjusted so that knowledge of their completion is not lost. In this a case, a subsequent call to User::WaitForAnyRequest() or User::WaitForRequest() will complete and return immediately.

KRequestPending

Parameters
aStatus1A reference to the request status object associated with the first specific asynchronous request.
aStatus2A reference to the request status object associated with the second specific asynchronous request.

(generated from Symbian Developer Library)


The documentation for this class was generated from the following files: