CApaWindowGroupName Class Reference

#include <mw/apgwgnam.h>

Link against: apgrfx.lib

class CApaWindowGroupName : public CBase, public CBase

Inherits from

Public Member Enumerations
enumanonymous { EMaxLength }
Public Member Functions
~CApaWindowGroupName()
IMPORT_C TUidAppUid()
IMPORT_C TPtrCCaption()
IMPORT_C voidConstructFromWgIdL(TInt)
IMPORT_C TPtrCDocName()
IMPORT_C TBoolDocNameIsAFile()
IMPORT_C voidFindByAppUid(TUid, RWsSession &, TInt &)
IMPORT_C voidFindByCaption(const TDesC &, RWsSession &, TInt &)
IMPORT_C voidFindByDocName(const TDesC &, RWsSession &, TInt &)
voidFindNonEmbeddedAppByUid(TUid, RWsSession &, TInt &, RArray< RWsSession::TWindowGroupChainInfo > &)
IMPORT_C TBoolHidden()
IMPORT_C TBoolIsAppReady()
IMPORT_C TBoolIsBusy()
IMPORT_C TBoolIsSystem()
IMPORT_C CApaWindowGroupName *New(const RWsSession &, HBufC *)
IMPORT_C CApaWindowGroupName *NewL(const RWsSession &)
IMPORT_C CApaWindowGroupName *NewL(const RWsSession &, TInt)
IMPORT_C CApaWindowGroupName *NewL(const RWsSession &, const TDesC &)
IMPORT_C CApaWindowGroupName *NewLC(const RWsSession &)
IMPORT_C CApaWindowGroupName *NewLC(const RWsSession &, TInt)
IMPORT_C CApaWindowGroupName *NewLC(const RWsSession &, const TDesC &)
IMPORT_C TBoolRespondsToShutdownEvent()
IMPORT_C TBoolRespondsToSwitchFilesEvent()
IMPORT_C voidSetAppReady(TBool)
IMPORT_C voidSetAppUid(TUid)
IMPORT_C voidSetBusy(TBool)
IMPORT_C voidSetCaptionL(const TDesC &)
IMPORT_C voidSetDocNameIsAFile(TBool)
IMPORT_C voidSetDocNameL(const TDesC &)
IMPORT_C voidSetHidden(TBool)
IMPORT_C voidSetRespondsToShutdownEvent(TBool)
IMPORT_C voidSetRespondsToSwitchFilesEvent(TBool)
IMPORT_C voidSetSystem(TBool)
IMPORT_C voidSetWindowGroupName(HBufC *)
IMPORT_C TIntSetWindowGroupName(RWindowGroup &)
IMPORT_C voidSetWindowGroupNameL(const TDesC &)
IMPORT_C TPtrCWindowGroupName()
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()

Detailed Description

Gives access to the name of a window group and the information encoded by that name.

A window group is associated with a task, i.e. a running application. The window group's name encodes four pieces of information for that task:

the name of the document that the task is handling,

the task's caption,

the application specific UID, as eight hexadecimal characters,

status information for the task, as two hexadecimal characters.

Member Enumeration Documentation

Enum anonymous

EnumeratorValueDescription
EMaxLength13+2*KMaxFileName

Constructor & Destructor Documentation

~CApaWindowGroupName ( )

IMPORT_C~CApaWindowGroupName()

Destructor.

Frees resources owned by the object prior to its destruction.

Member Function Documentation

AppUid ( )

IMPORT_C TUidAppUid()const

Gets the UID of the task's application.

Return Value
The application specific UID. If the format of the window group name is not recognized, then this is zero.

Caption ( )

IMPORT_C TPtrCCaption()const

Gets the task's caption.

Return Value
A non-modifiable pointer descriptor representing the caption. If the format of the window group name is not recognized, then this is a zero length descriptor.

ConstructFromWgIdL ( TInt )

IMPORT_C voidConstructFromWgIdL(TIntaWgId)

Assigns to this object the name taken from the specified window group.

Any previously existing name contained by this window group name object is lost.

If the specified window group does not exist or it has no name, then a default name is assigned.

Parameters
aWgIdThe ID of a window group.

DocName ( )

IMPORT_C TPtrCDocName()const

Gets the name of the document that the task is handling.

Return Value
A non-modifiable pointer descriptor representing the document name. If the format of the window group name is not recognized, then this is a zero length descriptor.

DocNameIsAFile ( )

IMPORT_C TBoolDocNameIsAFile()const

Tests whether the document name is a file.

See also: CEikonEnv::DocNameIsAFile()

Return Value
True, if the document name is a file; false, otherwise.

FindByAppUid ( TUid, RWsSession &, TInt & )

IMPORT_C voidFindByAppUid(TUidaAppUid,
RWsSession &aWsSession,
TInt &aPrevWgId
)[static]

Searches for the next window group by application UID.

A running application, also known as a task, is associated with a window group. The function searches for the next task running the specified application, and returns its associated window group ID.

Parameters
aAppUidThe application specific UID.
aWsSessionA window server session.
aPrevWgIdOn entry, the previous window group ID. On return, the next window group ID. On first call to this function pass a zero value. When there are no more matching window groups, contains KErrNotFound.

FindByCaption ( const TDesC &, RWsSession &, TInt & )

IMPORT_C voidFindByCaption(const TDesC &aCaption,
RWsSession &aWsSession,
TInt &aPrevWgId
)[static]

Searches for the next window group by caption.

A running application, also known as a task, is associated with a window group. The function searches for the next task having the specified caption, and returns its associated window group ID.

Parameters
aCaptionThe caption.
aWsSessionA window server session.
aPrevWgIdOn entry, the previous window group ID. On return, the next window group ID. On first call to this function pass a zero value. When there are no more matching window groups, contains KErrNotFound.

FindByDocName ( const TDesC &, RWsSession &, TInt & )

IMPORT_C voidFindByDocName(const TDesC &aDocName,
RWsSession &aWsSession,
TInt &aPrevWgId
)[static]

Searches for the next window group by document name.

A running application, also known as a task, is associated with a window group. The function searches for the next task handling the specified document, and returns its associated window group ID.

Parameters
aDocNameThe name of the document.
aWsSessionA window server session.
aPrevWgIdOn entry, the previous window group ID. On return, the next window group ID. On first call to this function pass a zero value. When there are no more matching window groups, contains KErrNotFound.

FindNonEmbeddedAppByUid ( TUid, RWsSession &, TInt &, RArray< RWsSession::TWindowGroupChainInfo > & )

voidFindNonEmbeddedAppByUid(TUidaAppUid,
RWsSession &aWsSession,
TInt &aPrevWgId,
RArray< RWsSession::TWindowGroupChainInfo > &aWindowArray
)[static]

Searches for the next window group by application UID which is non-embedded application.

A running non-embedded application, also known as a task, is associated with a window group. The function searches for the next task running the specified application, and returns its associated window group ID.

Parameters
aAppUidThe application specific UID.
aWsSessionA window server session.
aPrevWgIdOn entry, the previous window group ID. On return, the next window group ID. On first call to this function pass a zero value. When there are no more matching window groups, contains KErrNotFound.

Hidden ( )

IMPORT_C TBoolHidden()const

Tests whether the task is marked as hidden.

Return Value
True if the task is hidden; false otherwise.

IsAppReady ( )

IMPORT_C TBoolIsAppReady()const

Tests whether the task is marked as ready.

Return Value
True if the task is ready; false otherwise.

IsBusy ( )

IMPORT_C TBoolIsBusy()const

Tests whether the task is marked as busy.

See also: CEikonEnv::IsBusy()

Return Value
True, if the task is marked as busy; false, otherwise.

IsSystem ( )

IMPORT_C TBoolIsSystem()const

Tests whether the task is marked as a system task.

See also: CEikonEnv::IsSystem()

Return Value
True, if the task is marked as a system task; false, otherwise.

New ( const RWsSession &, HBufC * )

IMPORT_C CApaWindowGroupName *New(const RWsSession &aWsSession,
HBufC *aWgName
)[static]

Creates a window group name object and takes ownership of the heap descriptor containing a name.

The name must have valid format. Typically, this is an existing window group name.

Note that the function cannot leave.

Parameters
aWsSessionA window server session.
aWgNameA heap descriptor containing a valid window group name. This pointer must not be null, otherwise the function raises an APGRFX 3 panic.
Return Value
A pointer to the new window group name object.

NewL ( const RWsSession & )

IMPORT_C CApaWindowGroupName *NewL(const RWsSession &aWsSession)[static]

Creates a window group name object and assigns a default name to it.

Parameters
aWsSessionA window server session.
Return Value
A pointer to the new window group name object.

NewL ( const RWsSession &, TInt )

IMPORT_C CApaWindowGroupName *NewL(const RWsSession &aWsSession,
TIntaWgId
)[static]

Creates a window group name object and assigns to it the name taken from the specified window group.

Parameters
aWsSessionA window server session.
aWgIdThe ID of a window group.
Return Value
A pointer to the new window group name object.

NewL ( const RWsSession &, const TDesC & )

IMPORT_C CApaWindowGroupName *NewL(const RWsSession &aWsSession,
const TDesC &aWgName
)[static]

Creates a window group name object and assigns to it the specified name.

The name must have a valid format. Typically, this is an existing window group name.

Parameters
aWsSessionA window server session.
aWgNameA valid window group name.
Return Value
A pointer to the new window group name object.

NewLC ( const RWsSession & )

IMPORT_C CApaWindowGroupName *NewLC(const RWsSession &aWsSession)[static]

Creates a window group name object, assigns a default name to it, and puts a pointer to the new object onto the cleanup stack.

Parameters
aWsSessionA window server session.
Return Value
A pointer to the new window group name object.

NewLC ( const RWsSession &, TInt )

IMPORT_C CApaWindowGroupName *NewLC(const RWsSession &aWsSession,
TIntaWgId
)[static]

Creates a window group name object, assigns to it the name taken from the specified window group, and puts a pointer to the new object onto the cleanup stack.

Parameters
aWsSessionA window server session.
aWgIdThe ID of a window group.
Return Value
A pointer to the new window group name object.

NewLC ( const RWsSession &, const TDesC & )

IMPORT_C CApaWindowGroupName *NewLC(const RWsSession &aWsSession,
const TDesC &aWgName
)[static]

Creates a window group name object, assigns to it the specified name, and puts a pointer to the new object onto the cleanup stack.

The name must have valid format. Typically, this is an existing window group name.

Parameters
aWsSessionA window server session.
aWgNameA valid window group name.
Return Value
A pointer to the new window group name object.

RespondsToShutdownEvent ( )

IMPORT_C TBoolRespondsToShutdownEvent()const

Tests whether the task can deal with a request to shutdown.

See also: CEikonEnv::RespondsToShutdownEvent()

Return Value
True, if the task can deal with a request to shutdown; false, otherwise.

RespondsToSwitchFilesEvent ( )

IMPORT_C TBoolRespondsToSwitchFilesEvent()const

Tests whether the task can deal with a request to switch files.

See also: CEikonEnv::RespondsToSwitchFilesEvent()

Return Value
True, if the task can deal with a request to switch files; false otherwise.

SetAppReady ( TBool )

IMPORT_C voidSetAppReady(TBoolaIsReady)

Sets the task as ready.

Parameters
aIsReadyETrue if the task is to be marked as ready; EFalse if not.

SetAppUid ( TUid )

IMPORT_C voidSetAppUid(TUidaAppUid)

Sets the specified UID into the window group name in this object.

Parameters
aAppUidThe application specific UID.

SetBusy ( TBool )

IMPORT_C voidSetBusy(TBoolaBusy)

Sets the task's busy status in this object.

See also: CEikonEnv::SetBusy()

Parameters
aBusyETrue, marks the task as busy; EFalse, marks the task as not busy.

SetCaptionL ( const TDesC & )

IMPORT_C voidSetCaptionL(const TDesC &aCaption)

Sets the specified caption into the window group name in this object.

Parameters
aCaptionThe caption.

SetDocNameIsAFile ( TBool )

IMPORT_C voidSetDocNameIsAFile(TBoolaDocNameIsAFile)

Sets the document name status in this object.

See also: CEikonEnv::SetDocNameIsAFile()

Parameters
aDocNameIsAFileETrue, the document name is a filename; EFalse, the document name is not a filename.

SetDocNameL ( const TDesC & )

IMPORT_C voidSetDocNameL(const TDesC &aDocName)

Sets the specified document name into the window group name in this object.

Parameters
aDocNameThe document name.

SetHidden ( TBool )

IMPORT_C voidSetHidden(TBoolaIsHidden)

Marks the task as hidden.

In general, tasks marked as hidden do not appear in tasklists. Specifically, TApaTask::FindByPos() will ignore any tasks marked as hidden.

Parameters
aIsHiddenETrue if the task is to be marked as hidden; EFalse if not.

SetRespondsToShutdownEvent ( TBool )

IMPORT_C voidSetRespondsToShutdownEvent(TBoolaRespondsToShutdownEvent)

Sets the task's shutdown handling status in this object.

See also: CEikonEnv::SetRespondsToShutdownEvent()

Parameters
aRespondsToShutdownEventETrue, if the task can deal with a shutdown request; EFalse, if the task cannot deal with a shutdown request.

SetRespondsToSwitchFilesEvent ( TBool )

IMPORT_C voidSetRespondsToSwitchFilesEvent(TBoolaRespondsToSwitchFilesEvent)

Sets the task's switch file handling status in this object.

See also: CEikonEnv::SetRespondsToSwitchFilesEvent()

Parameters
aRespondsToSwitchFilesEventETrue, if the task can deal with a request to switch file; EFalse, if the task cannot deal with with a request to switch files.

SetSystem ( TBool )

IMPORT_C voidSetSystem(TBoolaSystem)

Sets the task's system status in this object.

See also: CEikonEnv::SetSystem()

Parameters
aSystemETrue, marks the task as a system task; EFalse, marks the task as not a system task.

SetWindowGroupName ( HBufC * )

IMPORT_C voidSetWindowGroupName(HBufC *aWgName)

Sets the full window group name in this object, taking ownership of the specified heap descriptor.

The function cannot leave.

Parameters
aWgNameA heap descriptor containing the full window group name. The pointer must not be null, otherwise the function raises a APGRFX 3 panic.

SetWindowGroupName ( RWindowGroup & )

IMPORT_C TIntSetWindowGroupName(RWindowGroup &aGroupWin)const

Sets the window group name contained by this object into the specified window group.

Parameters
aGroupWinThe window group.
Return Value
KErrNone, if successful; otherwise, one of the other system-wide error codes.

SetWindowGroupNameL ( const TDesC & )

IMPORT_C voidSetWindowGroupNameL(const TDesC &aWgName)

Sets the full window group name in this object.

Parameters
aWgNameThe full window group name.

WindowGroupName ( )

IMPORT_C TPtrCWindowGroupName()const

Gets the full window group name.

Return Value
A non-modifiable pointer descriptor representing the full window group name.