diff -r 000000000000 -r 307788aac0a8 realtimenetprots/sipfw/SDP/inc/SdpCodecParseUtil.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/realtimenetprots/sipfw/SDP/inc/SdpCodecParseUtil.h Tue Feb 02 01:03:15 2010 +0200 @@ -0,0 +1,126 @@ +/* +* Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : SdpCodecParseUtil.h +* Part of : SDP Codec +* Interface : - +* Version : 1.0 +* +*/ + + + + +/** + @internalComponent +*/ + +#ifndef CSDPCODECPARSEUTIL_H +#define CSDPCODECPARSEUTIL_H + +// INCLUDES +#include +#include +#include "_sdpdefs.h" +#include +#include "badesca.h" +class CSdpTimeField; +class CSdpBandwidthField; +class CSdpAttributeField; +class CSdpMediaField; +class CSdpOriginField; +class CUri8; +class CSdpConnectionField; +class CSdpKeyField; +class RReadStream; +class RWriteStream; + +// CLASS DECLARATION +/** + * Common utilities used in the implementation of the SDP codec. + */ +class CSdpCodecParseUtil :public CBase + { + public: // Constructors and destructor + + /** + * Construct a new, CSdpCodecParseUtil object. + * @return The new instance. + */ + static CSdpCodecParseUtil* NewL(RStringPool aPool,const TDesC8& aValue, + TInt aErrCode); + + /** + * Construct a new, CSdpCodecParseUtil object. + * @return The new instance. + */ + static CSdpCodecParseUtil* NewLC(RStringPool aPool,const TDesC8& aValue, + TInt aErrCode); + + ~CSdpCodecParseUtil(); + + public: // New functions + + static TPtrC8 FieldLineValueL(const TDesC8& aValue); + static RArray CheckFieldNameL(RStringPool aPool, + TInt aIndex, + const TDesC8& aValue, + TInt aErrCode); + static RArray CheckOptionalFieldNameL(RStringPool aPool, + TInt aIndex, + const TDesC8& aValue, + TInt aErrCode); + TUint ParseSessionVersionL(TInt aErrCode); + CSdpOriginField* ParseSessionOwnerL(TInt aErrCode); + const TDesC8& ParseSessionNameL(TInt aErrCode); + const TDesC8& ParseInformationL(TInt aErrCode); + CUri8* ParseUriL(TInt aErrCode); + CDesC8ArraySeg* ParseEmailL(TInt aErrCode); + CDesC8ArraySeg* ParsePhoneL(TInt aErrCode); + CSdpConnectionField* ParseConnectionL(TInt aErrCode); + RPointerArray* ParseBandwidthL(TInt aErrCode); + RPointerArray* ParseConnectionFieldsL(TInt aErrCode); + RPointerArray* ParseTimeFieldL(TInt aErrCode); + const TDesC8& ParseZoneAdjustmentL(TInt aErrCode); + CSdpKeyField* ParseEncryptionKeyL(TInt aErrCode); + RPointerArray* ParseAttributeFieldL(TInt aErrCode); + RPointerArray* ParseMediaLevelL (); + RArray FirstLineArrayElementL(RStringPool aPool, + TInt aIndex, + TInt aErrCode); + + RArray& LineArray(); + + private: + + CSdpCodecParseUtil(); + + void ConstructL(RStringPool aPool,const TDesC8& aValue,TInt aErrCode); + + private: // Data + RArray iLineArray; + RArray iElementArray; + RStringPool iPool; + RPointerArray* iTimeFields; + RPointerArray* iBandwidthFields; + RPointerArray* iAttributeFields; + RPointerArray* iMediaFields; + RPointerArray* iConnectionFields; + CDesC8ArraySeg* iEmailFields; + CDesC8ArraySeg* iPhoneFields; + HBufC8* iToken; + TPtrC8 iData; + }; + +#endif // CSDPCODECPARSEUTIL_H