1.1 --- a/epoc32/include/apgwgnam.h Tue Mar 16 16:12:26 2010 +0000
1.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
1.3 @@ -1,106 +0,0 @@
1.4 -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 -// All rights reserved.
1.6 -// This component and the accompanying materials are made available
1.7 -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
1.8 -// which accompanies this distribution, and is available
1.9 -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.10 -//
1.11 -// Initial Contributors:
1.12 -// Nokia Corporation - initial contribution.
1.13 -//
1.14 -// Contributors:
1.15 -//
1.16 -// Description:
1.17 -//
1.18 -
1.19 -#if !defined(__APGWGNAM_H__)
1.20 -#define __APGWGNAM_H__
1.21 -
1.22 -#if !defined(__W32STD_H__)
1.23 -#include <w32std.h>
1.24 -#endif
1.25 -
1.26 -class CApaWindowGroupName : public CBase
1.27 -/** Gives access to the name of a window group and the information encoded by that
1.28 -name.
1.29 -
1.30 -A window group is associated with a task, i.e. a running application. The
1.31 -window group's name encodes four pieces of information for that task:
1.32 -
1.33 -the name of the document that the task is handling,
1.34 -
1.35 -the task's caption,
1.36 -
1.37 -the application specific UID, as eight hexadecimal characters,
1.38 -
1.39 -status information for the task, as two hexadecimal characters.
1.40 -
1.41 -@publishedAll
1.42 -@released */
1.43 - {
1.44 -public:
1.45 - enum { EMaxLength=13+2*KMaxFileName };
1.46 -public:
1.47 - IMPORT_C ~CApaWindowGroupName();
1.48 - IMPORT_C static CApaWindowGroupName* NewL(const RWsSession& aWsSession);
1.49 - IMPORT_C static CApaWindowGroupName* NewLC(const RWsSession& aWsSession);
1.50 - IMPORT_C static CApaWindowGroupName* NewL(const RWsSession& aWsSession, TInt aWgId);
1.51 - IMPORT_C static CApaWindowGroupName* NewLC(const RWsSession& aWsSession, TInt aWgId);
1.52 - IMPORT_C static CApaWindowGroupName* New(const RWsSession& aWsSession, HBufC* aWgName);
1.53 - IMPORT_C static CApaWindowGroupName* NewL(const RWsSession& aWsSession, const TDesC& aWgName);
1.54 - IMPORT_C static CApaWindowGroupName* NewLC(const RWsSession& aWsSession, const TDesC& aWgName);
1.55 - IMPORT_C void ConstructFromWgIdL(TInt aWgId);
1.56 - //
1.57 - IMPORT_C void SetWindowGroupNameL(const TDesC& aWgName);
1.58 - IMPORT_C void SetWindowGroupName(HBufC* aWgName);
1.59 - //
1.60 - IMPORT_C static void FindByAppUid(TUid aAppUid, RWsSession& aWsSession, TInt& aPrevWgId);
1.61 - IMPORT_C static void FindByCaption(const TDesC& aCaption, RWsSession& aWsSession, TInt& aPrevWgId);
1.62 - IMPORT_C static void FindByDocName(const TDesC& aDocName, RWsSession& aWsSession, TInt& aPrevWgId);
1.63 - //
1.64 - IMPORT_C void SetBusy(TBool aBusy);
1.65 - IMPORT_C TBool IsBusy() const;
1.66 - IMPORT_C void SetSystem(TBool aSystem);
1.67 - IMPORT_C TBool IsSystem() const;
1.68 - IMPORT_C void SetDocNameIsAFile(TBool aDocNameIsAFile);
1.69 - IMPORT_C TBool DocNameIsAFile() const;
1.70 - IMPORT_C void SetRespondsToShutdownEvent(TBool aRespondsToShutdownEvent);
1.71 - IMPORT_C TBool RespondsToShutdownEvent() const;
1.72 - IMPORT_C void SetRespondsToSwitchFilesEvent(TBool aRespondsToSwitchFilesEvent);
1.73 - IMPORT_C TBool RespondsToSwitchFilesEvent() const;
1.74 - IMPORT_C void SetHidden(TBool aIsHidden);
1.75 - IMPORT_C TBool Hidden() const;
1.76 - IMPORT_C void SetAppReady(TBool aIsReady);
1.77 - IMPORT_C TBool IsAppReady() const;
1.78 - //
1.79 - IMPORT_C void SetAppUid(TUid aAppUid);
1.80 - IMPORT_C TUid AppUid() const;
1.81 - //
1.82 - IMPORT_C void SetCaptionL(const TDesC& aCaption);
1.83 - IMPORT_C TPtrC Caption() const;
1.84 - //
1.85 - IMPORT_C void SetDocNameL(const TDesC& aDocName);
1.86 - IMPORT_C TPtrC DocName() const;
1.87 - //
1.88 - IMPORT_C TInt SetWindowGroupName(RWindowGroup& aGroupWin) const;
1.89 - IMPORT_C TPtrC WindowGroupName() const;
1.90 -private: //enums
1.91 - enum TApaStatus { ESystem =0x01, EBusy =0x02, EDocNameNotAFile =0x04
1.92 - ,EDoesNotRespondToShutdownEvent=0x08, EDoesNotRespondToSwitchFilesEvent=0x10
1.93 - ,EIsHidden=0x20, EAppReady=0x40 };
1.94 - enum TApaDelimiter { EEndStatus=1, EEndUid, EEndCaption, ELast=EEndCaption }; // ELast must be last and same as predecessor
1.95 -private:
1.96 - CApaWindowGroupName(const RWsSession& aWsSession);
1.97 - //
1.98 - void DefaultConstructL();
1.99 - void WriteStatusToName();
1.100 - void GetStatusFromName();
1.101 - TInt FindDelimiter(TApaDelimiter aDelim) const;
1.102 - void ReAllocIfNecessaryL(TInt aExtraLengthReqd);
1.103 -private:
1.104 - HBufC* iBuf;
1.105 - TUint iStatus;
1.106 - const RWsSession& iWsSession;
1.107 - };
1.108 -
1.109 -#endif