|
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: CSifUiAppInfo for application details |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef C_SIFUIAPPINFO_H |
|
19 #define C_SIFUIAPPINFO_H |
|
20 |
|
21 #include <e32base.h> // CBase |
|
22 |
|
23 class RWriteStream; |
|
24 class CApaMaskedBitmap; |
|
25 |
|
26 |
|
27 /** |
|
28 * CSifUiAppInfo transfers application details from a SIF plugin |
|
29 * to UI process in device dialog server. See also Swi::CAppInfo. |
|
30 * |
|
31 * @lib sifui.lib |
|
32 * @since 10.1 |
|
33 */ |
|
34 class CSifUiAppInfo : public CBase |
|
35 { |
|
36 public: // constructors and destructor |
|
37 /** |
|
38 * Creates new CSifUiAppInfo object and pushes it to cleanup stack. |
|
39 * Does not take the ownership of aAppIcon parameter. |
|
40 * @param aAppName - application name |
|
41 * @param aAppVendor - vendor name |
|
42 * @param aAppVersion - application version |
|
43 * @param aAppSize - application size in bytes |
|
44 * @param aAppIcon - application icon (or NULL if no icon) |
|
45 * @returns CSifUiAppInfo* -- new CSifUiAppInfo object |
|
46 */ |
|
47 IMPORT_C static CSifUiAppInfo* NewLC( const TDesC& aAppName, |
|
48 const TDesC& aAppVendor, const TVersion& aAppVersion, TInt aAppSize, |
|
49 const CApaMaskedBitmap* aAppIcon ); |
|
50 |
|
51 /** |
|
52 * Creates new CSifUiAppInfo object. |
|
53 * Does not take the ownership of aAppIcon parameter. |
|
54 * @param aAppName - application name |
|
55 * @param aAppVendor - vendor name |
|
56 * @param aAppVersion - application version |
|
57 * @param aAppSize - application size in bytes |
|
58 * @param aAppIcon - application icon (or NULL if no icon) |
|
59 * @returns CSifUiAppInfo* -- new CSifUiAppInfo object |
|
60 */ |
|
61 IMPORT_C static CSifUiAppInfo* NewL( const TDesC& aAppName, |
|
62 const TDesC& aAppVendor, const TVersion& aAppVersion, TInt aAppSize, |
|
63 const CApaMaskedBitmap* aAppIcon ); |
|
64 |
|
65 /** |
|
66 * Creates new CSifUiAppInfo object by copying existing object. |
|
67 * @param aAppInfo - application info to copy |
|
68 * @returns CSifUiAppInfo* -- new CSifUiAppInfo object |
|
69 */ |
|
70 IMPORT_C static CSifUiAppInfo* NewL( const CSifUiAppInfo& aAppInfo ); |
|
71 |
|
72 /** |
|
73 * Destructor. |
|
74 */ |
|
75 ~CSifUiAppInfo(); |
|
76 |
|
77 public: // new functions |
|
78 |
|
79 /** |
|
80 * Application name. |
|
81 * @returns TDesC - application name |
|
82 */ |
|
83 IMPORT_C const TDesC& Name() const; |
|
84 |
|
85 /** |
|
86 * Application vendor. |
|
87 * @returns TDesC - vendor name |
|
88 */ |
|
89 IMPORT_C const TDesC& Vendor() const; |
|
90 |
|
91 /** |
|
92 * Application version. |
|
93 * @returns TVersion - application version |
|
94 */ |
|
95 IMPORT_C const TVersion& Version() const; |
|
96 |
|
97 /** |
|
98 * Application size. |
|
99 * @returns TInt - application size |
|
100 */ |
|
101 IMPORT_C TInt Size() const; |
|
102 |
|
103 /** |
|
104 * Application icon and mask bitmaps. Does not transfer ownership. |
|
105 * @returns CApaMaskedBitmap - icon and mask bitmaps, NULL if no bitmaps |
|
106 */ |
|
107 IMPORT_C const CApaMaskedBitmap* Bitmaps() const; |
|
108 |
|
109 /** |
|
110 * Externalizes this object to the specified write stream. |
|
111 * @param aStream Stream to which the contents is written. |
|
112 */ |
|
113 IMPORT_C void ExternalizeL( RWriteStream& aStream ) const; |
|
114 |
|
115 private: // new functions |
|
116 CSifUiAppInfo(); |
|
117 void ConstructL( const TDesC& aAppName, const TDesC& aAppVendor, |
|
118 const TVersion& aAppVersion, TInt aAppSize, |
|
119 const CApaMaskedBitmap* aAppIcon ); |
|
120 void ConstructL( const CSifUiAppInfo& aAppInfo ); |
|
121 |
|
122 private: // data |
|
123 HBufC* iAppName; |
|
124 HBufC* iAppVendor; |
|
125 TVersion iAppVersion; |
|
126 TInt iAppSize; |
|
127 CApaMaskedBitmap* iAppIcon; |
|
128 }; |
|
129 |
|
130 #endif // C_SIFUIAPPINFO_H |
|
131 |