1.1 --- a/epoc32/include/siptimestampheader.h Tue Mar 16 16:12:26 2010 +0000
1.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
1.3 @@ -1,159 +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 : siptimestampheader.h
1.19 -* Part of : SIP Codec
1.20 -* Version : SIP/4.0
1.21 -*
1.22 -*/
1.23 -
1.24 -
1.25 -
1.26 -
1.27 -#ifndef CSIPTIMESTAMPHEADER_H
1.28 -#define CSIPTIMESTAMPHEADER_H
1.29 -
1.30 -// INCLUDES
1.31 -#include "sipheaderbase.h"
1.32 -#include "_sipcodecdefs.h"
1.33 -
1.34 -// CLASS DECLARATION
1.35 -/**
1.36 -* @publishedAll
1.37 -* @released
1.38 -*
1.39 -* Class for a SIP Timestamp header.
1.40 -*
1.41 -* @lib sipcodec.lib
1.42 -*/
1.43 -class CSIPTimestampHeader : public CSIPHeaderBase
1.44 - {
1.45 - public: // Constructors and destructor
1.46 -
1.47 - /**
1.48 - * Constructs a CSIPTimestampHeader from textual representation
1.49 - * of the header's value part.
1.50 - * @param aValue a value part of a "Timestamp"-header (e.g. "12 3.4")
1.51 - * @returns a new instance of CSIPTimestampHeader
1.52 - */
1.53 - IMPORT_C static CSIPTimestampHeader* DecodeL(const TDesC8& aValue);
1.54 -
1.55 - /**
1.56 - * Constructor
1.57 - * @param aTimestamp a timestamp value to set.
1.58 - * @param aDealy a delay value to set.
1.59 - */
1.60 - IMPORT_C CSIPTimestampHeader(TReal aTimestamp);
1.61 -
1.62 - /**
1.63 - * Destructor
1.64 - */
1.65 - IMPORT_C ~CSIPTimestampHeader ();
1.66 -
1.67 -
1.68 - public: // New functions
1.69 -
1.70 - /**
1.71 - * Set the timestamp from the "Timestamp" header.
1.72 - * @param aTimestamp a timestamp to set.
1.73 - */
1.74 - IMPORT_C void SetTimestamp(TReal aTimestamp);
1.75 -
1.76 - /**
1.77 - * Gets the timestamp from the "Timestamp" header.
1.78 - * @return a timestamp value.
1.79 - */
1.80 - IMPORT_C TReal Timestamp() const;
1.81 -
1.82 - /**
1.83 - * Check if the delay-part is present
1.84 - * @return a delay value.
1.85 - */
1.86 - IMPORT_C TBool HasDelay() const;
1.87 -
1.88 - /**
1.89 - * Set the delay-part of the "Timestamp" header.
1.90 - * @param aDelay a delay to set.
1.91 - */
1.92 - IMPORT_C void SetDelay(TReal aDelay);
1.93 -
1.94 - /**
1.95 - * Gets the delay-part of the "Timestamp" header,
1.96 - * if delay-part is present
1.97 - * @return a delay value or zero if HasDelay() == EFalse
1.98 - */
1.99 - IMPORT_C TReal Delay() const;
1.100 -
1.101 - /**
1.102 - * Constructs an instance of a CSIPTimestampHeader from a RReadStream
1.103 - * @param aReadStream a stream containing the value of the
1.104 - * externalized object (header name not included).
1.105 - * @return an instance of a CSIPTimestampHeader
1.106 - */
1.107 - IMPORT_C static CSIPHeaderBase*
1.108 - InternalizeValueL(RReadStream& aReadStream);
1.109 -
1.110 - public: // From CSIPHeaderBase
1.111 -
1.112 - /**
1.113 - * From CSIPHeaderBase CloneL
1.114 - */
1.115 - IMPORT_C CSIPHeaderBase* CloneL() const;
1.116 -
1.117 - /**
1.118 - * From CSIPHeaderBase Name
1.119 - */
1.120 - IMPORT_C RStringF Name() const;
1.121 -
1.122 - /**
1.123 - * From CSIPHeaderBase ToTextValueL
1.124 - */
1.125 - IMPORT_C HBufC8* ToTextValueL() const;
1.126 -
1.127 -
1.128 - public: // From CSIPHeaderBase, for internal use
1.129 -
1.130 - /**
1.131 - * @internalComponent
1.132 - */
1.133 - TPreferredPlace PreferredPlaceInMessage() const;
1.134 -
1.135 - public: // New functions, for internal use
1.136 -
1.137 - static RPointerArray<CSIPHeaderBase> BaseDecodeL(const TDesC8& aValue);
1.138 -
1.139 - private: // From CSIPHeaderBase
1.140 -
1.141 - void ExternalizeValueL (RWriteStream& aWriteStream) const;
1.142 -
1.143 - private: // New functions
1.144 -
1.145 - void ParseL(const TDesC8& aValue);
1.146 - void DoInternalizeValueL(RReadStream& aReadStream);
1.147 -
1.148 - private: // Data
1.149 -
1.150 - TReal iTimestamp;
1.151 - TBool iHasDelay;
1.152 - TReal iDelay;
1.153 -
1.154 - private: // For testing purposes
1.155 -
1.156 - UNIT_TEST(CSIPTimestampHeaderTest)
1.157 - };
1.158 -
1.159 -
1.160 -#endif // end of CSIPTIMESTAMPHEADER_H
1.161 -
1.162 -// End of File