2 * Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of "Eclipse Public License v1.0"
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
15 * Contains common consts, typedefs for the Access Point settings.
20 #ifndef APSETTINGS_HANDLER_COMMONS_H
21 #define APSETTINGS_HANDLER_COMMONS_H
23 // Deprecation warning
24 #warning This header file has been deprecated. Will be removed in one of the next SDK releases.
28 #include <ApEngineConsts.h>
31 //#define __TEST_OOMDEBUG
37 _LIT( KTestFileName, "C:\\Data\\ApSetUiTest\\TestState.txt" );
39 const TInt KApSelectionCanceled = -350;
40 const TInt KTxtNotOverriden = -351;
41 const TInt KErrInvalidTextId = -355;
43 #ifdef __TEST_OOMDEBUG
44 const TInt KDialogListTest = 1; // Done
45 const TInt KPopupListTest = 2; // Done
46 const TInt KQueryTest = 3; // Done
47 const TInt KEditingTest = 4; // Done
48 const TInt KViewerTest = 5; // impl.
49 const TInt KCreateBlankTest = 6; // Impl
50 const TInt KCreateUseExistTest = 7; // Impl
51 const TInt KDeleteTest = 8; // N/I!
53 const TUint32 KOOMRetryCount = 10;
54 const TUint32 KOOMRetryOffset = 5;
55 #endif // __TEST_OOMDEBUG
58 enum TTextID /// These enums are used to identify the 'overridable'
59 /// text items in CApSettingsHandler.
61 EApSettingsSelStatusPaneText = 0x00,
62 EApSettingsSelListEmptyText,
63 EPopupPromptText /// Only this last one is used & implemented.
67 enum TTransactionResult ///< Transaction results
69 EOwnTransaction, ///< Own transaction started
70 EUsingAlreadyStarted, ///< Used already started one
71 EFailedWithLocked ///< Transaction start failed with KErrLocked
84 const TInt KTTextIdMin = EApSettingsSelStatusPaneText;
85 const TInt KTTextIdMax = EPopupPromptText;
87 const TInt KMaxNumOfLockedDbRetries= 3;
89 /// Ui return code flags. They indicate what has happened inside the module.
90 /// They can be combined.
92 * Ui return code flags. They indicate what has happened inside the module.
93 * They can be combined. The most important one is KApUiEventSelected and it
94 * indicates that the user selected an access point (in case of selection...)
96 const TInt KApUiEventNone = 0x00000000; ///< Nothign happend
97 const TInt KApUiEventSelected = 0x00000001; ///< Item was selected
98 const TInt KApUiEventCreatedBlank = 0x00000002; ///< New item created
100 const TInt KApUiEventCreatedUsedOld = 0x00000004; ///< New item created
101 ///< from an existing
103 const TInt KApUiEventEdited = 0x00000008; ///< Item edited
104 const TInt KApUiEventDeleted = 0x00000010; ///< Item deleted
105 const TInt KApUiEventExitRequested = 0x00000020; ///< User choosed Exit
106 const TInt KApUiEventShutDownRequested = 0x00000040; ///< System shutdown
109 const TUint32 KApUiEventInternal = 0x80000000; ///< Internal flag
112 const TUint32 KApNoneUID = 0x00000000;
115 enum TSelectionListType ///< Defines the list type to be used
117 EApSettingsSelListIsPopUp,
118 EApSettingsSelListIsListPane,
119 EApSettingsSelListIsPopUpWithNone
123 enum TSelectionMenuType ///< Defines the Options menu type to be used
125 EApSettingsSelMenuNormal,
126 EApSettingsSelMenuSelectOnly,
127 EApSettingsSelMenuSelectNormal
132 enum TApSettingsHandlerUiPanicCodes ///< Defines the Panic codes
134 EMenuCommandUnknown, ///< Unknonw menu command
135 EInvalidDbType, ///< Invalid database type
136 EInvalidBitmapType, ///< Invalid bitmap type
137 EInvalidBearerType, ///< Invalid bearer type
138 EInvalidIspRequest, ///< Invalid ISP request
139 ENullPointer, ///< Null pointer passed
140 EUnknownCase, ///< Unknown 'case'
141 EInvalidTextType, ///< Invalid text type
142 EInvalidState ///< Invalid state
149 * @param aPanic Panic code
151 void Panic( TApSettingsHandlerUiPanicCodes aPanic );
156 * @param aResId Resource id
157 * @param aVar variable part of the query, if any
158 * @return The result of the query
160 TInt AskQueryL( TInt aResId, TDesC* aVar = NULL );
165 * @param aResId Resource id
166 * @param aVar variable part of the note, if any
167 * @return The result of the note
169 TInt ShowNoteL( TInt aResId, TDesC* aVar = NULL );
172 #ifdef __TEST_OOMDEBUG
174 #endif // __TEST_OOMDEBUG