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 : sippassociateduriheader.h
17 * Interface : SDK API, SIP Codec API
25 #ifndef CSIPPASSOCIATEDURIHEADER_H
26 #define CSIPPASSOCIATEDURIHEADER_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
42 * "P-Associated-URI" header.
46 class CSIPPAssociatedURIHeader : public CSIPAddressHeaderBase
48 public: // Constructors and destructor
51 * Constructs a CSIPPAssociatedURIHeader from textual representation
52 * of the header's value part.
53 * @param aValue a value part of a "P-Associated-URI"-header
54 * (e.g. "User <user@host>;param=value")
55 * @return an array containing one to many instances
56 * of CSIPPAssociatedURIHeader
58 IMPORT_C static RPointerArray<CSIPPAssociatedURIHeader>
59 DecodeL(const TDesC8& aValue);
62 * Creates a new instance of CSIPPAssociatedURIHeader
63 * @pre aSIPAddress != 0
64 * @param aSIPAddress a name-address, the ownership is transferred.
65 * @return a new instance of CSIPPAssociatedURIHeader
67 IMPORT_C static CSIPPAssociatedURIHeader*
68 NewL(CSIPAddress* aSIPAddress);
71 * Creates a new instance of CSIPPAssociatedURIHeader and
72 * puts it to CleanupStack
73 * @pre aSIPAddress != 0
74 * @param aSIPAddress a name-address, the ownership is transferred,
75 * @return a new instance of CSIPPAssociatedURIHeader
77 IMPORT_C static CSIPPAssociatedURIHeader*
78 NewLC(CSIPAddress* aSIPAddress);
81 * Destructor, deletes the resources of CSIPPAssociatedURIHeader.
83 IMPORT_C virtual ~CSIPPAssociatedURIHeader();
86 public: // New functions
89 * Constructs an instance of a CSIPPAssociatedURIHeader from
91 * @param aReadStream a stream containing the value of the
92 * externalized object (header name not included).
93 * @return an instance of a CSIPPAssociatedURIHeader
95 IMPORT_C static CSIPHeaderBase*
96 InternalizeValueL(RReadStream& aReadStream);
98 public: // From CSIPHeaderBase
101 * From CSIPHeaderBase CloneL
103 IMPORT_C CSIPHeaderBase* CloneL() const;
106 * From CSIPHeaderBase Name
108 IMPORT_C RStringF Name() const;
110 public: // From CSIPHeaderBase, for internal use
115 TPreferredPlace PreferredPlaceInMessage() const;
120 TBool MoreThanOneAllowed() const;
122 public: // New functions, for internal use
124 static RPointerArray<CSIPHeaderBase> BaseDecodeL(const TDesC8& aValue);
126 private: // Constructors
128 CSIPPAssociatedURIHeader();
130 private: // For testing purposes
132 UNIT_TEST(CSIPPAssociatedURIHeaderTest)
135 #endif // end of CSIPPASSOCIATEDURIHEADER_H