1.1 --- a/epoc32/include/sipheaderbase.h Tue Mar 16 16:12:26 2010 +0000
1.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
1.3 @@ -1,193 +0,0 @@
1.4 -/*
1.5 -* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
1.6 -* All rights reserved.
1.7 -* This component and the accompanying materials are made available
1.8 -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
1.9 -* which accompanies this distribution, and is available
1.10 -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.11 -*
1.12 -* Initial Contributors:
1.13 -* Nokia Corporation - initial contribution.
1.14 -*
1.15 -* Contributors:
1.16 -*
1.17 -* Description:
1.18 -* Name : sipheaderbase.h
1.19 -* Part of : SIP Codec
1.20 -* Interface : SDK API, SIP Codec API
1.21 -* Version : SIP/4.0
1.22 -*
1.23 -*/
1.24 -
1.25 -
1.26 -
1.27 -
1.28 -#ifndef CSIPHEADERBASE_H
1.29 -#define CSIPHEADERBASE_H
1.30 -
1.31 -// INCLUDES
1.32 -#include <e32base.h>
1.33 -#include <s32mem.h>
1.34 -#include <stringpool.h>
1.35 -#include "_sipcodecdefs.h"
1.36 -
1.37 -// CLASS DECLARATION
1.38 -/**
1.39 -* @publishedAll
1.40 -* @released
1.41 -*
1.42 -* Class provides a generic interface for all the SIP headers.
1.43 -*
1.44 -* @lib sipcodec.lib
1.45 -*/
1.46 -class CSIPHeaderBase : public CBase
1.47 - {
1.48 - public: // Constructors and destructors
1.49 -
1.50 - /**
1.51 - * Destructor, deletes the resources of CSIPHeaderBase.
1.52 - */
1.53 - IMPORT_C virtual ~CSIPHeaderBase();
1.54 -
1.55 -
1.56 - public: // New functions
1.57 -
1.58 - /**
1.59 - * Creates a deep-copy of this CSIPHeaderBase object.
1.60 - * The function has to be implemented in each of the sub-classes.
1.61 - * @return the deep-copied object, the ownership is transferred.
1.62 - */
1.63 - IMPORT_C virtual CSIPHeaderBase* CloneL() const = 0;
1.64 -
1.65 - /**
1.66 - * Gets the full name of the header
1.67 - * The function is implemented in each of the sub-classes.
1.68 - * @return the full name of the header for example "From"
1.69 - */
1.70 - IMPORT_C virtual RStringF Name() const = 0;
1.71 -
1.72 - /**
1.73 - * Encodes the header (name and value) into its textual representation.
1.74 - * @return a textual representation of the complete header,
1.75 - * the ownership is transferred
1.76 - */
1.77 - IMPORT_C HBufC8* ToTextL() const;
1.78 -
1.79 - /**
1.80 - * Encodes the header (name and value) into its textual representation
1.81 - * and pushes it to the CleanupStack.
1.82 - * @return a textual representation of the complete header,
1.83 - * the ownership is transferred
1.84 - */
1.85 - IMPORT_C HBufC8* ToTextLC() const;
1.86 -
1.87 - /**
1.88 - * Encodes the header's value into its textual representation.
1.89 - * @return a textual representation of the header's value,
1.90 - * the ownership is transferred
1.91 - */
1.92 - IMPORT_C virtual HBufC8* ToTextValueL() const = 0;
1.93 -
1.94 - /**
1.95 - * Encodes the header's value into its textual representation
1.96 - * and pushes it to the CleanupStack.
1.97 - * @return a textual representation of the header's value,
1.98 - * the ownership is transferred
1.99 - */
1.100 - IMPORT_C HBufC8* ToTextValueLC() const;
1.101 -
1.102 - /**
1.103 - * Writes the object to a RWriteStream
1.104 - * @param aWriteStream a stream where the object is to be externalized
1.105 - * @param aAddName if ETrue the name of the header is
1.106 - * also written to the stream
1.107 - */
1.108 - IMPORT_C void ExternalizeL(RWriteStream& aWriteStream,
1.109 - TBool aAddName=ETrue) const;
1.110 -
1.111 - /**
1.112 - * Checks, if the header supports serialization.
1.113 - * In practice all the headers part of the API support it.
1.114 - * @return ETrue, if the header supports serialization,
1.115 - * otherwise EFalse
1.116 - */
1.117 - IMPORT_C virtual TBool ExternalizeSupported() const;
1.118 -
1.119 - /**
1.120 - * Can be used when a RPointerArray<CSIPHeaderBase> needs to be pushed
1.121 - * to the CleanupStack for ResetAndDestroy.
1.122 - * @param aArray an array of CSIPHeaderBase pointers,
1.123 - * the ownership of the array is transferred
1.124 - */
1.125 - IMPORT_C static void PushLC(RPointerArray<CSIPHeaderBase>* aArray);
1.126 -
1.127 -
1.128 - public: // For internal use
1.129 -
1.130 - /**
1.131 - * @internalComponent
1.132 - */
1.133 - enum TPreferredPlace
1.134 - {
1.135 - ETop,
1.136 - EMiddleTop,
1.137 - EMiddle,
1.138 - EMiddleBottom,
1.139 - EBottom
1.140 - };
1.141 -
1.142 - /**
1.143 - * @internalComponent
1.144 - */
1.145 - TSglQueLink iLink;
1.146 -
1.147 - /**
1.148 - * @internalComponent
1.149 - */
1.150 - virtual TBool EncodeMultipleToOneLine() const;
1.151 -
1.152 - /**
1.153 - * @internalComponent
1.154 - */
1.155 - virtual TBool MoreThanOneAllowed() const;
1.156 -
1.157 - /**
1.158 - * @internalComponent
1.159 - */
1.160 - virtual TBool IsExtensionHeader() const;
1.161 -
1.162 - /**
1.163 - * @internalComponent
1.164 - */
1.165 - virtual TBool HasCompactName() const;
1.166 -
1.167 - /**
1.168 - * @internalComponent
1.169 - */
1.170 - virtual RStringF CompactName() const;
1.171 -
1.172 - /**
1.173 - * @internalComponent
1.174 - */
1.175 - virtual TPreferredPlace PreferredPlaceInMessage() const = 0;
1.176 -
1.177 - protected: // Constructors
1.178 -
1.179 - CSIPHeaderBase();
1.180 -
1.181 - protected: // New functions
1.182 -
1.183 - void ExternalizeNameL(RWriteStream& aWriteStream) const;
1.184 -
1.185 - /**
1.186 - * @internalComponent
1.187 - */
1.188 - virtual void ExternalizeValueL(RWriteStream& aWriteStream) const;
1.189 -
1.190 - // Needed for cleanup of a RPointerArray<CSIPHeaderBase>:
1.191 - static void ResetAndDestroy(TAny* anArray);
1.192 - };
1.193 -
1.194 -#endif // CSIPHEADERBASE_H
1.195 -
1.196 -// End of File