1.1 --- a/epoc32/include/apgctl.h Tue Mar 16 16:12:26 2010 +0000
1.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
1.3 @@ -1,160 +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 -#ifndef __APGCTL_H__
1.20 -#define __APGCTL_H__
1.21 -
1.22 -#if !defined(__E32STD_H__)
1.23 -#include <e32std.h>
1.24 -#endif
1.25 -#if !defined(__E32BASE_H__)
1.26 -#include <e32base.h>
1.27 -#endif
1.28 -
1.29 -// classes defined:
1.30 -class CApaSystemControl;
1.31 -class CApaSystemControlList;
1.32 -//
1.33 -// classes referenced:
1.34 -class RFs;
1.35 -class CApaMaskedBitmap;
1.36 -//
1.37 -
1.38 -/**
1.39 -Calls the control DLL's first ordinal function to create and run the control.
1.40 -
1.41 -The function leaves with KErrBadLibraryEntryPoint if the ordinal 1 function
1.42 -cannot be found.
1.43 -
1.44 -@publishedAll
1.45 -@released
1.46 -*/
1.47 -typedef TInt (*ApaRunSystemControl)(const TDesC&);
1.48 -
1.49 -/**
1.50 -@publishedAll
1.51 -@released
1.52 -*/
1.53 -#ifdef _UNICODE
1.54 -#define KUidSystemControlDll KUidSystemControlDll16
1.55 -#else
1.56 -#define KUidSystemControlDll KUidSystemControlDll8
1.57 -#endif
1.58 -
1.59 -/**
1.60 -@publishedAll
1.61 -@deprecated
1.62 -*/
1.63 -const TInt KSystemControlDllUidValue8=0x10000297;
1.64 -
1.65 -/**
1.66 -@publishedAll
1.67 -@deprecated
1.68 -*/
1.69 -const TUid KUidSystemControlDll8={KSystemControlDllUidValue8};
1.70 -
1.71 -/**
1.72 -@publishedAll
1.73 -@released
1.74 -*/
1.75 -const TUid KUidSystemControlDll16={0x10003A34};
1.76 -
1.77 -
1.78 -class CApaSystemControl : public CBase
1.79 -/** Wrapper to a control panel application.
1.80 -
1.81 -An instance of the class represents a control panel application. It is also a cache for the control's icon and caption.
1.82 -
1.83 -An instance of the wrapper can only be constructed by the control panel application list, which
1.84 -is a CApaSystemControlList object.
1.85 -
1.86 -@publishedAll
1.87 -@released */
1.88 - {
1.89 -public:
1.90 - IMPORT_C void CreateL();
1.91 - IMPORT_C TUid Type()const;
1.92 - IMPORT_C TFileName FileName()const;
1.93 - IMPORT_C CApaMaskedBitmap* Icon()const; // one size of icon, 48x48?
1.94 - IMPORT_C TPtrC Caption()const;
1.95 - IMPORT_C TPtrC ShortCaption()const;
1.96 -private:
1.97 - static CApaSystemControl* NewL(RFs& aFs,const TDesC& aFullPath,const TUidType aUidType);
1.98 - ~CApaSystemControl();
1.99 -
1.100 - CApaSystemControl(RFs& aFs);
1.101 - void ConstructL(const TDesC& aFullPath,const TUidType aUidType);
1.102 -private:
1.103 - CApaSystemControl* iNext;
1.104 - HBufC* iCaption;
1.105 - HBufC* iShortCaption;
1.106 - CApaMaskedBitmap* iIcon;
1.107 - TBool iExists; // used during updating
1.108 - TFileName iFullPath;
1.109 - TUidType iUidType;
1.110 - RFs& iFs;
1.111 -
1.112 - friend class CApaSystemControlList;
1.113 - };
1.114 -
1.115 -
1.116 -
1.117 -class CApaSystemControlList : public CBase
1.118 -/** Provides a list of all available control panel applications present on the phone.
1.119 -This class is implemented as a linked list of CApaSystemControl. Updates the control panel application list by removing
1.120 -control panels that no longer exist, adding new control panels found to the control panel application list and replacing
1.121 -a control panel if found in an earlier drive.
1.122 -
1.123 -@see CApaSystemControl
1.124 -@publishedPartner
1.125 -@released
1.126 -*/
1.127 - {
1.128 -public:
1.129 - IMPORT_C static CApaSystemControlList* NewL(RFs& aFs);
1.130 - IMPORT_C ~CApaSystemControlList();
1.131 -
1.132 - IMPORT_C TInt Count()const;
1.133 - IMPORT_C TInt Index(TUid aType)const;
1.134 - IMPORT_C CApaSystemControl* Control(TInt aIndex)const;
1.135 - IMPORT_C CApaSystemControl* Control(TUid aType)const;
1.136 -
1.137 - IMPORT_C void UpdateL();
1.138 - inline TInt UpdateCount()const;
1.139 -private:
1.140 - CApaSystemControlList(RFs& aFs);
1.141 - CApaSystemControl* PreviousControl(const CApaSystemControl* aControl) const;
1.142 -private:
1.143 - TInt iUpdateCount;
1.144 - RFs& iFs;
1.145 - CApaSystemControl* iControl;
1.146 - };
1.147 -
1.148 -
1.149 -//
1.150 -// inlines
1.151 -//
1.152 -
1.153 -
1.154 -inline TInt CApaSystemControlList::UpdateCount()const
1.155 -/** Gets the number of times the control panel application list has been
1.156 -updated (by calling UpdateL()). It returns 1 for a newly created list.
1.157 -
1.158 -@return The number of times the control panel application list has been changed. */
1.159 - { return iUpdateCount; }
1.160 -
1.161 -
1.162 -
1.163 -#endif