netprotocols_plat/cookie_manager_api/inc/cookie.inl
changeset 0 b16258d2340f
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/netprotocols_plat/cookie_manager_api/inc/cookie.inl	Tue Feb 02 01:09:52 2010 +0200
@@ -0,0 +1,79 @@
+/*
+* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  inline implementation of class CCookie
+*               
+*
+*/
+
+
+// ---------------------------------------------------------
+// CCookie::FromCookie2
+// ---------------------------------------------------------
+//
+inline TBool CCookie::FromCookie2() const
+	{
+	return iSetCookie2;
+	}
+
+// ---------------------------------------------------------
+// CCookie::FromNetscapeVersion
+// ---------------------------------------------------------
+//
+inline TBool CCookie::FromNetscapeVersion() const
+    {
+    return iNetscape;
+    }
+
+// ---------------------------------------------------------
+// CCookie::SetCookie2
+// ---------------------------------------------------------
+//
+inline void CCookie::SetCookie2( TBool aFromCookie2 )
+	{
+	iSetCookie2 = aFromCookie2;
+	}
+
+
+// ---------------------------------------------------------
+// CCookie::SetFromNetscape
+// ---------------------------------------------------------
+//
+inline void CCookie::SetFromNetscape( TBool aFromNetscape )
+	{
+	iNetscape = aFromNetscape;
+	}
+
+
+// ---------------------------------------------------------
+// CCookie::Size
+// ---------------------------------------------------------
+//
+inline TInt CCookie::Size( TBool aSuppressDefaulted ) const
+	{
+	TInt size = KCookieMaxAttributeCount *
+				   ( KCookieAttributePrefixLength + 
+                     KCookieAttributeDefaultedLength + 
+                     KCookieAttributeFoundLength ) 
+                   + sizeof( TInt );
+
+	for ( TInt i = 0; i < iAttributes.Count(); i++ )
+		{
+		if ( !( iAttributes[i].Defaulted() && aSuppressDefaulted ) )
+			{
+			size += iAttributes[i].Size();
+			}
+		}
+
+	return size;
+	}
\ No newline at end of file