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 : siprefertoheader.h
17 * Interface : SDK API, SIP Codec API
25 #ifndef CSIPREFERTOHEADER_H
26 #define CSIPREFERTOHEADER_H
29 #include "sipaddressheaderbase.h"
31 // FORWARD DECLARATIONS
33 class CSIPHeaderGenericParams;
40 * Class provides functions for setting and getting parameters in SIP
45 class CSIPReferToHeader : public CSIPAddressHeaderBase
47 public: // Constructors and destructor
50 * Constructs a CSIPReferToHeader from textual representation
51 * of the header's value part.
52 * @param aValue a value part of a "Refer-To"-header
53 * (e.g. "User <user@host>")
54 * @return a new instance of CSIPReferToHeader
56 IMPORT_C static CSIPReferToHeader* DecodeL(const TDesC8& aValue);
59 * Creates a new instance of CSIPReferToHeader
60 * @pre aSIPAddress != 0
61 * @param aSIPAddress a name-address, the ownership is transferred.
62 * @return a new instance of CSIPReferToHeader
64 IMPORT_C static CSIPReferToHeader* NewL(CSIPAddress* aSIPAddress);
67 * Creates a new instance of CSIPReferToHeader and puts it to CleanupStack
68 * @pre aSIPAddress != 0
69 * @param aSIPAddress a name-address, the ownership is transferred,
70 * @return a new instance of CSIPReferToHeader
72 IMPORT_C static CSIPReferToHeader* NewLC(CSIPAddress* aSIPAddress);
75 * Destructor, deletes the resources of CSIPReferToHeader.
77 IMPORT_C virtual ~CSIPReferToHeader();
80 public: // New functions
83 * Constructs an instance of a CSIPReferToHeader from a RReadStream
84 * @param aReadStream a stream containing the value of the
85 * externalized object (header name not included).
86 * @return an instance of a CSIPReferToHeader
88 IMPORT_C static CSIPHeaderBase* InternalizeValueL(RReadStream& aReadStream);
91 public: // From CSIPHeaderBase
94 * From CSIPHeaderBase CloneL
96 IMPORT_C CSIPHeaderBase* CloneL() const;
99 * From CSIPHeaderBase Name
101 IMPORT_C RStringF Name() const;
104 public: // From CSIPHeaderBase, for internal use
109 TBool HasCompactName() const;
114 RStringF CompactName() const;
119 TPreferredPlace PreferredPlaceInMessage() const;
121 public: // New functions, for internal use
123 static RPointerArray<CSIPHeaderBase> BaseDecodeL(const TDesC8& aValue);
125 private: // Constructors
129 private: // For testing purposes
131 friend class CSIPReferToHeaderTest;
135 #endif // end of CSIPREFERTOHEADER_H