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 : sipunsignedintheaderbase.h
17 * Interface : SDK API, SIP Codec API
25 #ifndef CSIPUNSIGNEDINTHEADERBASE_H
26 #define CSIPUNSIGNEDINTHEADERBASE_H
29 #include "sipheaderbase.h"
37 * A base class for SIP headers having form: "Name: 1*DIGIT"
41 class CSIPUnsignedIntHeaderBase : public CSIPHeaderBase
43 public: // Constructors and destructor
46 * Destructor, deletes the resources of CSIPUnsignedIntHeaderBase.
48 IMPORT_C virtual ~CSIPUnsignedIntHeaderBase();
51 public: // New functions
54 * Sets the header value as an unsigned integer
55 * @param aValue a value to set
57 IMPORT_C void SetValue(TUint aValue);
60 * Gets the header value as an unsigned integer
61 * @return the header value
63 IMPORT_C TUint Value() const;
66 public: // From CSIPHeaderBase
69 * From CSIPHeaderBase ToTextValueL
71 IMPORT_C HBufC8* ToTextValueL() const;
74 protected: // Constructors
76 CSIPUnsignedIntHeaderBase();
77 CSIPUnsignedIntHeaderBase(TUint aValue);
79 protected: // New functions
81 void ParseL(const TDesC8& aValue, TInt aErrorIfParsingFails);
82 void DoInternalizeValueL(RReadStream& aReadStream);
84 protected: // From CSIPHeaderBase
89 void ExternalizeValueL (RWriteStream& aWriteStream) const;
99 #endif // CSIPUNSIGNEDINTHEADERBASE_H