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 : sippassociateduriheader.h
17 * Interface : SDK API, SIP Codec API
25 #ifndef CSIPPASSOCIATEDURIHEADER_H
26 #define CSIPPASSOCIATEDURIHEADER_H
29 #include "sipaddressheaderbase.h"
31 // FORWARD DECLARATIONS
33 class CSIPHeaderGenericParams;
40 * Class provides functions for setting and getting parameters in SIP
41 * "P-Associated-URI" header.
45 class CSIPPAssociatedURIHeader : public CSIPAddressHeaderBase
47 public: // Constructors and destructor
50 * Constructs a CSIPPAssociatedURIHeader from textual representation
51 * of the header's value part.
52 * @param aValue a value part of a "P-Associated-URI"-header
53 * (e.g. "User <user@host>;param=value")
54 * @return an array containing one to many instances
55 * of CSIPPAssociatedURIHeader
57 IMPORT_C static RPointerArray<CSIPPAssociatedURIHeader>
58 DecodeL(const TDesC8& aValue);
61 * Creates a new instance of CSIPPAssociatedURIHeader
62 * @pre aSIPAddress != 0
63 * @param aSIPAddress a name-address, the ownership is transferred.
64 * @return a new instance of CSIPPAssociatedURIHeader
66 IMPORT_C static CSIPPAssociatedURIHeader*
67 NewL(CSIPAddress* aSIPAddress);
70 * Creates a new instance of CSIPPAssociatedURIHeader and
71 * puts it to CleanupStack
72 * @pre aSIPAddress != 0
73 * @param aSIPAddress a name-address, the ownership is transferred,
74 * @return a new instance of CSIPPAssociatedURIHeader
76 IMPORT_C static CSIPPAssociatedURIHeader*
77 NewLC(CSIPAddress* aSIPAddress);
80 * Destructor, deletes the resources of CSIPPAssociatedURIHeader.
82 IMPORT_C virtual ~CSIPPAssociatedURIHeader();
85 public: // New functions
88 * Constructs an instance of a CSIPPAssociatedURIHeader from
90 * @param aReadStream a stream containing the value of the
91 * externalized object (header name not included).
92 * @return an instance of a CSIPPAssociatedURIHeader
94 IMPORT_C static CSIPHeaderBase*
95 InternalizeValueL(RReadStream& aReadStream);
97 public: // From CSIPHeaderBase
100 * From CSIPHeaderBase CloneL
102 IMPORT_C CSIPHeaderBase* CloneL() const;
105 * From CSIPHeaderBase Name
107 IMPORT_C RStringF Name() const;
109 public: // From CSIPHeaderBase, for internal use
114 TPreferredPlace PreferredPlaceInMessage() const;
119 TBool MoreThanOneAllowed() const;
121 public: // New functions, for internal use
123 static RPointerArray<CSIPHeaderBase> BaseDecodeL(const TDesC8& aValue);
125 private: // Constructors
127 CSIPPAssociatedURIHeader();
129 private: // For testing purposes
131 friend class CSIPPAssociatedURIHeaderTest;
135 #endif // end of CSIPPASSOCIATEDURIHEADER_H