37 */ |
37 */ |
38 class MVPbkContactViewObserver |
38 class MVPbkContactViewObserver |
39 { |
39 { |
40 public: // Interface |
40 public: // Interface |
41 /** |
41 /** |
42 * Called when a view is ready for use. |
42 * Called when a view is ready for use. |
43 * |
43 * |
44 * This function may also be called if view is already ready. Then |
44 * This function may also be called if view is already ready. Then |
45 * it means that the view has been updated and the observer have |
45 * it means that the view has been updated and the observer have |
46 * to take this into account. |
46 * to take this into account. |
47 * |
47 * |
48 * @param aView A contact view sending the event. |
48 * @param aView A contact view sending the event. |
49 */ |
49 */ |
50 virtual void ContactViewReady( |
50 virtual void ContactViewReady( |
51 MVPbkContactViewBase& aView ) = 0; |
51 MVPbkContactViewBase& aView ) = 0; |
52 |
52 |
53 /** |
53 /** |
54 * Called when a view is unavailable for a while. |
54 * Called when a view is unavailable for a while. |
55 * |
55 * |
56 * When the view is again available ContactViewReady will be called. |
56 * When the view is again available ContactViewReady will be called. |
57 * The contents of the view may change completely while it is |
57 * The contents of the view may change completely while it is |
58 * unavailable. |
58 * unavailable. |
59 * |
59 * |
60 * @param aView A contact view sending the event. |
60 * @param aView A contact view sending the event. |
69 * @param aIndex An index of the contact in the view. |
69 * @param aIndex An index of the contact in the view. |
70 * @param aContactLink A link to the added contact that is |
70 * @param aContactLink A link to the added contact that is |
71 * valid only during the functio call. |
71 * valid only during the functio call. |
72 */ |
72 */ |
73 virtual void ContactAddedToView( |
73 virtual void ContactAddedToView( |
74 MVPbkContactViewBase& aView, |
74 MVPbkContactViewBase& aView, |
75 TInt aIndex, |
75 TInt aIndex, |
76 const MVPbkContactLink& aContactLink ) = 0; |
76 const MVPbkContactLink& aContactLink ) = 0; |
77 |
77 |
78 /** |
78 /** |
79 * Called when a contact has been removed from a view. |
79 * Called when a contact has been removed from a view. |
80 * |
80 * |
82 * @param aIndex An index of the removed contact. |
82 * @param aIndex An index of the removed contact. |
83 * @param aContactLink A link to the removed contact that is |
83 * @param aContactLink A link to the removed contact that is |
84 * valid only during this function call. |
84 * valid only during this function call. |
85 */ |
85 */ |
86 virtual void ContactRemovedFromView( |
86 virtual void ContactRemovedFromView( |
87 MVPbkContactViewBase& aView, |
87 MVPbkContactViewBase& aView, |
88 TInt aIndex, |
88 TInt aIndex, |
89 const MVPbkContactLink& aContactLink ) = 0; |
89 const MVPbkContactLink& aContactLink ) = 0; |
90 |
90 |
91 /** |
91 /** |
92 * Called when an error occurs in the view. |
92 * Called when an error occurs in the view. |
93 * |
93 * |
95 * it asynchronously because the view can access member data |
95 * it asynchronously because the view can access member data |
96 * after a call to this. |
96 * after a call to this. |
97 * |
97 * |
98 * @param aView A contact view sending the event. |
98 * @param aView A contact view sending the event. |
99 * @param aError An error code of the failure. |
99 * @param aError An error code of the failure. |
100 * @param aErrorNotified ETrue if the implementation has already |
100 * @param aErrorNotified ETrue if the implementation has already |
101 * notified user about the error using e.g |
101 * notified user about the error using e.g |
102 * an ECOM plug-in, EFalse otherwise. |
102 * an ECOM plug-in, EFalse otherwise. |
103 */ |
103 */ |
104 virtual void ContactViewError( |
104 virtual void ContactViewError( |
105 MVPbkContactViewBase& aView, |
105 MVPbkContactViewBase& aView, |
106 TInt aError, |
106 TInt aError, |
107 TBool aErrorNotified ) = 0; |
107 TBool aErrorNotified ) = 0; |
108 |
108 |
109 /** |
109 /** |
110 * Returns an extension point for this interface or NULL. |
110 * Returns an extension point for this interface or NULL. |
111 * |
111 * |
112 * @param aExtensionUid no extensions defined currently. |
112 * @param aExtensionUid no extensions defined currently. |
113 * @return an extension point for this interface or NULL. |
113 * @return an extension point for this interface or NULL. |
114 */ |
114 */ |
115 virtual TAny* ContactViewObserverExtension(TUid /*aExtensionUid*/) |
115 virtual TAny* ContactViewObserverExtension(TUid /*aExtensionUid*/) |
116 { return NULL; } |
116 { return NULL; } |
117 |
117 |
118 protected: // Destructor |
118 protected: // Destructor |
119 virtual ~MVPbkContactViewObserver() { } |
119 virtual ~MVPbkContactViewObserver() { } |
120 |
120 |
121 }; |
121 }; |
122 |
122 |
|
123 |
|
124 |
|
125 /// Use this UID to access base contact extension 2. |
|
126 // Used as a parameter to ContactViewObserverExtension() method. |
|
127 const TUid KVPbkContactViewObserverExtension2Uid = { 2 }; |
|
128 |
|
129 /** |
|
130 * This class is an extension to MVPbkContactViewObserver. |
|
131 * |
|
132 * @see MVPbkContactViewObserver |
|
133 * |
|
134 */ |
|
135 class MVPbkContactViewObserverExtension |
|
136 { |
|
137 protected: // Destructor |
|
138 virtual ~MVPbkContactViewObserverExtension() { } |
|
139 |
|
140 public: |
|
141 |
|
142 /** |
|
143 * Called when filtered contact removed from view |
|
144 */ |
|
145 virtual void FilteredContactRemovedFromView( MVPbkContactViewBase& aView ) = 0; |
|
146 }; |
|
147 |
|
148 |
123 #endif // MVPBKCONTACTVIEWOBSERVER_H |
149 #endif // MVPBKCONTACTVIEWOBSERVER_H |
124 |
150 |
125 // End of File |
151 // End of File |