Attempt to represent the S^2->S^3 header reorganisation as a series of "hg rename" operations
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 : sipacceptcontactheader.h
17 * Interface : SDK API, SIP Codec API
25 #ifndef CSIPACCEPTCONTACTHEADER_H
26 #define CSIPACCEPTCONTACTHEADER_H
29 #include "sipparameterheaderbase.h"
30 #include "_sipcodecdefs.h"
32 // FORWARD DECLARATIONS
33 class CSIPAcceptContactHeaderParams;
40 * Class provides functions for setting and getting parameters in SIP
41 * "Accept-Contact" header.
45 class CSIPAcceptContactHeader : public CSIPParameterHeaderBase
47 public: // Constructors and destructor
50 * Constructs a CSIPAcceptContactHeader from textual representation
51 * of the header's value part.
52 * @param aValue a value part of a "Accept-Contact"-header
53 * (e.g. "*;param=value")
54 * @return an array containing one to many instances
55 * of CSIPAcceptContactHeader
57 IMPORT_C static RPointerArray<CSIPAcceptContactHeader>
58 DecodeL(const TDesC8& aValue);
61 * Creates a new instance of CSIPAcceptContactHeader
62 * @return a new instance of CSIPAcceptContactHeader
64 IMPORT_C static CSIPAcceptContactHeader* NewL();
67 * Creates a new instance of CSIPAcceptContactHeader
68 * On return the new instance has left to the CleanupStack.
69 * @return a new instance of CSIPAcceptContactHeader
71 IMPORT_C static CSIPAcceptContactHeader* NewLC();
74 * Destructor, deletes the resources of CSIPAcceptContactHeader.
76 IMPORT_C virtual ~CSIPAcceptContactHeader();
79 public: // New functions
82 * Compares this instance to another "Accept-Contact" header object.
83 * Two Accept-Contact-headers are equal,
84 * if both contain exactly the same parameters.
85 * The order of the parameters is not sufficient.
86 * @param aHeader a header to compare to
87 * @return ETrue, if the objects are equal otherwise EFalse
89 IMPORT_C TBool operator==(const CSIPAcceptContactHeader& aHeader) const;
92 * Constructs an instance of a CSIPAcceptContactHeader from a RReadStream
93 * @param aReadStream a stream containing the value of the
94 * externalized object (header name not included).
95 * @return an instance of a CSIPAcceptContactHeader
97 IMPORT_C static CSIPHeaderBase*
98 InternalizeValueL(RReadStream& aReadStream);
101 public: // From CSIPHeaderBase
104 * From CSIPHeaderBase CloneL
106 IMPORT_C CSIPHeaderBase* CloneL() const;
109 * From CSIPHeaderBase Name
111 IMPORT_C RStringF Name() const;
114 public: // From CSIPHeaderBase, for internal use
119 TBool HasCompactName() const;
124 RStringF CompactName() const;
129 TBool MoreThanOneAllowed() const;
134 TPreferredPlace PreferredPlaceInMessage() const;
136 public: // New functions, for internal use
138 static RPointerArray<CSIPHeaderBase> BaseDecodeL(const TDesC8& aValue);
140 private: // From CSIPHeaderBase
142 void ExternalizeValueL(RWriteStream& aWriteStream) const;
144 private: // From CSIPParameterHeaderBase
146 HBufC8* ToTextMandatoryPartLC() const;
147 void ParseMandatoryPartL(const TDesC8& aMandatoryPart);
148 const CSIPParamContainerBase& Params() const;
149 CSIPParamContainerBase& Params();
151 private: // Constructors
153 CSIPAcceptContactHeader();
155 void ConstructL(const CSIPAcceptContactHeader& aAcceptContactHeader);
157 private: // New functions
159 void DoInternalizeValueL(RReadStream& aReadStream);
163 CSIPAcceptContactHeaderParams* iParams;
165 private: // For testing purposes
167 UNIT_TEST(CSIPAcceptContactHeaderTest)
170 #endif // CSIPACCEPTCONTACTHEADER_H