24
|
1 |
/**
|
|
2 |
* Copyright (c) 2010 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: CUpnpTerminalModeIcon class implementation.
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
// INCLUDE FILES
|
|
19 |
#include "upnpterminalmodeicon.h"
|
|
20 |
#include "OstTraceDefinitions.h"
|
|
21 |
#ifdef OST_TRACE_COMPILER_IN_USE
|
|
22 |
#include "upnpterminalmodeiconTraces.h"
|
|
23 |
#endif
|
|
24 |
|
|
25 |
// ============================ MEMBER FUNCTIONS ===================================
|
|
26 |
|
|
27 |
// ---------------------------------------------------------------------------------
|
|
28 |
// CUpnpTerminalModeIcon::NewL
|
|
29 |
// Two-phased constructor.
|
|
30 |
// @param aPath icon path
|
|
31 |
// @param aWidth icon width
|
|
32 |
// @param aHeight icon height
|
|
33 |
// @param aDepth icon depth
|
|
34 |
// @param aMimeType icon mime type
|
|
35 |
// ---------------------------------------------------------------------------------
|
|
36 |
//
|
|
37 |
EXPORT_C CUpnpTerminalModeIcon* CUpnpTerminalModeIcon::NewL( const TDesC16& aPath, const TInt aWidth,
|
|
38 |
const TInt aHeight, const TInt aDepth, const TDesC8& aMimeType )
|
|
39 |
{
|
|
40 |
OstTraceFunctionEntry0( CUPNPTERMINALMODEICON_NEWL_ENTRY );
|
|
41 |
CUpnpTerminalModeIcon* self = new (ELeave) CUpnpTerminalModeIcon( aWidth,aHeight,aDepth );
|
|
42 |
CleanupStack::PushL( self );
|
|
43 |
self->ConstructL( aPath,aMimeType );
|
|
44 |
CleanupStack::Pop( self );
|
|
45 |
OstTraceFunctionExit0( CUPNPTERMINALMODEICON_NEWL_EXIT );
|
|
46 |
return self;
|
|
47 |
}
|
|
48 |
|
|
49 |
// ---------------------------------------------------------------------------------
|
|
50 |
// CUpnpTerminalModeIcon::CUpnpTerminalModeIcon
|
|
51 |
// C++ default constructor can NOT contain any code, that
|
|
52 |
// might leave.
|
|
53 |
// @param aWidth icon width
|
|
54 |
// @param aHeight icon height
|
|
55 |
// @param aDepth icon depth
|
|
56 |
// ---------------------------------------------------------------------------------
|
|
57 |
//
|
|
58 |
CUpnpTerminalModeIcon::CUpnpTerminalModeIcon( const TInt aWidth,const TInt aHeight,
|
|
59 |
const TInt aDepth ):iIconWidth(aWidth),iIconHeight(aHeight),iIconDepth(aDepth)
|
|
60 |
{
|
|
61 |
|
|
62 |
}
|
|
63 |
|
|
64 |
// -------------------------------------------------------------------------------------
|
|
65 |
// CUpnpTerminalModeIcon::ConstructL
|
|
66 |
// Symbian 2nd phase constructor can leave.
|
|
67 |
// @param aPath icon path
|
|
68 |
// @param aMimeType icon mime type
|
|
69 |
// ---------------------------------------------------------------------------------
|
|
70 |
//
|
|
71 |
void CUpnpTerminalModeIcon::ConstructL( const TDesC16& aPath,const TDesC8& aMimeType )
|
|
72 |
{
|
|
73 |
OstTraceFunctionEntry0( CUPNPTERMINALMODEICON_CONSTRUCTL_ENTRY );
|
|
74 |
iFilename = aPath.AllocL();
|
|
75 |
iIconMimeType = aMimeType.AllocL();
|
|
76 |
OstTraceFunctionExit0( CUPNPTERMINALMODEICON_CONSTRUCTL_EXIT );
|
|
77 |
}
|
|
78 |
|
|
79 |
// ---------------------------------------------------------------------------------
|
|
80 |
// CUpnpTerminalModeIcon::~CUpnpTerminalModeIcon
|
|
81 |
// Destructor
|
|
82 |
// ---------------------------------------------------------------------------------
|
|
83 |
//
|
|
84 |
CUpnpTerminalModeIcon::~CUpnpTerminalModeIcon()
|
|
85 |
{
|
|
86 |
OstTraceFunctionEntry0( CUPNPTERMINALMODEICON_CUPNPTERMINALMODEICON_ENTRY );
|
|
87 |
delete iFilename;
|
|
88 |
delete iIconMimeType;
|
|
89 |
OstTraceFunctionExit0( CUPNPTERMINALMODEICON_CUPNPTERMINALMODEICON_EXIT );
|
|
90 |
}
|
|
91 |
|
|
92 |
// End of File
|