S60 3rd Edition API Reference: sdpattributefield.h Source File

sdpattributefield.h

Go to the documentation of this file.
00001 /*
00002 * =============================================================================
00003 *  Name          : SdpAttributeField.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 CSDPATTRIBUTEFIELD_H
00022 #define CSDPATTRIBUTEFIELD_H
00023 
00024 //  INCLUDES
00025 #include <e32base.h>
00026 #include <stringpool.h>
00027 #include "SdpCodecStringConstants.h"
00028 #include "_sdpdefs.h"
00029 
00030 // FORWARD DECLARATIONS
00031 class RReadStream;
00032 class RWriteStream;
00033 class CSdpFmtAttributeField;
00034 class CSdpAttributeFieldPtrs;
00035 
00036 // CLASS DECLARATION
00052 class CSdpAttributeField : public CBase
00053         {
00054     public:     // Constructors and destructor
00055 
00063                 IMPORT_C static CSdpAttributeField* DecodeL( const TDesC8& aText );
00064 
00073                 IMPORT_C static CSdpAttributeField* DecodeLC( const TDesC8& aText );
00074 
00085                 IMPORT_C static CSdpAttributeField* NewL(
00086             RStringF aAttribute, const TDesC8& aValue );
00087 
00098                 IMPORT_C static CSdpAttributeField* NewLC(
00099             RStringF aAttribute, const TDesC8& aValue );
00100 
00104                 IMPORT_C ~CSdpAttributeField();
00105 
00106     public:     // New functions
00107         
00115                 IMPORT_C void EncodeL( RWriteStream& aStream ) const;
00116 
00122                 IMPORT_C CSdpAttributeField* CloneL() const;
00123 
00130                 IMPORT_C TBool operator == ( const CSdpAttributeField& aObj ) const;
00131 
00138                 IMPORT_C RStringF Attribute() const;
00139 
00145                 IMPORT_C const TDesC8& Value() const;
00146 
00158                 IMPORT_C void SetL( RStringF aAttribute, const TDesC8& aValue );
00159                 
00168                 IMPORT_C void AssignTo(const CSdpFmtAttributeField& aFmtAttribute);
00169                 
00180                 IMPORT_C TBool BelongsTo(const CSdpFmtAttributeField& aFmtAttribute) const;
00181 
00182     public:     // Internal to codec
00183 
00189                 void ExternalizeL( RWriteStream& aStream ) const;
00190 
00197         static CSdpAttributeField* InternalizeL( RReadStream& aStream );
00198         
00205         TBool IsFmtAttribute();
00206     
00207         private:    // Constructors
00208 
00212                 CSdpAttributeField();
00213 
00219         void ConstructL( const TDesC8& aText );
00220 
00227         void ConstructL( RStringF aAttribute, const TDesC8& aValue );
00228     
00229     private:    // Internal
00230 
00237         void FormatProperyAttributeL( const TDesC8& aAttribute );
00238 
00245         void FormatValueAttributeL( const TDesC8& aAttribute,
00246                                     const TDesC8& aValue );
00247 
00254         void VerifyValueAttributeL( SdpCodecStringConstants::TStrings aString,
00255                                     const TDesC8& aValue );
00256                                     
00265         void CreateAttributeAndValueStringsLC( RArray<TPtrC8>& aArray,
00266                                                HBufC8*& aAttribute,
00267                                                HBufC8*& aValue );
00268 
00274         void CheckValidOrientL( const TDesC8& aValue );
00275 
00282         void CheckValidLangStrL( const TDesC8& aValue );
00283 
00289         void CheckValidFrameRateL( const TDesC8& aValue );
00290         
00296         void CheckValidControlL( const TDesC8& aValue );
00297 
00304         void CheckValidGroupL( const TDesC8& aValue );
00305 
00312         void CheckValidDesL( const TDesC8& aValue );
00313 
00320         void CheckValidCurrAndConfL( const TDesC8& aValue );
00321 
00329         void ValidValueInListL( TInt aItemsCount, 
00330                                 const TText8* const aValuesList[], 
00331                                 const TDesC8& aValue );
00332 
00339         void CheckValidRangeL( const TDesC8& aValue );
00340 
00341 
00347         void CheckValidRtpmapL( const TDesC8& aValue );
00348 
00354         void CheckValidFmtpL( const TDesC8& aValue );
00355         
00362         void SetNotPredefinedAttributeL( const TDesC8& aAttribute, 
00363                                          const TDesC8& aValue );
00364         
00365         void CreateAttributeFieldPtrsL();
00366         
00367         inline CSdpAttributeFieldPtrs& AttributeFieldPtrs();      
00368         
00369         inline const CSdpAttributeFieldPtrs& AttributeFieldPtrs() const;
00370         
00371         __DECLARE_TEST;
00372 
00373     private:    // Data
00374 
00375         // String pool
00376         RStringPool iPool;
00377 
00378         // Attribute name
00379         RStringF iAttribute;
00380 
00381         // Flag indicating if the attribute is a property attribute
00382         TBool iPropertyAttribute;
00383 
00384         // Value field
00385         HBufC8* iValue;
00386         };
00387 
00388 // CSDPATTRIBUTEFIELD_H
00389 #endif

Copyright © Nokia Corporation 2001-2007
Back to top