diff -r 000000000000 -r f5a58ecadc66 upnp/upnpstack/controlpointbase/inc/upnpfilesender.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/upnp/upnpstack/controlpointbase/inc/upnpfilesender.h Tue Feb 02 01:12:20 2010 +0200 @@ -0,0 +1,95 @@ +/** @file + * Copyright (c) 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: CUpnpFileSender declaration + * + */ + +#ifndef UPNPFILESENDER_H +#define UPNPFILESENDER_H + +// INCLUDES +#include +#include +#include "httptransferobserver.h" + +class CHttpUploader; +class CUpnpHttpMessage; +class CUpnpControlPoint; + +// CLASS DECLARATION + +/** + * CUpnpFileSender + * + */ +NONSHARABLE_CLASS( CUpnpFileSender ) : public CBase, public MHttpTransferObserver + { +public: + // Constructors and destructor + + /** + * Destructor. + */ + ~CUpnpFileSender(); + + /** + * Two-phased constructor. + */ + static CUpnpFileSender* NewL( CUpnpControlPoint& aCPToNotifyOfSendingResult ); + + /** + * Two-phased constructor. + */ + static CUpnpFileSender* NewLC( CUpnpControlPoint& aCPToNotifyOfSendingResult ); + + /** + * Send particular file by http post + * Message should have post method and outfilenama set, and proper destination + * address set. Response will be notified to control point object + */ + void SendL( CUpnpHttpMessage& aMessageToSend ); + +private: + //from MHttpTransferObserver + + virtual void TransferProgress( TAny* aKey, + TInt aBytes, + TInt aTotalBytes ); + + virtual void ReadyForTransferL( TAny* aKey ); + + virtual void TransferCompleted( TAny* aKey, TInt aStatus ); + +private: + + /** + * Constructor for performing 1st stage construction + */ + CUpnpFileSender( CUpnpControlPoint& aCPToNotifyOfSendingResult ); + + /** + * EPOC default constructor for performing 2nd stage construction + */ + void ConstructL(); + +private: + + // control point, not owned + CUpnpControlPoint& iControlPoint; + + CHttpUploader* iUploader; + + }; + +#endif // UPNPFILESENDER_H