|
1 /* |
|
2 * Copyright (c) 2008 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: The API supports item information that is not supported by |
|
15 * the MCS server itself |
|
16 * |
|
17 */ |
|
18 |
|
19 #ifndef CMENUSRVAPPATTRIBUTES_H_ |
|
20 #define CMENUSRVAPPATTRIBUTES_H_ |
|
21 |
|
22 #include <e32base.h> |
|
23 #include "menuengobject.h" |
|
24 |
|
25 |
|
26 NONSHARABLE_CLASS( CMenuSrvAppAttributes ) : public CBase |
|
27 { |
|
28 |
|
29 public: |
|
30 |
|
31 /** |
|
32 * Two-phased constructor. |
|
33 * @param aCapability application capability buffer. |
|
34 * @param aAppInfo apparc application info. |
|
35 */ |
|
36 static CMenuSrvAppAttributes* NewL( TApaAppCapabilityBuf& aCapability, |
|
37 TApaAppInfo& aAppInfo ); |
|
38 |
|
39 /** |
|
40 * Two-phased constructor. |
|
41 * @param aCapability application capability buffer. |
|
42 * @param aAppInfo apparc application info. |
|
43 */ |
|
44 static CMenuSrvAppAttributes* NewLC( TApaAppCapabilityBuf& aCapability, |
|
45 TApaAppInfo& aAppInfo ); |
|
46 |
|
47 /** |
|
48 * Destructor. |
|
49 */ |
|
50 ~CMenuSrvAppAttributes(); |
|
51 |
|
52 /** |
|
53 * Gets application uid. |
|
54 * @return application uid. |
|
55 */ |
|
56 TUid GetUid() const; |
|
57 |
|
58 /** |
|
59 * Gets hidden attribute of application. |
|
60 * @return ETrue if application is hidden. |
|
61 */ |
|
62 TBool IsHidden() const; |
|
63 |
|
64 /** |
|
65 * Sets hidden attribute of application. |
|
66 * @param application hidden attribute. |
|
67 */ |
|
68 void SetHidden( TBool aAppIsHidden ); |
|
69 |
|
70 /** |
|
71 * Sets application type. |
|
72 * @param application type. |
|
73 */ |
|
74 void SetAppType( CMenuEngObject::TAppType aAppType ); |
|
75 |
|
76 /** |
|
77 * Gets application type. |
|
78 * @return application type. |
|
79 */ |
|
80 CMenuEngObject::TAppType GetAppType() const; |
|
81 |
|
82 /** |
|
83 * Gets application group name. |
|
84 * @return application group name. |
|
85 */ |
|
86 const TPtrC GetGroupName() const; |
|
87 |
|
88 /** |
|
89 * Gets application full name. |
|
90 * @return application full name. |
|
91 */ |
|
92 const TPtrC GetFullName() const; |
|
93 |
|
94 /** |
|
95 * Gets application caption. |
|
96 * @return application caption. |
|
97 */ |
|
98 const TPtrC GetCaption() const; |
|
99 |
|
100 /** |
|
101 * Gets application short caption. |
|
102 * @return application short caption. |
|
103 */ |
|
104 const TPtrC GetShortCaption() const; |
|
105 |
|
106 /** |
|
107 * Match items function used for finding in array. |
|
108 * @return ETrue if items match. |
|
109 */ |
|
110 static TBool MatchItems(const CMenuSrvAppAttributes& aItem1, |
|
111 const CMenuSrvAppAttributes& aItem2); |
|
112 |
|
113 private: |
|
114 |
|
115 /** |
|
116 * Second phased constructor. |
|
117 * @param aCapability application capability buffer. |
|
118 * @param aAppInfo apparc application info. |
|
119 */ |
|
120 void ConstructL( TApaAppCapabilityBuf& aCapability, |
|
121 TApaAppInfo& aAppInfo ); |
|
122 |
|
123 /** |
|
124 * Constructor. |
|
125 */ |
|
126 CMenuSrvAppAttributes(); |
|
127 |
|
128 private: // data |
|
129 |
|
130 RBuf iGroupName; // Series 60 extension to allow apps |
|
131 //to be categorized according a logical group name, e.g. 'games' |
|
132 |
|
133 /** The full path name of the application DLL. */ |
|
134 RBuf iFullName; |
|
135 |
|
136 /** The caption for the application. */ |
|
137 RBuf iCaption; |
|
138 |
|
139 /** The short caption for the application. */ |
|
140 RBuf iShortCaption; |
|
141 |
|
142 /** The application specific UID. */ |
|
143 TUid iUid; |
|
144 |
|
145 /** The application type see TAppType. */ |
|
146 CMenuEngObject::TAppType iAppType; |
|
147 |
|
148 TBool iAppIsHidden; // not shown in the Shell etc. |
|
149 }; |
|
150 |
|
151 #endif /* CMENUSRVAPPATTRIBUTES_H_ */ |