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 : sipsupportedheader.h
17 * Interface : SDK API, SIP Codec API
25 #ifndef CSIPSUPPORTEDHEADER_H
26 #define CSIPSUPPORTEDHEADER_H
29 #include "siptokenheaderbase.h"
36 * Class provides functions for setting and getting SIP "Supported" header.
40 class CSIPSupportedHeader : public CSIPTokenHeaderBase
42 public: // Constructors and destructor
45 * Constructs a CSIPSupportedHeader from textual representation
46 * of the header's value part.
47 * @param aValue a value part of a "Supported"-header
48 * @return an array containing 1..n instances of CSIPSupportedHeader
50 IMPORT_C static RPointerArray<CSIPSupportedHeader>
51 DecodeL(const TDesC8& aValue);
54 * Creates a new instance of CSIPSupportedHeader
55 * @param aValue a tag value
56 * @return a new instance of CSIPSupportedHeader
58 IMPORT_C static CSIPSupportedHeader* NewL(RStringF aValue);
61 * Creates a new instance of CSIPSupportedHeader
62 * and puts it to CleanupStack
63 * @param aValue a tag value
64 * @return a new instance of CSIPSupportedHeader
66 IMPORT_C static CSIPSupportedHeader* NewLC(RStringF aValue);
69 * Destructor, deletes the resources of CSIPSupportedHeader.
71 IMPORT_C ~CSIPSupportedHeader();
74 public: // New functions
77 * Constructs an instance of a CSIPSupportedHeader from a RReadStream
78 * @param aReadStream a stream containing the value of the
79 * externalized object (header name not included).
80 * @return an instance of a CSIPSupportedHeader
82 IMPORT_C static CSIPHeaderBase*
83 InternalizeValueL(RReadStream& aReadStream);
86 public: // From CSIPHeaderBase
89 * From CSIPHeaderBase CloneL
91 IMPORT_C CSIPHeaderBase* CloneL() const;
94 * From CSIPHeaderBase Name
96 IMPORT_C RStringF Name() const;
99 public: // From CSIPHeaderBase, for internal use
104 TBool HasCompactName() const;
109 RStringF CompactName() const;
114 TPreferredPlace PreferredPlaceInMessage() const;
116 public: // New functions, for internal use
118 static RPointerArray<CSIPHeaderBase> BaseDecodeL(const TDesC8& aValue);
120 private: // New functions
122 CSIPSupportedHeader();
123 CSIPSupportedHeader(const CSIPSupportedHeader& aHeader);
125 private: // For testing purposes
127 friend class CSIPSupportedHeaderTest;
131 #endif // CSIPSUPPORTEDHEADER_H