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 : sipcallidheader.h
24 #ifndef CSIPCALLIDHEADER_H
25 #define CSIPCALLIDHEADER_H
28 #include "sipheaderbase.h"
35 * Class for a SIP Call-ID header.
39 class CSIPCallIDHeader : public CSIPHeaderBase
41 public: // Constructors and destructor
44 * Constructs a CSIPCallIDHeader from textual representation
45 * of the header's value part.
46 * @param aValue a value part of a "Call-ID"-header (e.g. "ab2x@zb7y")
47 * @returns a new instance of CSIPCallIDHeader
49 IMPORT_C static CSIPCallIDHeader* DecodeL(const TDesC8& aValue);
54 IMPORT_C ~CSIPCallIDHeader ();
57 public: // New functions
60 * Compares this instance to another "Call-ID" header object
61 * @param aCallIDHeader a header to compare to
62 * @returns ETrue if "Call-ID" headers are similar
64 IMPORT_C TBool operator==(const CSIPCallIDHeader& aCallIDHeader);
67 * Constructs an instance of a CSIPCallIDHeader from a RReadStream
68 * @param aReadStream a stream containing the value of the
69 * externalized object (header name not included).
70 * @return an instance of a CSIPCallIDHeader
72 IMPORT_C static CSIPHeaderBase*
73 InternalizeValueL(RReadStream& aReadStream);
76 public: // From CSIPHeaderBase
79 * From CSIPHeaderBase CloneL
81 IMPORT_C CSIPHeaderBase* CloneL() const;
84 * From CSIPHeaderBase Name
86 IMPORT_C RStringF Name() const;
89 * From CSIPHeaderBase ToTextValueL
91 IMPORT_C HBufC8* ToTextValueL() const;
94 public: // From CSIPHeaderBase, for internal use
99 TBool HasCompactName() const;
104 RStringF CompactName() const;
109 TPreferredPlace PreferredPlaceInMessage() const;
111 public: // New functions, for internal use
113 static RPointerArray<CSIPHeaderBase> BaseDecodeL(const TDesC8& aValue);
115 private: // From CSIPHeaderBase
117 void ExternalizeValueL (RWriteStream& aWriteStream) const;
119 private: // Constructors
123 private: // New functions
125 void ParseL(const TDesC8& aValue);
131 private: // For testing purposes
133 friend class CSIPCallIDHeaderTest;
138 #endif // end of CSIPCALLIDHEADER_H