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: Location Centre Server object. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_LCREGAPPORDER_H |
|
20 #define C_LCREGAPPORDER_H |
|
21 |
|
22 |
|
23 // SYSTEM INCLUDES |
|
24 #include <e32base.h> |
|
25 #include <centralrepository.h> |
|
26 #include <s32strm.h> |
|
27 |
|
28 // USER INCLUDDE |
|
29 #include "lcipcparams.h" |
|
30 |
|
31 // FORWARD DECLARATIONS |
|
32 class CLcRegAppStore; |
|
33 |
|
34 //DATA TYPE |
|
35 |
|
36 /** |
|
37 * Location Centre registered application content/service display order. |
|
38 * |
|
39 * This class is inherited from CBase. Extracts the registration |
|
40 * order from the central repository key |
|
41 * and externalize/internalize of those from/to TDesC key value. |
|
42 * |
|
43 * @since S60 v5.0 |
|
44 */ |
|
45 NONSHARABLE_CLASS( CLcRegAppOrder ) : public CBase |
|
46 { |
|
47 public: |
|
48 /** |
|
49 * Constructs a new instance of CLcRegAppOrder. |
|
50 * |
|
51 * @return The new instance of CLcRegAppOrder object. |
|
52 * @leave System wide error code if the object creation fails. |
|
53 */ |
|
54 static CLcRegAppOrder* NewL( CLcRegAppStore& aLcRegAppStore); |
|
55 |
|
56 /** |
|
57 * C++ Destructor. |
|
58 * Frees all the resources associated with this Location Centre |
|
59 * server registry handler |
|
60 */ |
|
61 ~CLcRegAppOrder(); |
|
62 |
|
63 public: |
|
64 /** |
|
65 * Extracts the application registered order according to place |
|
66 * like top,middle,and bottom in the list from central repository key |
|
67 * buffer output. |
|
68 * |
|
69 * @since S60 v5.0 |
|
70 * @param [in]aUuid UUID of the registered app/service |
|
71 * @param [out]aRowPos returns the position of app/service |
|
72 * |
|
73 * @return TInt If successfull the return KErrNone. |
|
74 */ |
|
75 TInt GetRegisteredAppOrder( const TDesC& aUuid, |
|
76 TInt& aRowPos); |
|
77 |
|
78 /** |
|
79 * Remove the deregistered application from the array |
|
80 * depends upon the UUID's sent through the function. |
|
81 * |
|
82 * @since S60 v5.0 |
|
83 * @param aUuid UUID of the registered app/service |
|
84 * |
|
85 * @return TInt If successfull the return KErrNone. |
|
86 */ |
|
87 void RemoveArrayL(const TDesC& aUuid); |
|
88 |
|
89 /** |
|
90 * Append the registered application to the array |
|
91 * depends upon the UUID's sent through the function. |
|
92 * |
|
93 * @since S60 v5.0 |
|
94 * @param aUuid UUID of the registered app/service |
|
95 * |
|
96 * @return TInt Index. |
|
97 */ |
|
98 TInt AppendArrayL(const TDesC& aUuid); |
|
99 |
|
100 private: // new private method |
|
101 /** |
|
102 * |
|
103 * |
|
104 * @since S60 v5.0 |
|
105 * @param aArray[ out ] |
|
106 * @param aArray[ in ] |
|
107 * |
|
108 */ |
|
109 void ParseCenRepKeyL( RPointerArray< HBufC >& aArray, |
|
110 const TDesC& aKey ); |
|
111 |
|
112 /** |
|
113 * |
|
114 * @since S60 v5.0 |
|
115 * @param aBuffer |
|
116 * |
|
117 * @return TUint32 |
|
118 */ |
|
119 TUint32 ParseInteger( const TDesC& aBuffer ); |
|
120 |
|
121 private: |
|
122 /** |
|
123 * C++ Default constructor |
|
124 */ |
|
125 CLcRegAppOrder( CLcRegAppStore& aLcRegAppStore ); |
|
126 |
|
127 /** |
|
128 * Second phase of the two phase constructor |
|
129 */ |
|
130 void ConstructL(); |
|
131 |
|
132 private: //data member |
|
133 //own: Central repository instance. |
|
134 CRepository* iRepository; |
|
135 |
|
136 //own: array of top portion's UUID's |
|
137 RPointerArray< HBufC > iTopArray; |
|
138 |
|
139 //own: array of bottom portion's UUID's |
|
140 RPointerArray< HBufC > iBottomArray; |
|
141 |
|
142 // array of middle portion's UUID's |
|
143 RLcIpcAppIdArray iMiddleArray; |
|
144 |
|
145 //reference to appstore object comming through lc registry |
|
146 CLcRegAppStore* iLcRegAppStore; |
|
147 }; |
|
148 |
|
149 #endif // C_LCREGAPPORDER_H |
|
150 |
|