phonebookui/Phonebook2/inc/TPbk2ContactEditorParams.h
changeset 0 e686773b3f54
equal deleted inserted replaced
-1:000000000000 0:e686773b3f54
       
     1 /*
       
     2 * Copyright (c) 2005-2007 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:  Phonebook 2 contact editor parameters.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef TPBK2CONTACTEDITORPARAMS_H
       
    20 #define TPBK2CONTACTEDITORPARAMS_H
       
    21 
       
    22 //  INCLUDES
       
    23 #include <e32std.h>
       
    24 
       
    25 // FORWARD DECLARATIONS
       
    26 class TCoeHelpContext;
       
    27 class MPbk2ExitCallback;
       
    28 class MVPbkBaseContactField;
       
    29 
       
    30 // CLASS DECLARATION
       
    31 
       
    32 /**
       
    33  * Phonebook 2 contact editor parameters.
       
    34  */
       
    35 class TPbk2ContactEditorParams
       
    36     {
       
    37     public: // Data types
       
    38 
       
    39         /**
       
    40          * Flags for the editor
       
    41          */
       
    42         enum TFlags
       
    43             {
       
    44             /// Set this on if iStoreContact is a new one
       
    45             ENewContact     = 0x00000001,
       
    46             /// Set this on if iStoreContact has already been modified
       
    47             EModified       = 0x00000002,
       
    48             /// Set this on if editor's exit command is to be hidden
       
    49             EHideExit       = 0x00000004,
       
    50             /// Set this on if iStoreContact is user's own contact
       
    51             EOwnContact     = 0x00000008
       
    52             };
       
    53         
       
    54         enum TActiveView
       
    55         	{
       
    56         	EEditorUndefinied,
       
    57         	EEditorView,
       
    58         	EEditorAddressView,
       
    59         	EEditorAddressHomeView,
       
    60         	EEditorAddressOfficeView
       
    61         	};
       
    62 
       
    63     public: // Constructors and destructor
       
    64 
       
    65         /**
       
    66          * Constructor.
       
    67          *
       
    68          * @param aFlags                A collection of TFlags.
       
    69          * @param aFocusedContactField  The field to focus. If NULL
       
    70          *                              the topmost field is focused.
       
    71          * @param aHelpContext          External help context.
       
    72          * @param aExitCallback         Exit callback.
       
    73          * @param aFocusedIndex         The index of the field to focus.
       
    74          *                              Used only to return the focused
       
    75          *                              index.
       
    76          */
       
    77         inline TPbk2ContactEditorParams(
       
    78                 TUint32 aFlags = 0,
       
    79                 MVPbkBaseContactField* aFocusedContactField = NULL,
       
    80                 TCoeHelpContext* aHelpContext = NULL,
       
    81                 MPbk2ExitCallback* aExitCallback = NULL,
       
    82                 TInt aFocusedIndex = KErrNotFound );
       
    83 
       
    84     public: // Data
       
    85         /// Ref: Focused contact field
       
    86         MVPbkBaseContactField* iFocusedContactField;
       
    87         /// Own: A set of TFlags
       
    88         TUint32 iFlags;
       
    89         /// Ref: External help context
       
    90         TCoeHelpContext* iHelpContext;
       
    91         /// Ref: Exit callback
       
    92         MPbk2ExitCallback* iExitCallback;
       
    93         /// Own: Used only to return focused field index.
       
    94         TInt iFocusedIndex;
       
    95         /// Own: Active view
       
    96         TActiveView iActiveView;
       
    97     };
       
    98 
       
    99 // INLINE FUNCTIONS
       
   100 
       
   101 inline TPbk2ContactEditorParams::TPbk2ContactEditorParams(
       
   102     TUint32 aFlags /*= 0*/,
       
   103     MVPbkBaseContactField* aFocusedContactField /*= NULL*/,
       
   104     TCoeHelpContext* aHelpContext /*= NULL*/,
       
   105     MPbk2ExitCallback* aExitCallback /*= NULL*/,
       
   106     TInt aFocusedIndex /*= KErrNotFound*/) :
       
   107         iFlags( aFlags ),
       
   108         iFocusedContactField( aFocusedContactField ),
       
   109         iHelpContext( aHelpContext ),
       
   110         iExitCallback( aExitCallback ),
       
   111         iFocusedIndex( aFocusedIndex ),
       
   112         iActiveView(EEditorView)
       
   113     {
       
   114     }
       
   115 
       
   116 #endif // TPBK2CONTACTEDITORPARAMS_H
       
   117 
       
   118 // End of File