1 /* |
|
2 * Copyright (c) 2007 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: Registration information for a Location based Application. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_LCREGAPPINFO_H |
|
20 #define C_LCREGAPPINFO_H |
|
21 |
|
22 // SYSTEM INCLUDES |
|
23 #include <e32base.h> |
|
24 |
|
25 // USER INCLUDE |
|
26 #include "lcipcparams.h" |
|
27 |
|
28 // FORWARD DECLARATIONS |
|
29 |
|
30 /** |
|
31 * Location Centre registration info. |
|
32 * |
|
33 * This class along with base class CLcAppInfo stores all the |
|
34 * details of a registerd service with Location centre. |
|
35 * |
|
36 * @since S60 v5.0 |
|
37 */ |
|
38 |
|
39 class CLcRegAppInfo: public CLcAppInfo |
|
40 { |
|
41 public: |
|
42 /** |
|
43 * Constructs a new instance of Location centre registration object. |
|
44 * |
|
45 * @return The new instance of Location centre registration object. |
|
46 * @leave System wide error code if the object creation fails. |
|
47 */ |
|
48 static CLcRegAppInfo* NewL(); |
|
49 |
|
50 /** |
|
51 * C++ Destructor. |
|
52 * Frees all the resources associated with this Location Centre |
|
53 * server |
|
54 */ |
|
55 ~CLcRegAppInfo(); |
|
56 |
|
57 public: |
|
58 /** |
|
59 * This function returns the corresponding file name of a |
|
60 * registered service(application/document/web url) with full path name |
|
61 * |
|
62 * @since S60 v5.0 |
|
63 * @param None. |
|
64 * @return TFileName Returns the file name with full path. |
|
65 */ |
|
66 TFileName FileName(); |
|
67 |
|
68 /** |
|
69 * This function set the file name for registered |
|
70 * service(application/document/web url) with full path name |
|
71 * It leaves with KErrBadName if the filename length is greater then |
|
72 * 256 character. |
|
73 * |
|
74 * @since S60 v5.0 |
|
75 * @param[ in ] aFile Filename with full path. |
|
76 */ |
|
77 void SetFileNameL( const TDesC& aFile ); |
|
78 |
|
79 /** |
|
80 * This function says if the registered service |
|
81 * is present or absent at terminal |
|
82 * |
|
83 * @since S60 v5.0 |
|
84 * @param None. |
|
85 * @return TBool ETrue if present or EFalse. |
|
86 */ |
|
87 TBool IsAppPresent( ); |
|
88 |
|
89 /** |
|
90 * This function set's the service present or absent |
|
91 * status to true or false |
|
92 * |
|
93 * @since S60 v5.0 |
|
94 * @param[ in ] aPresenceStatus ETrue if present or EFalse |
|
95 */ |
|
96 void SetFilePresenceStatus( TBool aPresenceStatus ); |
|
97 |
|
98 /** |
|
99 * If the registered service present in removable media |
|
100 * then the current MMC id of the terminal is set through |
|
101 * this function for it. |
|
102 * |
|
103 * @since S60 v5.0 |
|
104 * @param[ in ] aUid Contains the MMC id |
|
105 */ |
|
106 void SetMmcId( TUint aUid ); |
|
107 |
|
108 /** |
|
109 * Return Mmc id associated with a registered service |
|
110 * |
|
111 * @since S60 v5.0 |
|
112 * @param None |
|
113 * @return TUint Mmc id set for this appinfo |
|
114 */ |
|
115 TUint MmcId(); |
|
116 |
|
117 /** |
|
118 * This function stores all the language specific id provided through |
|
119 * the registration file for a service in a array. |
|
120 * |
|
121 * @since S60 v5.0 |
|
122 * @param[ in ] aNameLang contains the language code |
|
123 * @return Return KErrNotFound if the Id is not valid one. |
|
124 */ |
|
125 TInt SetNameLanguage( const TDesC& aNameLang ); |
|
126 |
|
127 /** |
|
128 * This function stores all the language specific name |
|
129 * provided through the registration file for a service |
|
130 * in a RpointerArray. |
|
131 * |
|
132 * @since S60 v5.0 |
|
133 * @param[ in ] aName Contains the language |
|
134 * name |
|
135 */ |
|
136 void SetAppNameL( const TDesC& aName ); |
|
137 |
|
138 /** |
|
139 * This function check the current language code |
|
140 * with present language code with this registered service |
|
141 * and set the name accordingly. |
|
142 * |
|
143 * @since S60 v5.0 |
|
144 * @param aFs Contains the file server session reference |
|
145 */ |
|
146 void SetAppLangSpecificNameL( RFs& aFs ); |
|
147 |
|
148 /** |
|
149 * Stores the index order of the app info |
|
150 * |
|
151 * @since S60 v5.0 |
|
152 * @param [ in ] aIndex |
|
153 */ |
|
154 void SetArrayIndex( TInt aIndex ); |
|
155 |
|
156 /** |
|
157 * |
|
158 * @since S60 v5.0 |
|
159 * @param None. |
|
160 * @return Order index of the app info |
|
161 */ |
|
162 TInt Index(); |
|
163 |
|
164 /** |
|
165 * This function checks the count of the app name array |
|
166 * and return ETrue if count is greater than zero or EFalse |
|
167 * |
|
168 * @since S60 v5.0 |
|
169 * @param None. |
|
170 * @return Etrue if the count of language name |
|
171 * array count is greater than zero or EFalse |
|
172 */ |
|
173 TBool IsAppNamePresent(); |
|
174 |
|
175 private: |
|
176 /** |
|
177 * C++ Default constructor |
|
178 */ |
|
179 CLcRegAppInfo(); |
|
180 |
|
181 private: |
|
182 // stores the file name for a reg app info |
|
183 TFileName iFileName; |
|
184 |
|
185 // stores the registered service presence status |
|
186 TBool iFilePresenceStatus; |
|
187 |
|
188 // stores the MMC id of a lc reg app info |
|
189 TUint iMmcId; |
|
190 |
|
191 // contains all the different language specific name |
|
192 RPointerArray<HBufC> iAppNameArray; |
|
193 |
|
194 // contains all the different language id for a registered file |
|
195 RArray<TUint32> iAppLangArray; |
|
196 |
|
197 // sets the order index of app info |
|
198 TInt iIndex; |
|
199 }; |
|
200 |
|
201 #endif // C_LCREGAPPINFO_H |
|