|
1 /* |
|
2 * Copyright (c) 2002 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: inline implementation of class CCookie |
|
15 * |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 // --------------------------------------------------------- |
|
21 // CCookie::FromCookie2 |
|
22 // --------------------------------------------------------- |
|
23 // |
|
24 inline TBool CCookie::FromCookie2() const |
|
25 { |
|
26 return iSetCookie2; |
|
27 } |
|
28 |
|
29 // --------------------------------------------------------- |
|
30 // CCookie::FromNetscapeVersion |
|
31 // --------------------------------------------------------- |
|
32 // |
|
33 inline TBool CCookie::FromNetscapeVersion() const |
|
34 { |
|
35 return iNetscape; |
|
36 } |
|
37 |
|
38 // --------------------------------------------------------- |
|
39 // CCookie::SetCookie2 |
|
40 // --------------------------------------------------------- |
|
41 // |
|
42 inline void CCookie::SetCookie2( TBool aFromCookie2 ) |
|
43 { |
|
44 iSetCookie2 = aFromCookie2; |
|
45 } |
|
46 |
|
47 |
|
48 // --------------------------------------------------------- |
|
49 // CCookie::SetFromNetscape |
|
50 // --------------------------------------------------------- |
|
51 // |
|
52 inline void CCookie::SetFromNetscape( TBool aFromNetscape ) |
|
53 { |
|
54 iNetscape = aFromNetscape; |
|
55 } |
|
56 |
|
57 |
|
58 // --------------------------------------------------------- |
|
59 // CCookie::Size |
|
60 // --------------------------------------------------------- |
|
61 // |
|
62 inline TInt CCookie::Size( TBool aSuppressDefaulted ) const |
|
63 { |
|
64 TInt size = KCookieMaxAttributeCount * |
|
65 ( KCookieAttributePrefixLength + |
|
66 KCookieAttributeDefaultedLength + |
|
67 KCookieAttributeFoundLength ) |
|
68 + sizeof( TInt ); |
|
69 |
|
70 for ( TInt i = 0; i < iAttributes.Count(); i++ ) |
|
71 { |
|
72 if ( !( iAttributes[i].Defaulted() && aSuppressDefaulted ) ) |
|
73 { |
|
74 size += iAttributes[i].Size(); |
|
75 } |
|
76 } |
|
77 |
|
78 return size; |
|
79 } |