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 declaration
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
#ifndef __UPNPTERMINALMODEICON_H__
|
|
19 |
#define __UPNPTERMINALMODEICON_H__
|
|
20 |
|
|
21 |
#include <e32base.h>
|
|
22 |
|
|
23 |
// CLASS DECLARATION
|
|
24 |
/**
|
|
25 |
* This class encapsulates an icon used in any operation of the
|
|
26 |
* Terminal Mode Service implemented.
|
|
27 |
* This represents device and application icons (as provided by Automotive Server).
|
|
28 |
*/
|
|
29 |
class CUpnpTerminalModeIcon : public CBase
|
|
30 |
{
|
|
31 |
public:
|
|
32 |
/**
|
|
33 |
* Standard Symbian Two-Phase constructor. Returns a pointer to the new element.
|
|
34 |
* @param aPath icon path
|
|
35 |
* @param aWidth icon width
|
|
36 |
* @param aHeight icon height
|
|
37 |
* @param aDepth icon depth
|
|
38 |
* @param aMimeType icon mime type
|
|
39 |
*/
|
|
40 |
IMPORT_C static CUpnpTerminalModeIcon* NewL(const TDesC16& aPath, const TInt aWidth,
|
|
41 |
const TInt aHeight,const TInt aDepth, const TDesC8& aMimeType );
|
|
42 |
/**
|
|
43 |
* Destructor.
|
|
44 |
*/
|
|
45 |
~CUpnpTerminalModeIcon();
|
|
46 |
|
|
47 |
public:
|
|
48 |
/**
|
|
49 |
* Returns the icon filename
|
|
50 |
* @return Returns the icon filename along with complete filepath.
|
|
51 |
*/
|
|
52 |
inline const TDesC& IconFilename()const;
|
|
53 |
|
|
54 |
/**
|
|
55 |
* Returns the width of the icon.
|
|
56 |
* @return Returns width in pixels or KErrNotFound
|
|
57 |
*/
|
|
58 |
inline TInt Width()const;
|
|
59 |
|
|
60 |
/**
|
|
61 |
* Returns the height of the icon.
|
|
62 |
* @return Returns height in pixels or KErrNotFound
|
|
63 |
*/
|
|
64 |
inline TInt Height()const;
|
|
65 |
|
|
66 |
/**
|
|
67 |
* Returns the color depth of the icon.
|
|
68 |
* @return Returns icon depth or KErrNotFound
|
|
69 |
*/
|
|
70 |
inline TInt Depth()const;
|
|
71 |
|
|
72 |
/**
|
|
73 |
* Returns the mime type.
|
|
74 |
* @return Returns Icon mime type
|
|
75 |
*/
|
|
76 |
inline const TDesC8& MimeType()const;
|
|
77 |
|
|
78 |
private:
|
|
79 |
/**
|
|
80 |
* C++ default constructor.
|
|
81 |
* @param aWidth icon width
|
|
82 |
* @param aHeight icon height
|
|
83 |
* @param aDepth icon depth
|
|
84 |
*/
|
|
85 |
CUpnpTerminalModeIcon( const TInt aWidth,const TInt aHeight,const TInt aDepth );
|
|
86 |
/**
|
|
87 |
* 2nd phase constructor
|
|
88 |
* @param aPath icon path
|
|
89 |
* @param aMimeType icon mime type
|
|
90 |
*/
|
|
91 |
void ConstructL( const TDesC16& aPath,const TDesC8& aMimeType );
|
|
92 |
|
|
93 |
private:
|
|
94 |
HBufC* iFilename;
|
|
95 |
TInt iIconWidth;
|
|
96 |
TInt iIconHeight;
|
|
97 |
TInt iIconDepth;
|
|
98 |
HBufC8* iIconMimeType;
|
|
99 |
};
|
|
100 |
|
|
101 |
#include <upnpterminalmodeicon.inl>
|
|
102 |
|
|
103 |
#endif //__UPNPTERMINALMODEICON_H__
|
|
104 |
|
|
105 |
// End of File
|