diff -r 000000000000 -r 95b198f216e5 omadrm/drmengine/roap/inc/RoapResponse.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/omadrm/drmengine/roap/inc/RoapResponse.h Thu Dec 17 08:52:27 2009 +0200 @@ -0,0 +1,96 @@ +/* +* Copyright (c) 2002-2004 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: ?Description +* +*/ + + +#ifndef ROAP_RESPONSE_H +#define ROAP_RESPONSE_H + +#include +#include +#include +#include "MultipartHandler.h" + +namespace Roap +{ + +// CLASS DECLARATION + +class CRoapResponse: public CBase, public TMultipartHandler + { + public: + + enum TMultipartState + { + ERights, + EDcf, + EOther + }; + + public: // Construct / destruct + + static CRoapResponse* NewL(); + + virtual ~CRoapResponse(); + + public: + + const TDesC8& ProtocolUnit() const; + + const TFileName& DcfFileName() const; + + const TDataType& DataType() const; + + void SetDcfPathL( const TPath& aPath ); + + void AppendMultipartDataL( const TDesC8& aData ); + + virtual void HandleBodyDataL( const TDesC8& aData ); + + virtual void StartBodyPartL(); + + virtual void EndBodyPartL(); + + void SetContentNameL( const TDes& aName ); + + void GetContentNameLC( HBufC*& aName ) const; + + void SetMaxSize( const TInt& aSize ); + + TInt MaxSize() const; + + protected: + + CRoapResponse(); + + void ConstructL(); + + private: // friends + + friend class CRoapHttpHandler; + + private: // data + + HBufC8* iPdu; + TFileName iDcfFileName; // contains the full path and file name of the temp DCF file + HBufC* iContentName; // content name to be used as a filename when saving temp DCF + TDataType iDataType; + TMultipartState iMultipartState; + TInt iMaxSize; + }; +} + +#endif