|
1 /* |
|
2 * Copyright (c) 2008 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: This module contains the implementation of |
|
15 * : CSsIconFileProvider class. |
|
16 * |
|
17 */ |
|
18 |
|
19 #include "cssiconfileprovider.h" |
|
20 |
|
21 // ================= MEMBER FUNCTIONS ========================================== |
|
22 |
|
23 // ----------------------------------------------------------------------------- |
|
24 // CSsIconFileProvider::CSsIconFileProvider |
|
25 // |
|
26 // ----------------------------------------------------------------------------- |
|
27 // |
|
28 CSsIconFileProvider::CSsIconFileProvider() |
|
29 { |
|
30 } |
|
31 |
|
32 // ----------------------------------------------------------------------------- |
|
33 // CSsIconFileProvider::~CSsIconFileProvider |
|
34 // |
|
35 // ----------------------------------------------------------------------------- |
|
36 // |
|
37 CSsIconFileProvider::~CSsIconFileProvider() |
|
38 { |
|
39 } |
|
40 |
|
41 // ----------------------------------------------------------------------------- |
|
42 // CSsIconFileProvider::ConstructL |
|
43 // Symbian 2nd phase constructor can leave. |
|
44 // ----------------------------------------------------------------------------- |
|
45 // |
|
46 void CSsIconFileProvider::ConstructL( RFile& aFile ) |
|
47 { |
|
48 User::LeaveIfError( iFile.Duplicate( aFile ) ); |
|
49 } |
|
50 |
|
51 // ---------------------------------------------------------------------------- |
|
52 // CSsIconFileProvider::NewL |
|
53 // Two-phased constructor. |
|
54 // ----------------------------------------------------------------------------- |
|
55 // |
|
56 CSsIconFileProvider* CSsIconFileProvider::NewL( |
|
57 RFile& aFile ) |
|
58 { |
|
59 CSsIconFileProvider* self = |
|
60 new ( ELeave ) CSsIconFileProvider(); |
|
61 CleanupStack::PushL( self ); |
|
62 self->ConstructL( aFile ); |
|
63 CleanupStack::Pop( self ); |
|
64 return self; |
|
65 } |
|
66 |
|
67 // --------------------------------------------------------------------------- |
|
68 // From MAknIconFileProvider |
|
69 // |
|
70 // --------------------------------------------------------------------------- |
|
71 // |
|
72 void CSsIconFileProvider::RetrieveIconFileHandleL( |
|
73 RFile& aFile, const TIconFileType /*aType*/ ) |
|
74 { |
|
75 // duplicate the file's handle |
|
76 User::LeaveIfError( aFile.Duplicate( iFile ) ); |
|
77 } |
|
78 |
|
79 // --------------------------------------------------------------------------- |
|
80 // From MAknIconFileProvider |
|
81 // |
|
82 // --------------------------------------------------------------------------- |
|
83 // |
|
84 void CSsIconFileProvider::Finished() |
|
85 { |
|
86 delete this; |
|
87 } |
|
88 |
|
89 // End of File |