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 the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
15 * Name : siprefertoheader.h
17 * Interface : SDK API, SIP Codec API
25 #ifndef CSIPREFERTOHEADER_H
26 #define CSIPREFERTOHEADER_H
29 #include "sipaddressheaderbase.h"
30 #include "_sipcodecdefs.h"
32 // FORWARD DECLARATIONS
34 class CSIPHeaderGenericParams;
41 * Class provides functions for setting and getting parameters in SIP
46 class CSIPReferToHeader : public CSIPAddressHeaderBase
48 public: // Constructors and destructor
51 * Constructs a CSIPReferToHeader from textual representation
52 * of the header's value part.
53 * @param aValue a value part of a "Refer-To"-header
54 * (e.g. "User <user@host>")
55 * @return a new instance of CSIPReferToHeader
57 IMPORT_C static CSIPReferToHeader* DecodeL(const TDesC8& aValue);
60 * Creates a new instance of CSIPReferToHeader
61 * @pre aSIPAddress != 0
62 * @param aSIPAddress a name-address, the ownership is transferred.
63 * @return a new instance of CSIPReferToHeader
65 IMPORT_C static CSIPReferToHeader* NewL(CSIPAddress* aSIPAddress);
68 * Creates a new instance of CSIPReferToHeader and puts it to CleanupStack
69 * @pre aSIPAddress != 0
70 * @param aSIPAddress a name-address, the ownership is transferred,
71 * @return a new instance of CSIPReferToHeader
73 IMPORT_C static CSIPReferToHeader* NewLC(CSIPAddress* aSIPAddress);
76 * Destructor, deletes the resources of CSIPReferToHeader.
78 IMPORT_C virtual ~CSIPReferToHeader();
81 public: // New functions
84 * Constructs an instance of a CSIPReferToHeader from a RReadStream
85 * @param aReadStream a stream containing the value of the
86 * externalized object (header name not included).
87 * @return an instance of a CSIPReferToHeader
89 IMPORT_C static CSIPHeaderBase* InternalizeValueL(RReadStream& aReadStream);
92 public: // From CSIPHeaderBase
95 * From CSIPHeaderBase CloneL
97 IMPORT_C CSIPHeaderBase* CloneL() const;
100 * From CSIPHeaderBase Name
102 IMPORT_C RStringF Name() const;
105 public: // From CSIPHeaderBase, for internal use
110 TBool HasCompactName() const;
115 RStringF CompactName() const;
120 TPreferredPlace PreferredPlaceInMessage() const;
122 public: // New functions, for internal use
124 static RPointerArray<CSIPHeaderBase> BaseDecodeL(const TDesC8& aValue);
126 private: // Constructors
130 private: // For testing purposes
132 UNIT_TEST(CSIPReferToHeaderTest)
135 #endif // end of CSIPREFERTOHEADER_H