epoc32/include/mw/apsettingshandlercommons.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
parent 2 2fe1408b6811
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
     1 /*
     2 * Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). 
     3 * All rights reserved.
     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".
     8 *
     9 * Initial Contributors:
    10 * Nokia Corporation - initial contribution.
    11 *
    12 * Contributors:
    13 *
    14 * Description: 
    15 *     Contains common consts, typedefs for the Access Point settings.
    16 *
    17 */
    18 
    19 
    20 #ifndef APSETTINGS_HANDLER_COMMONS_H
    21 #define APSETTINGS_HANDLER_COMMONS_H
    22 
    23 // Deprecation warning
    24 #warning This header file has been deprecated. Will be removed in one of the next SDK releases.
    25  
    26  
    27 // INCLUDES
    28 #include <ApEngineConsts.h>
    29 
    30 
    31 //#define __TEST_OOMDEBUG
    32 
    33 
    34 // CONSTANTS
    35 _LIT( KEmpty, "");
    36 
    37 _LIT( KTestFileName, "C:\\Data\\ApSetUiTest\\TestState.txt" );
    38 
    39 const TInt  KApSelectionCanceled    = -350;
    40 const TInt  KTxtNotOverriden        = -351;
    41 const TInt  KErrInvalidTextId       = -355;
    42 
    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!
    52 
    53     const TUint32   KOOMRetryCount   = 10;
    54     const TUint32   KOOMRetryOffset  = 5;
    55 #endif // __TEST_OOMDEBUG
    56 
    57 // DATA TYPES
    58 enum TTextID    /// These enums are used to identify the 'overridable' 
    59                 /// text items in CApSettingsHandler.
    60     {
    61     EApSettingsSelStatusPaneText = 0x00,
    62     EApSettingsSelListEmptyText,
    63     EPopupPromptText            /// Only this last one is used & implemented.
    64     };
    65 
    66 
    67 enum TTransactionResult         ///< Transaction results
    68     {
    69     EOwnTransaction,            ///< Own transaction started
    70     EUsingAlreadyStarted,       ///< Used already started one
    71     EFailedWithLocked           ///< Transaction start failed with KErrLocked
    72     };
    73 
    74 
    75 enum TApUiExitReason
    76     {
    77     EExitNone,
    78     EExit,
    79     EShutDown
    80     };
    81 
    82 
    83 // CONSTANTS
    84 const TInt  KTTextIdMin             =  EApSettingsSelStatusPaneText;
    85 const TInt  KTTextIdMax             =  EPopupPromptText;
    86 
    87 const TInt  KMaxNumOfLockedDbRetries= 3;
    88 
    89 /// Ui return code flags. They indicate what has happened inside the module. 
    90 /// They can be combined.
    91 /**
    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...)
    95 */
    96 const TInt  KApUiEventNone              = 0x00000000;   ///< Nothign happend
    97 const TInt  KApUiEventSelected          = 0x00000001;   ///< Item was selected
    98 const TInt  KApUiEventCreatedBlank      = 0x00000002;   ///< New item created 
    99                                                         ///< from blank
   100 const TInt  KApUiEventCreatedUsedOld    = 0x00000004;   ///< New item created 
   101                                                         ///< from an existing 
   102                                                         ///< one
   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
   107 
   108 // INTERNAL flag
   109 const TUint32  KApUiEventInternal       = 0x80000000;   ///< Internal flag
   110 
   111 
   112 const TUint32  KApNoneUID               = 0x00000000;
   113 
   114 
   115 enum TSelectionListType         ///< Defines the list type to be used
   116     {
   117     EApSettingsSelListIsPopUp, 
   118     EApSettingsSelListIsListPane,
   119     EApSettingsSelListIsPopUpWithNone
   120     };
   121 
   122 
   123 enum TSelectionMenuType         ///< Defines the Options menu type to be used
   124     {
   125     EApSettingsSelMenuNormal, 
   126     EApSettingsSelMenuSelectOnly,
   127     EApSettingsSelMenuSelectNormal
   128     };
   129 
   130 
   131 
   132 enum TApSettingsHandlerUiPanicCodes ///< Defines the Panic codes
   133     {
   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
   143     } ;
   144 
   145 
   146 
   147 /**
   148 * Panic
   149 * @param aPanic Panic code
   150 */
   151 void Panic( TApSettingsHandlerUiPanicCodes aPanic );
   152 
   153 
   154 /**
   155 * Ask a query
   156 * @param aResId Resource id
   157 * @param aVar variable part of the query, if any
   158 * @return The result of the query
   159 */
   160 TInt AskQueryL( TInt aResId, TDesC* aVar = NULL );
   161 
   162 
   163 /**
   164 * Shows a note
   165 * @param aResId Resource id
   166 * @param aVar variable part of the note, if any
   167 * @return The result of the note
   168 */
   169 TInt ShowNoteL( TInt aResId, TDesC* aVar = NULL );
   170 
   171 
   172 #ifdef __TEST_OOMDEBUG
   173     TInt GetTestState();
   174 #endif // __TEST_OOMDEBUG
   175 
   176 #endif
   177 
   178 
   179 // End of File