|
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 fetch dialog interface. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef MPBK2FETCHDLG_H |
|
20 #define MPBK2FETCHDLG_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32std.h> |
|
24 #include <MPbk2ControlObserver.h> |
|
25 |
|
26 // FORWARD DECLARATIONS |
|
27 class CCoeControl; |
|
28 class MVPbkContactViewBase; |
|
29 class MVPbkContactLink; |
|
30 class MVPbkContactLinkArray; |
|
31 class MPbk2FetchDlgPage; |
|
32 class MPbk2FetchDlgObserver; |
|
33 |
|
34 // CLASS DECLARATION |
|
35 |
|
36 /** |
|
37 * Phonebook 2 fetch dialog interface. |
|
38 */ |
|
39 class MPbk2FetchDlg : public MPbk2ControlObserver |
|
40 { |
|
41 public: // Interface |
|
42 |
|
43 /** |
|
44 * Returns a dialog control with id aCtrlId. |
|
45 * |
|
46 * @param aCtrlId Control id. |
|
47 * @return Dialog control. |
|
48 */ |
|
49 virtual CCoeControl* FetchDlgControl( |
|
50 TInt aCtrlId ) const = 0; |
|
51 |
|
52 /** |
|
53 * Returns the contact view used. |
|
54 * |
|
55 * @param aControlId Control id, used to determine which |
|
56 * view to return. |
|
57 * @return The contact view. |
|
58 */ |
|
59 virtual MVPbkContactViewBase& FetchDlgViewL( |
|
60 TInt aControlId ) const = 0; |
|
61 |
|
62 /** |
|
63 * Returns the contact view used. |
|
64 * |
|
65 * @param aControlId Control id, used to determine which |
|
66 * view to set. |
|
67 * @param aView The view to set. |
|
68 */ |
|
69 virtual void SetFetchDlgViewL( |
|
70 TInt aControlId, |
|
71 MVPbkContactViewBase& aView ) = 0; |
|
72 |
|
73 /** |
|
74 * Returns the current fetch dialog selection set. |
|
75 * |
|
76 * @return Selected contacts. |
|
77 */ |
|
78 virtual MVPbkContactLinkArray& FetchDlgSelection() = 0; |
|
79 |
|
80 /** |
|
81 * Displays an async error aError note in the UI. |
|
82 * |
|
83 * @param aError The error code. |
|
84 */ |
|
85 virtual void FetchDlgHandleError( |
|
86 TInt aError ) = 0; |
|
87 |
|
88 /** |
|
89 * Returns the rectangle to use for the control. |
|
90 * |
|
91 * @return Rectangle area. |
|
92 */ |
|
93 virtual TRect FetchDlgClientRect() const = 0; |
|
94 |
|
95 /** |
|
96 * Called by a dialog page aPage when its state or contents |
|
97 * has changed. |
|
98 * |
|
99 * @param aPage The page whose contents have changed. |
|
100 */ |
|
101 virtual void FetchDlgPageChangedL( |
|
102 MPbk2FetchDlgPage& aPage ) = 0; |
|
103 |
|
104 /** |
|
105 * Returns the fetch dialog observer |
|
106 * |
|
107 * @return Observer. |
|
108 */ |
|
109 virtual MPbk2FetchDlgObserver& FetchDlgObserver() const = 0; |
|
110 |
|
111 /** |
|
112 * Causes the selection or deselection of given contact. |
|
113 * |
|
114 * @param aLink The contact to select/deselect. |
|
115 * @param aSelected ETrue to select contact, |
|
116 * EFalse to deselect contact. |
|
117 */ |
|
118 virtual void SelectContactL( |
|
119 const MVPbkContactLink& aLink, |
|
120 TBool aSelected ) = 0; |
|
121 |
|
122 protected: // Protected functions |
|
123 |
|
124 /** |
|
125 * Protected destructor. Concrete fetch dialog objects are not |
|
126 * destroyed through this interface. |
|
127 */ |
|
128 virtual ~MPbk2FetchDlg() |
|
129 {} |
|
130 }; |
|
131 |
|
132 #endif // MPBK2FETCHDLG_H |
|
133 |
|
134 // End of File |