00001 /* 00002 * ============================================================================= 00003 * Name : SdpBandwidthField.h 00004 * Part of : SDP Codec 00005 * Interface : SDK API, SDP Codec API 00006 * Description : 00007 * Version : 1.0 00008 * 00009 * Copyright (c) 2003 Nokia Corporation. 00010 * This material, including documentation and any related 00011 * computer programs, is protected by copyright controlled by 00012 * Nokia Corporation. All rights are reserved. Copying, 00013 * including reproducing, storing, adapting or translating, any 00014 * or all of this material requires the prior written consent of 00015 * Nokia Corporation. This material also contains confidential 00016 * information which may not be disclosed to others without the 00017 * prior written consent of Nokia Corporation. 00018 * ============================================================================= 00019 */ 00020 00021 #ifndef CSDPBANDWIDTHFIELD_H 00022 #define CSDPBANDWIDTHFIELD_H 00023 00024 // INCLUDES 00025 #include <e32base.h> 00026 #include <stringpool.h> 00027 #include "_sdpdefs.h" 00028 00029 // FORWARD DECLARATIONS 00030 class RReadStream; 00031 class RWriteStream; 00032 00033 // CLASS DECLARATION 00048 class CSdpBandwidthField : public CBase 00049 { 00050 public:// Constructors and destructor 00058 IMPORT_C static CSdpBandwidthField* DecodeL(const TDesC8& aText); 00059 00068 IMPORT_C static CSdpBandwidthField* DecodeLC(const TDesC8& aText); 00069 00077 IMPORT_C static CSdpBandwidthField* NewL(RStringF aModifier, 00078 TUint32 aValue); 00079 00088 IMPORT_C static CSdpBandwidthField* NewLC(RStringF aModifier, 00089 TUint32 aValue); 00090 00091 00095 IMPORT_C ~CSdpBandwidthField(); 00096 00097 public: // New functions 00105 IMPORT_C void EncodeL(RWriteStream& aStream) const; 00106 00112 IMPORT_C CSdpBandwidthField * CloneL() const; 00113 00120 IMPORT_C TBool operator == (const CSdpBandwidthField& aObj) const; 00121 00128 IMPORT_C RStringF Modifier() const; 00129 00135 IMPORT_C void SetModifier(RStringF aModifier); 00136 00142 IMPORT_C TUint32 Value() const; 00143 00149 IMPORT_C void SetValue(TUint32 aValue); 00150 00151 public: 00157 void ExternalizeL(RWriteStream& aStream) const; 00158 00165 static CSdpBandwidthField* InternalizeL(RReadStream& aStream); 00166 00167 private: 00168 CSdpBandwidthField(); 00169 void ConstructL(const TDesC8& aText); 00170 void ConstructL(RStringF aModifier, TUint32 aValue); 00171 void ConstructL(const TDesC8& aModifier, TUint32 aValue); 00172 00179 void CopyModifierL(const TDesC8& aModifier); 00180 00181 private: // Data 00182 RStringF iModifier; 00183 TUint32 iValue; 00184 RStringPool iStringPool; 00185 }; 00186 00187 // CSDPBANDWIDTHFIELD_H 00188 #endif