85 /**Sets the AppUidL |
87 /**Sets the AppUidL |
86 * @param aAppUid the application UID. |
88 * @param aAppUid the application UID. |
87 * @return Error code indicating the result of the call. |
89 * @return Error code indicating the result of the call. |
88 */ |
90 */ |
89 IMPORT_C TInt SetAppUidL(const TUint32& aAppUid ); |
91 IMPORT_C TInt SetAppUidL(const TUint32& aAppUid ); |
|
92 IMPORT_C void Close(); |
|
93 IMPORT_C TInt StoreCookie( const CCookie& aCookie, |
|
94 const TUriC8& aUri,TUint32& aAppUid); |
|
95 IMPORT_C void GetCookiesL( const TDesC8& aUri, |
|
96 RPointerArray<CCookie>& aCookies, |
|
97 TBool& aCookie2Reqd,TUint32& aAppUid ); |
|
98 IMPORT_C TInt ClearAllAppUidCookies(const TUint32& aAppUid); |
|
99 |
90 |
100 |
91 private : // internal methods |
101 private : // internal methods |
92 /** |
102 /** |
93 * Gets the sum of cookie sizes for a given request URI. After this |
103 * Gets the sum of cookie sizes for a given request URI. After this |
94 * method call there will be available the set of cookies on server-side |
104 * method call there will be available the set of cookies on server-side |
100 * communications. |
110 * communications. |
101 * @return Error code indicating the result of the call. |
111 * @return Error code indicating the result of the call. |
102 */ |
112 */ |
103 TInt DoGetCookieSize( const TDesC8& aRequestUri, |
113 TInt DoGetCookieSize( const TDesC8& aRequestUri, |
104 TPckg<TInt>& aPkgSize ) const; |
114 TPckg<TInt>& aPkgSize ) const; |
|
115 |
|
116 TInt DoGetCookieSize( const TDesC8& aRequestUri, |
|
117 TPckg<TInt>& aPkgSize,TDesC& aAppUidPtr ) const; |
105 |
118 |
106 /** |
119 /** |
107 * Puts those cookies in the buffer that have been previously selected |
120 * Puts those cookies in the buffer that have been previously selected |
108 * on server-side as a result of the GetCookieSize method. |
121 * on server-side as a result of the GetCookieSize method. |
109 * @param aBuffer Buffer to be filled with appropriate cookies. |
122 * @param aBuffer Buffer to be filled with appropriate cookies. |
113 |
126 |
114 /** |
127 /** |
115 * |
128 * |
116 */ |
129 */ |
117 TInt DoStoreCookie( const TDesC8& aPackedCookie, |
130 TInt DoStoreCookie( const TDesC8& aPackedCookie, |
118 const TDesC8& aUri ) const; |
131 const TDesC8& aUri,TDesC& aAppUidPtr ) const; |
119 |
132 |
120 /** |
133 /** |
121 * |
134 * |
122 */ |
135 */ |
123 TVersion Version() const; |
136 TVersion Version() const; |
|
137 |
|
138 TInt DestroyCookiesFromMemory( TInt& aDeleteStatus ); |
|
139 |
|
140 void StoreCookieAtClientSide( const CCookie* aCookie, const TDesC8& aUri,TUint32 aWidgetUid =0); |
|
141 |
|
142 TInt GetClientSideCookies( const TDesC8& aRequestUri,RPointerArray<CCookie>& aCookies |
|
143 ,TBool& aFound, TUint32 aWidgetUid ); |
|
144 TInt GetCookieSharableFlagFromServer(TBool& aCookieSharableFlag ) const; |
|
145 |
|
146 private : // data members |
|
147 //internal data structure for supporting Client side caching. |
|
148 class TCookieMgrInternalStruct |
|
149 { |
|
150 public: |
|
151 /* Constructor |
|
152 * |
|
153 */ |
|
154 TCookieMgrInternalStruct(RStringPool aStringPool) |
|
155 : iCookiePacker(aStringPool), |
|
156 iCookieClientDataArray(NULL) |
|
157 { |
|
158 } |
|
159 |
|
160 /* Destructor |
|
161 * |
|
162 */ |
|
163 ~TCookieMgrInternalStruct(); |
|
164 |
|
165 /* Get Cookiepacker instance |
|
166 * |
|
167 */ |
|
168 inline TCookiePacker& GetCookiePacker(){return iCookiePacker;} |
|
169 |
|
170 /* Get Client Data Array Instance |
|
171 * |
|
172 */ |
|
173 inline CCookieClientDataArray* GetCookieClientDataArray(){return iCookieClientDataArray;} |
|
174 |
|
175 /* Initialization method for Cookie Client Data Array |
|
176 * |
|
177 */ |
|
178 TInt Init(); |
|
179 |
|
180 private: |
|
181 TCookiePacker iCookiePacker; |
|
182 CCookieClientDataArray* iCookieClientDataArray; |
|
183 }; |
124 |
184 |
125 private : // data members |
185 RStringPool iStringPool; |
126 RStringPool iStringPool; |
186 TCookieMgrInternalStruct* iCookieMgrData; |
127 |
187 |
128 TCookiePacker iCookiePacker; |
|
129 }; |
188 }; |
130 |
189 |
131 #endif //__COOKIEMANAGER_CLIENT_H__ |
190 #endif //__COOKIEMANAGER_CLIENT_H__ |