author | William Roberts <williamr@symbian.org> |
Tue, 16 Mar 2010 16:12:26 +0000 | |
branch | Symbian2 |
changeset 2 | 2fe1408b6811 |
parent 1 | 666f914201fb |
child 4 | 837f303aceeb |
permissions | -rw-r--r-- |
williamr@2 | 1 |
/* |
williamr@2 | 2 |
* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). |
williamr@2 | 3 |
* All rights reserved. |
williamr@2 | 4 |
* This component and the accompanying materials are made available |
williamr@2 | 5 |
* 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 |
williamr@2 | 6 |
* which accompanies this distribution, and is available |
williamr@2 | 7 |
* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". |
williamr@2 | 8 |
* |
williamr@2 | 9 |
* Initial Contributors: |
williamr@2 | 10 |
* Nokia Corporation - initial contribution. |
williamr@2 | 11 |
* |
williamr@2 | 12 |
* Contributors: |
williamr@2 | 13 |
* |
williamr@2 | 14 |
* Description: |
williamr@2 | 15 |
* Phonebook Multiple Entry Fetch API. |
williamr@2 | 16 |
* |
williamr@2 | 17 |
*/ |
williamr@2 | 18 |
|
williamr@2 | 19 |
|
williamr@2 | 20 |
#ifndef __CPbkMultipleEntryFetchDlg_H__ |
williamr@2 | 21 |
#define __CPbkMultipleEntryFetchDlg_H__ |
williamr@2 | 22 |
|
williamr@2 | 23 |
// INCLUDES |
williamr@2 | 24 |
#include <e32base.h> // CBase |
williamr@2 | 25 |
|
williamr@2 | 26 |
// FORWARD DECLARATIONS |
williamr@2 | 27 |
class CPbkContactEngine; |
williamr@2 | 28 |
class CContactViewBase; |
williamr@2 | 29 |
class CContactIdArray; |
williamr@2 | 30 |
class CPbkFetchDlg; |
williamr@2 | 31 |
class MObjectProvider; |
williamr@2 | 32 |
class MPbkFetchDlgSelection; |
williamr@2 | 33 |
|
williamr@2 | 34 |
|
williamr@2 | 35 |
// CLASS DECLARATION |
williamr@2 | 36 |
|
williamr@2 | 37 |
/** |
williamr@2 | 38 |
* Phonebook Multiple Entry Fetch API. This class is used to construct |
williamr@2 | 39 |
* a Phonebook UI dialog where the user is able to select multiple |
williamr@2 | 40 |
* contact entries from a list. The selection is then returned to the |
williamr@2 | 41 |
* client. |
williamr@2 | 42 |
*/ |
williamr@2 | 43 |
class CPbkMultipleEntryFetchDlg : public CBase |
williamr@2 | 44 |
{ |
williamr@2 | 45 |
public: // Types |
williamr@2 | 46 |
/** |
williamr@2 | 47 |
* Multiple entry fetch parameter class. |
williamr@2 | 48 |
*/ |
williamr@2 | 49 |
class TParams |
williamr@2 | 50 |
{ |
williamr@2 | 51 |
public: // Input parameters |
williamr@2 | 52 |
/** |
williamr@2 | 53 |
* Contact view to display. If NULL loads the default |
williamr@2 | 54 |
* contact view containing all names in the contact |
williamr@2 | 55 |
* database. |
williamr@2 | 56 |
*/ |
williamr@2 | 57 |
CContactViewBase* iContactView; |
williamr@2 | 58 |
|
williamr@2 | 59 |
public: // Output parameters |
williamr@2 | 60 |
/** |
williamr@2 | 61 |
* Returns an array of ids of the selected entries, |
williamr@2 | 62 |
* undefined if the dialog is canceled. |
williamr@2 | 63 |
* Caller must delete iMarkedEntries when no longer needed. |
williamr@2 | 64 |
*/ |
williamr@2 | 65 |
CContactIdArray* iMarkedEntries; |
williamr@2 | 66 |
|
williamr@2 | 67 |
public: // Additional input parameters |
williamr@2 | 68 |
/** |
williamr@2 | 69 |
* OPTIONAL: Fetch softkey resource ID. |
williamr@2 | 70 |
* If 0, default softkeys are used. |
williamr@2 | 71 |
*/ |
williamr@2 | 72 |
TInt iCbaId; |
williamr@2 | 73 |
|
williamr@2 | 74 |
/** |
williamr@2 | 75 |
* OPTIONAL: Fetch selection accepter. |
williamr@2 | 76 |
* If NULL, not applicable. |
williamr@2 | 77 |
*/ |
williamr@2 | 78 |
MPbkFetchDlgSelection* iFetchSelection; |
williamr@2 | 79 |
|
williamr@2 | 80 |
public: // Interface |
williamr@2 | 81 |
/** |
williamr@2 | 82 |
* C++ constructor. |
williamr@2 | 83 |
*/ |
williamr@2 | 84 |
IMPORT_C TParams(); |
williamr@2 | 85 |
|
williamr@2 | 86 |
// Compiler-generated destructor is ok for this class |
williamr@2 | 87 |
|
williamr@2 | 88 |
/** |
williamr@2 | 89 |
* Returns a cleanup item which will handle cleanup of this |
williamr@2 | 90 |
* object in case of a leave. |
williamr@2 | 91 |
*/ |
williamr@2 | 92 |
IMPORT_C operator TCleanupItem(); |
williamr@2 | 93 |
|
williamr@2 | 94 |
private: // Implementation |
williamr@2 | 95 |
static void Cleanup(TAny* aPtr); |
williamr@2 | 96 |
|
williamr@2 | 97 |
private: // Unimplemented functions |
williamr@2 | 98 |
/// Unimplemented copy constructor |
williamr@2 | 99 |
TParams(const TParams&); |
williamr@2 | 100 |
/// Unimplemented assignment operator |
williamr@2 | 101 |
TParams& operator=(const TParams&); |
williamr@2 | 102 |
}; |
williamr@2 | 103 |
|
williamr@2 | 104 |
public: // Interface |
williamr@2 | 105 |
/** |
williamr@2 | 106 |
* Creates a new multiple entry fetch dialog. |
williamr@2 | 107 |
* |
williamr@2 | 108 |
* @param aParams Fetch parameters, see TParams. |
williamr@2 | 109 |
* @param aEngine Phonebook engine. |
williamr@2 | 110 |
* @return A new instance of this class. |
williamr@2 | 111 |
*/ |
williamr@2 | 112 |
IMPORT_C static CPbkMultipleEntryFetchDlg* NewL |
williamr@2 | 113 |
(TParams& aParams, CPbkContactEngine& aEngine); |
williamr@2 | 114 |
|
williamr@2 | 115 |
/** |
williamr@2 | 116 |
* See CCoeControl::SetMopParent(MObjectProvider* aParent) |
williamr@2 | 117 |
*/ |
williamr@2 | 118 |
IMPORT_C void SetMopParent(MObjectProvider* aParent); |
williamr@2 | 119 |
|
williamr@2 | 120 |
/** |
williamr@2 | 121 |
* Executes this dialog. |
williamr@2 | 122 |
* NOTE: this object is deleted when ExecuteLD returns or leaves! |
williamr@2 | 123 |
* NOTE: current status pane layout is replaced with the Phonebook |
williamr@2 | 124 |
* one. Restoring the original pane is left to be the responsibility |
williamr@2 | 125 |
* of the caller. |
williamr@2 | 126 |
* |
williamr@2 | 127 |
* @return A non-zero value if accepted, zero if canceled. |
williamr@2 | 128 |
*/ |
williamr@2 | 129 |
IMPORT_C TInt ExecuteLD(); |
williamr@2 | 130 |
|
williamr@2 | 131 |
/** |
williamr@2 | 132 |
* Destructor. Also cancels this dialog and makes ExecuteLD return. |
williamr@2 | 133 |
*/ |
williamr@2 | 134 |
~CPbkMultipleEntryFetchDlg(); |
williamr@2 | 135 |
|
williamr@2 | 136 |
private: // Implementation |
williamr@2 | 137 |
CPbkMultipleEntryFetchDlg(TParams& aParams, CPbkContactEngine& aEngine); |
williamr@2 | 138 |
void ConstructL(); |
williamr@2 | 139 |
static void Panic(TInt aReason); |
williamr@2 | 140 |
|
williamr@2 | 141 |
private: // Data |
williamr@2 | 142 |
/// Own: parameters |
williamr@2 | 143 |
TParams& iParams; |
williamr@2 | 144 |
/// Own: fetch dialog |
williamr@2 | 145 |
CPbkFetchDlg* iFetchDlg; |
williamr@2 | 146 |
/// Ref: Phonebook engine |
williamr@2 | 147 |
CPbkContactEngine& iPbkEngine; |
williamr@2 | 148 |
/// Ref: set to ETrue in destructor |
williamr@2 | 149 |
TBool* iDestroyedPtr; |
williamr@2 | 150 |
/// Own: Object Provider |
williamr@2 | 151 |
MObjectProvider* iObjectProvider; |
williamr@2 | 152 |
}; |
williamr@2 | 153 |
|
williamr@2 | 154 |
#endif // __CPbkMultipleEntryFetchDlg_H__ |
williamr@2 | 155 |
|
williamr@2 | 156 |
// End of File |