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