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 : siptokenheaderbase.h
17 * Interface : SDK API, SIP Codec API
25 #ifndef CSIPTOKENHEADERBASE_H
26 #define CSIPTOKENHEADERBASE_H
29 #include "sipheaderbase.h"
36 * A base class for SIP headers having form "Name: token *(COMMA token)"
40 class CSIPTokenHeaderBase : public CSIPHeaderBase
42 public: // Constructors and destructor
45 * Destructor, deletes the resources of CSIPTokenHeaderBase.
47 IMPORT_C virtual ~CSIPTokenHeaderBase();
50 public: // New functions
53 * Sets the header value as a token
54 * @param aValue a value to set
56 IMPORT_C void SetValueL(RStringF aValue);
59 * Gets the header value as a token
60 * @return the header value
62 IMPORT_C RStringF Value() const;
65 public: // From CSIPHeaderBase
68 * From CSIPHeaderBase ToTextValueL
70 IMPORT_C HBufC8* ToTextValueL() const;
73 public: // From CSIPHeaderBase, for internal use
78 virtual TBool MoreThanOneAllowed() const;
80 protected: // Constructors
82 CSIPTokenHeaderBase();
83 CSIPTokenHeaderBase(const CSIPTokenHeaderBase& aHeader);
84 void ConstructL(const TDesC8& aValue, TBool aEmptyValueAllowed=EFalse);
85 void ConstructL(RStringF aValue, TBool aEmptyValueAllowed=EFalse);
87 protected: // New functions
89 void DoInternalizeValueL(RReadStream& aReadStream);
98 private: // From CSIPHeaderBase
100 void ExternalizeValueL(RWriteStream& aWriteStream) const;
102 private: // New functions
104 void SetValueL(const TDesC8& aValue);
106 private: // For testing purposes
108 friend class CSIPTokenHeaderBaseTest;
112 #endif // CSIPTOKENHEADERBASE_H