|
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: Abstract interface for loading thumbail images. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CPHCNTTHUMBNAILLOADER_H |
|
20 #define CPHCNTTHUMBNAILLOADER_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32base.h> |
|
24 #include <cntdef.h> |
|
25 |
|
26 class CPhCntContactId; |
|
27 |
|
28 // CONSTANTS |
|
29 // MACROS |
|
30 #define KPhCntThumbnailNullId 0 |
|
31 |
|
32 // CLASS DECLARATION |
|
33 |
|
34 /** |
|
35 * It is abstract interface for loading thumbail images. |
|
36 * |
|
37 * Note that it is considered that loading of thumbnail images is not critical. |
|
38 * Thus, if something fails during loading procedure, then we ignore the whole |
|
39 * thumbnail. |
|
40 * |
|
41 * However, observer will be informed of both success and failure. |
|
42 * |
|
43 * @lib PhoneCntFinder |
|
44 * @since 1.0 |
|
45 */ |
|
46 NONSHARABLE_CLASS( CPhCntThumbnailLoader ) |
|
47 : public CBase |
|
48 { |
|
49 public: // New functions |
|
50 |
|
51 /** |
|
52 * It defines type for thumbnail ids. |
|
53 */ |
|
54 typedef const TAny* TThumbnailId; |
|
55 |
|
56 /** |
|
57 * Loads thumbnail asynchronously. |
|
58 * |
|
59 * You can call this to load several images. Images are loaded in |
|
60 * FIFO order. |
|
61 * |
|
62 * @param aId id. if id is already in use, it's canceled. It will |
|
63 * be zeroed if loading failed to the beginning. |
|
64 * @param aContactId contact id. Copies the contact id. |
|
65 * @return error code. |
|
66 */ |
|
67 virtual TInt Load( TThumbnailId& aId, const CPhCntContactId& aContactId ) = 0; |
|
68 |
|
69 /** |
|
70 * Cancels loading of thumbnail with given id. |
|
71 * |
|
72 * @param aId id to cancel. |
|
73 */ |
|
74 virtual void Cancel( TThumbnailId aId ) = 0; |
|
75 |
|
76 }; |
|
77 |
|
78 #endif // CPHCNTTHUMBNAILLOADER_H |
|
79 |
|
80 // End of File |