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 : sipreplytoheader.h
17 * Interface : SDK API, SIP Codec API
25 #ifndef CSIPREPLYTOHEADER_H
26 #define CSIPREPLYTOHEADER_H
29 #include "sipaddressheaderbase.h"
31 // FORWARD DECLARATIONS
33 class CSIPHeaderGenericParams;
40 * Class provides functions for setting and getting parameters in SIP
45 class CSIPReplyToHeader : public CSIPAddressHeaderBase
47 public: // Constructors and destructor
50 * Constructs a CSIPReplyToHeader 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 CSIPReplyToHeader
56 IMPORT_C static CSIPReplyToHeader* DecodeL(const TDesC8& aValue);
59 * Creates a new instance of CSIPReplyToHeader
60 * @pre aSIPAddress != 0
61 * @param aSIPAddress a name-address, the ownership is transferred.
62 * @return a new instance of CSIPReplyToHeader
64 IMPORT_C static CSIPReplyToHeader* NewL(CSIPAddress* aSIPAddress);
67 * Creates a new instance of CSIPReplyToHeader 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 CSIPReplyToHeader
72 IMPORT_C static CSIPReplyToHeader* NewLC(CSIPAddress* aSIPAddress);
75 * Destructor, deletes the resources of CSIPReplyToHeader.
77 IMPORT_C virtual ~CSIPReplyToHeader();
80 public: // New functions
83 * Constructs an instance of a CSIPReplyToHeader 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 CSIPReplyToHeader
88 IMPORT_C static CSIPHeaderBase*
89 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 TPreferredPlace PreferredPlaceInMessage() const;
112 public: // New functions, for internal use
114 static RPointerArray<CSIPHeaderBase> BaseDecodeL(const TDesC8& aValue);
116 private: // Constructors
120 private: // For testing purposes
122 friend class CSIPReplyToHeaderTest;
126 #endif // end of CSIPREPLYTOHEADER_H