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: CUpnpTmIconMapping class declaration.
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
#ifndef __UPNPTMICONMAPPING_H__
|
|
19 |
#define __UPNPTMICONMAPPING_H__
|
|
20 |
|
|
21 |
// Include Files
|
|
22 |
#include <e32base.h>
|
|
23 |
#include <badesca.h>
|
|
24 |
#include "upnptmclienticonpref.h"
|
|
25 |
|
|
26 |
// Constants
|
|
27 |
const TInt KExpectedMaxIconParms = 20;
|
|
28 |
|
|
29 |
/**
|
|
30 |
* Class maintains a mapping between application icon filepath and its URL. It also
|
|
31 |
* determines whether the conversion is needed for a particular requested
|
|
32 |
* application icon( http request ) and finalizes the dimensions of the icon which needs
|
|
33 |
* to be served
|
|
34 |
*/
|
|
35 |
class CUpnpTmIconMapping : public CBase
|
|
36 |
{
|
|
37 |
public:
|
|
38 |
static CUpnpTmIconMapping* NewL( );
|
|
39 |
~CUpnpTmIconMapping();
|
|
40 |
|
|
41 |
public:
|
|
42 |
void AddIconFileInfoL( const TDesC8& aUrl, const TDesC& aPath, TInt aWidth, TInt aHeight );
|
|
43 |
TInt GetSvgIconPath( const TDesC8& aUrl,RBuf& aSvgFilePath );
|
|
44 |
TBool IsConversionNeeded( TInt aIndex, const CUpnpTmClientIconPref& aClientIconPref,
|
|
45 |
TInt& aIconWidth, TInt& aIconHeight );
|
|
46 |
|
|
47 |
private:
|
|
48 |
CUpnpTmIconMapping();
|
|
49 |
void ConstructL();
|
|
50 |
|
|
51 |
private:
|
|
52 |
CDesC8Array* iFileUrlArray;
|
|
53 |
CDesCArray* iFilePathArray;
|
|
54 |
RArray<TInt> iWidthArray;
|
|
55 |
RArray<TInt> iHeightArray;
|
|
56 |
};
|
|
57 |
|
|
58 |
#endif // __UPNPTMICONMAPPING_H__
|