2 * Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
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".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
15 * Name : sipexpiresheader.h
17 * Interface : SDK API, SIP Codec API
25 #ifndef CSIPEXPIRESHEADER_H
26 #define CSIPEXPIRESHEADER_H
29 #include "sipunsignedintheaderbase.h"
36 * Class encapsulates a "Expires" header value.
40 class CSIPExpiresHeader : public CSIPUnsignedIntHeaderBase
42 public: // Constructors and destructor
45 * Constructs a CSIPExpiresHeader from textual representation
46 * of the header's value part.
47 * @param aValue a value part of a "Expires"-header (e.g. "3600")
48 * @return a new instance of CSIPExpiresHeader
50 IMPORT_C static CSIPExpiresHeader* DecodeL(const TDesC8& aValue);
54 * @param aValue the value to set
56 IMPORT_C CSIPExpiresHeader(TUint aValue);
59 * Destructor, deletes the resources of CSIPExpiresHeader.
61 IMPORT_C ~CSIPExpiresHeader();
64 public: // New functions
67 * Constructs an instance of a CSIPExpiresHeader from a RReadStream
68 * @param aReadStream a stream containing the value of the
69 * externalized header object (header name not included).
70 * @return an instance of a CSIPExpiresHeader
72 IMPORT_C static CSIPHeaderBase*
73 InternalizeValueL(RReadStream& aReadStream);
76 public: // From CSIPHeaderBase
79 * From CSIPHeaderBase CloneL
81 IMPORT_C CSIPHeaderBase* CloneL() const;
84 * From CSIPHeaderBase Name
86 IMPORT_C RStringF Name() const;
89 public: // From CSIPHeaderBase, for internal use
94 TPreferredPlace PreferredPlaceInMessage() const;
96 public: // New functions, for internal use
98 static RPointerArray<CSIPHeaderBase> BaseDecodeL(const TDesC8& aValue);
100 private: // For testing purposes
102 friend class CSIPExpiresHeaderTest;
106 #endif // CSIPEXPIRESHEADER_H