|
1 /* |
|
2 * Copyright (c) 2002 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: |
|
15 * Phonebook asyncronous image operation observer interfaces. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef __MPbkImageOperationObservers_H__ |
|
21 #define __MPbkImageOperationObservers_H__ |
|
22 |
|
23 // INCLUDES |
|
24 #include <e32def.h> |
|
25 |
|
26 // FORWARD DECLARATIONS |
|
27 class MPbkImageOperation; |
|
28 class CFbsBitmap; |
|
29 class CPbkImageDataWithInfo; |
|
30 |
|
31 // CLASS DECLARATION |
|
32 |
|
33 /** |
|
34 * Observer interface for CPbkImageManager get operation. |
|
35 * Only one of the event callbacks is called once by the operation. |
|
36 * |
|
37 * @see CPbkImageManager::GetImageAsyncL |
|
38 */ |
|
39 class MPbkImageGetObserver |
|
40 { |
|
41 public: |
|
42 /** |
|
43 * Called when image loading is completed. |
|
44 * |
|
45 * @param aOperation the completed operation. |
|
46 * @param aBitmap The loaded bitmap. Callee is responsible of |
|
47 * the bitmap. |
|
48 */ |
|
49 virtual void PbkImageGetComplete |
|
50 (MPbkImageOperation& aOperation, CFbsBitmap* aBitmap) =0; |
|
51 |
|
52 /** |
|
53 * Called if the image loading fails. |
|
54 * |
|
55 * @param aOperation the failed operation. |
|
56 * @param aError error code of the failure. |
|
57 */ |
|
58 virtual void PbkImageGetFailed |
|
59 (MPbkImageOperation& aOperation, TInt aError) =0; |
|
60 }; |
|
61 |
|
62 |
|
63 /** |
|
64 * Observer interface for CPbkImageManager get image operation. |
|
65 * Only one of the event callbacks is called once by the operation. |
|
66 * |
|
67 * @see CPbkImageManager::GetImageAsyncL |
|
68 */ |
|
69 class MPbkImageGetImageObserver |
|
70 { |
|
71 public: |
|
72 /** |
|
73 * Called when image loading is completed. |
|
74 * |
|
75 * @param aOperation the completed operation. |
|
76 * @param aImageData The image image. Caller is responsible |
|
77 * of the object. |
|
78 */ |
|
79 virtual void PbkImageGetImageComplete |
|
80 (MPbkImageOperation& aOperation, CPbkImageDataWithInfo* aImageData) =0; |
|
81 |
|
82 /** |
|
83 * Called if the image loading fails. |
|
84 * |
|
85 * @param aOperation the failed operation. |
|
86 * @param aError error code of the failure. |
|
87 */ |
|
88 virtual void PbkImageGetImageFailed |
|
89 (MPbkImageOperation& aOperation, TInt aError) =0; |
|
90 }; |
|
91 |
|
92 |
|
93 /** |
|
94 * Observer interface for CPbkImageManager set operations. |
|
95 * Only one of the event callbacks is called once by the operation. |
|
96 * |
|
97 * @see CPbkImageManager::SetImageAsyncL |
|
98 */ |
|
99 class MPbkImageSetObserver |
|
100 { |
|
101 public: |
|
102 /** |
|
103 * Called when image setting is completed. |
|
104 * |
|
105 * @param aOperation the completed operation. |
|
106 */ |
|
107 virtual void PbkImageSetComplete |
|
108 (MPbkImageOperation& aOperation) =0; |
|
109 |
|
110 /** |
|
111 * Called if the image setting fails. |
|
112 * |
|
113 * @param aOperation the failed operation. |
|
114 * @param aError error code of the failure. |
|
115 */ |
|
116 virtual void PbkImageSetFailed |
|
117 (MPbkImageOperation& aOperation, TInt aError) =0; |
|
118 }; |
|
119 |
|
120 #endif // __MPbkImageOperationObservers_H__ |
|
121 |
|
122 // End of File |