1 /* |
|
2 * Copyright (c) 2006 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: Icon file provider. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // INCLUDE FILES |
|
20 #include "cbsiconfileprovider.h" |
|
21 #include <aknappui.h> |
|
22 #include <AknIconUtils.h> |
|
23 |
|
24 // ============================ MEMBER FUNCTIONS =============================== |
|
25 |
|
26 // ----------------------------------------------------------------------------- |
|
27 // CBSIconFileProvider::CBSIconFileProvider |
|
28 // C++ default constructor can NOT contain any code, that |
|
29 // might leave. |
|
30 // ----------------------------------------------------------------------------- |
|
31 // |
|
32 CBSIconFileProvider::CBSIconFileProvider() |
|
33 { |
|
34 } |
|
35 // ----------------------------------------------------------------------------- |
|
36 // CBSIconFileProvider::ConstructL |
|
37 // Symbian 2nd phase constructor can leave. |
|
38 // ----------------------------------------------------------------------------- |
|
39 // |
|
40 void CBSIconFileProvider::ConstructL(RFile& aFile) |
|
41 { |
|
42 User::LeaveIfError( iFile.Duplicate( aFile ) ); |
|
43 } |
|
44 |
|
45 // ----------------------------------------------------------------------------- |
|
46 // CBSIconFileProvider::NewL |
|
47 // Two-phased constructor. |
|
48 // ----------------------------------------------------------------------------- |
|
49 // |
|
50 CBSIconFileProvider* CBSIconFileProvider::NewL( |
|
51 RFile& aFile ) |
|
52 { |
|
53 CBSIconFileProvider* self = new( ELeave ) CBSIconFileProvider(); |
|
54 |
|
55 CleanupStack::PushL( self ); |
|
56 self->ConstructL(aFile); |
|
57 CleanupStack::Pop( self ); |
|
58 return self; |
|
59 } |
|
60 |
|
61 |
|
62 // Destructor |
|
63 CBSIconFileProvider::~CBSIconFileProvider() |
|
64 { |
|
65 delete iFilename; |
|
66 iFile.Close(); |
|
67 } |
|
68 |
|
69 // ----------------------------------------------------------------------------- |
|
70 // CBSIconFileProvider::RetrieveIconFileHandleL |
|
71 // (other items were commented in a header). |
|
72 // ----------------------------------------------------------------------------- |
|
73 // |
|
74 void CBSIconFileProvider::RetrieveIconFileHandleL( |
|
75 RFile& aFile, const TIconFileType /*aType*/ ) |
|
76 { |
|
77 aFile.Duplicate( iFile ); |
|
78 } |
|
79 |
|
80 // ----------------------------------------------------------------------------- |
|
81 // CBSIconFileProvider::Finished |
|
82 // (other items were commented in a header). |
|
83 // ----------------------------------------------------------------------------- |
|
84 // |
|
85 void CBSIconFileProvider::Finished() |
|
86 { |
|
87 // commit suicide because Avkon Icon Server said so |
|
88 delete this; |
|
89 } |
|
90 |
|
91 // End of File |
|