|
1 /* |
|
2 * Copyright (c) 2006-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: Base class for thumbnail provider plug-ins |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #include "thumbnailprovider.h" |
|
20 #include "thumbnaillog.h" |
|
21 |
|
22 // ======== MEMBER FUNCTIONS ======== |
|
23 |
|
24 // --------------------------------------------------------------------------- |
|
25 // Construct new CThumbnailProvider implementation instance via ECom |
|
26 // --------------------------------------------------------------------------- |
|
27 // |
|
28 CThumbnailProvider* CThumbnailProvider::NewL( TUid aUid ) |
|
29 { |
|
30 TAny* interface = REComSession::CreateImplementationL( aUid, _FOFF( |
|
31 CThumbnailProvider, iDtor_ID_Key )); |
|
32 CThumbnailProvider* ret = reinterpret_cast < CThumbnailProvider* > ( |
|
33 interface ); |
|
34 ret->iUid = aUid; |
|
35 return ret; |
|
36 } |
|
37 |
|
38 |
|
39 // --------------------------------------------------------------------------- |
|
40 // Get the UID of the provider |
|
41 // --------------------------------------------------------------------------- |
|
42 // |
|
43 TUid CThumbnailProvider::Uid() |
|
44 { |
|
45 return iUid; |
|
46 } |
|
47 |
|
48 |
|
49 // --------------------------------------------------------------------------- |
|
50 // CThumbnailProvider::SetObserver() |
|
51 // --------------------------------------------------------------------------- |
|
52 // |
|
53 void CThumbnailProvider::SetObserver( MThumbnailProviderObserver& aObserver ) |
|
54 { |
|
55 iObserver = &aObserver; |
|
56 } |
|
57 |
|
58 |
|
59 // --------------------------------------------------------------------------- |
|
60 // CThumbnailProvider::Reset() |
|
61 // --------------------------------------------------------------------------- |
|
62 // |
|
63 void CThumbnailProvider::Reset() |
|
64 { |
|
65 iTargetSize = TSize(); |
|
66 iCroppedTargetSize = TSize(); |
|
67 } |
|
68 |
|
69 |
|
70 // --------------------------------------------------------------------------- |
|
71 // CThumbnailProvider::SetTargetSize() |
|
72 // --------------------------------------------------------------------------- |
|
73 // |
|
74 void CThumbnailProvider::SetTargetSize( const TSize& aSize ) |
|
75 { |
|
76 iTargetSize = aSize; |
|
77 } |
|
78 |
|
79 |
|
80 // --------------------------------------------------------------------------- |
|
81 // CThumbnailProvider::SetCroppedTargetSize() |
|
82 // --------------------------------------------------------------------------- |
|
83 // |
|
84 void CThumbnailProvider::SetCroppedTargetSize( const TSize& aCroppedSize ) |
|
85 { |
|
86 iCroppedTargetSize = aCroppedSize; |
|
87 } |
|
88 |
|
89 // End of file |