1.1 --- a/epoc32/include/app/cpbkmultipleentryfetchdlg.h Tue Nov 24 13:55:44 2009 +0000
1.2 +++ b/epoc32/include/app/cpbkmultipleentryfetchdlg.h Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -1,1 +1,156 @@
1.4 -cpbkmultipleentryfetchdlg.h
1.5 +/*
1.6 +* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
1.7 +* All rights reserved.
1.8 +* This component and the accompanying materials are made available
1.9 +* 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.10 +* which accompanies this distribution, and is available
1.11 +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.12 +*
1.13 +* Initial Contributors:
1.14 +* Nokia Corporation - initial contribution.
1.15 +*
1.16 +* Contributors:
1.17 +*
1.18 +* Description:
1.19 +* Phonebook Multiple Entry Fetch API.
1.20 +*
1.21 +*/
1.22 +
1.23 +
1.24 +#ifndef __CPbkMultipleEntryFetchDlg_H__
1.25 +#define __CPbkMultipleEntryFetchDlg_H__
1.26 +
1.27 +// INCLUDES
1.28 +#include <e32base.h> // CBase
1.29 +
1.30 +// FORWARD DECLARATIONS
1.31 +class CPbkContactEngine;
1.32 +class CContactViewBase;
1.33 +class CContactIdArray;
1.34 +class CPbkFetchDlg;
1.35 +class MObjectProvider;
1.36 +class MPbkFetchDlgSelection;
1.37 +
1.38 +
1.39 +// CLASS DECLARATION
1.40 +
1.41 +/**
1.42 + * Phonebook Multiple Entry Fetch API. This class is used to construct
1.43 + * a Phonebook UI dialog where the user is able to select multiple
1.44 + * contact entries from a list. The selection is then returned to the
1.45 + * client.
1.46 + */
1.47 +class CPbkMultipleEntryFetchDlg : public CBase
1.48 + {
1.49 + public: // Types
1.50 + /**
1.51 + * Multiple entry fetch parameter class.
1.52 + */
1.53 + class TParams
1.54 + {
1.55 + public: // Input parameters
1.56 + /**
1.57 + * Contact view to display. If NULL loads the default
1.58 + * contact view containing all names in the contact
1.59 + * database.
1.60 + */
1.61 + CContactViewBase* iContactView;
1.62 +
1.63 + public: // Output parameters
1.64 + /**
1.65 + * Returns an array of ids of the selected entries,
1.66 + * undefined if the dialog is canceled.
1.67 + * Caller must delete iMarkedEntries when no longer needed.
1.68 + */
1.69 + CContactIdArray* iMarkedEntries;
1.70 +
1.71 + public: // Additional input parameters
1.72 + /**
1.73 + * OPTIONAL: Fetch softkey resource ID.
1.74 + * If 0, default softkeys are used.
1.75 + */
1.76 + TInt iCbaId;
1.77 +
1.78 + /**
1.79 + * OPTIONAL: Fetch selection accepter.
1.80 + * If NULL, not applicable.
1.81 + */
1.82 + MPbkFetchDlgSelection* iFetchSelection;
1.83 +
1.84 + public: // Interface
1.85 + /**
1.86 + * C++ constructor.
1.87 + */
1.88 + IMPORT_C TParams();
1.89 +
1.90 + // Compiler-generated destructor is ok for this class
1.91 +
1.92 + /**
1.93 + * Returns a cleanup item which will handle cleanup of this
1.94 + * object in case of a leave.
1.95 + */
1.96 + IMPORT_C operator TCleanupItem();
1.97 +
1.98 + private: // Implementation
1.99 + static void Cleanup(TAny* aPtr);
1.100 +
1.101 + private: // Unimplemented functions
1.102 + /// Unimplemented copy constructor
1.103 + TParams(const TParams&);
1.104 + /// Unimplemented assignment operator
1.105 + TParams& operator=(const TParams&);
1.106 + };
1.107 +
1.108 + public: // Interface
1.109 + /**
1.110 + * Creates a new multiple entry fetch dialog.
1.111 + *
1.112 + * @param aParams Fetch parameters, see TParams.
1.113 + * @param aEngine Phonebook engine.
1.114 + * @return A new instance of this class.
1.115 + */
1.116 + IMPORT_C static CPbkMultipleEntryFetchDlg* NewL
1.117 + (TParams& aParams, CPbkContactEngine& aEngine);
1.118 +
1.119 + /**
1.120 + * See CCoeControl::SetMopParent(MObjectProvider* aParent)
1.121 + */
1.122 + IMPORT_C void SetMopParent(MObjectProvider* aParent);
1.123 +
1.124 + /**
1.125 + * Executes this dialog.
1.126 + * NOTE: this object is deleted when ExecuteLD returns or leaves!
1.127 + * NOTE: current status pane layout is replaced with the Phonebook
1.128 + * one. Restoring the original pane is left to be the responsibility
1.129 + * of the caller.
1.130 + *
1.131 + * @return A non-zero value if accepted, zero if canceled.
1.132 + */
1.133 + IMPORT_C TInt ExecuteLD();
1.134 +
1.135 + /**
1.136 + * Destructor. Also cancels this dialog and makes ExecuteLD return.
1.137 + */
1.138 + ~CPbkMultipleEntryFetchDlg();
1.139 +
1.140 + private: // Implementation
1.141 + CPbkMultipleEntryFetchDlg(TParams& aParams, CPbkContactEngine& aEngine);
1.142 + void ConstructL();
1.143 + static void Panic(TInt aReason);
1.144 +
1.145 + private: // Data
1.146 + /// Own: parameters
1.147 + TParams& iParams;
1.148 + /// Own: fetch dialog
1.149 + CPbkFetchDlg* iFetchDlg;
1.150 + /// Ref: Phonebook engine
1.151 + CPbkContactEngine& iPbkEngine;
1.152 + /// Ref: set to ETrue in destructor
1.153 + TBool* iDestroyedPtr;
1.154 + /// Own: Object Provider
1.155 + MObjectProvider* iObjectProvider;
1.156 + };
1.157 +
1.158 +#endif // __CPbkMultipleEntryFetchDlg_H__
1.159 +
1.160 +// End of File