upnpmediaserver/contentdirectoryservice/inc/upnpfiletransfertimerobserver.h
changeset 0 7f85d04be362
equal deleted inserted replaced
-1:000000000000 0:7f85d04be362
       
     1 /** @file
       
     2 * Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies  this distribution, and is available 
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Implements the upnpfiletransfertimerobserver class
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef C_CUPNPFILETRANSFERTIMEROBSERVER_H
       
    21 #define C_CUPNPFILETRANSFERTIMEROBSERVER_H
       
    22 
       
    23 //  INCLUDES
       
    24 #include <e32std.h>
       
    25 #include "upnpnotifytimer.h"
       
    26 
       
    27 // FORWARD DECLARATIONS
       
    28 class CUpnpContentDirectory;
       
    29 class MUpnpContentDirectoryEventObserver;
       
    30 class CUpnpFileTransferTimerObserver;
       
    31 
       
    32 const TInt KFileTransferStorageTime = 30000000;
       
    33 
       
    34 class MUpnpFileTransferTimerObserver
       
    35     {
       
    36 public:
       
    37    /**
       
    38     * Callback for filetransfer timer events
       
    39     * @since Series 60 2.6
       
    40     * @return Error code
       
    41     */
       
    42     virtual void TransferEvent( CUpnpFileTransferTimerObserver* aTimer ) = 0;
       
    43     };
       
    44 
       
    45 
       
    46 /**
       
    47 *  This is a observer for timer events. This is needed since CDS allready
       
    48 *  is a observer for statevariable events.
       
    49 *
       
    50 *  @lib ContentDirectory
       
    51 *  @since Series 60 2.6
       
    52 */
       
    53 class CUpnpFileTransferTimerObserver : public CBase, public MUpnpNotifyTimerObserver
       
    54 {
       
    55 public: // Constructors and destructors
       
    56 
       
    57     /**
       
    58     * Two-phased constructor for creating FiletransferTimerObsever
       
    59     * @since Series60 2.6
       
    60     * @param aService Parent service 
       
    61     */
       
    62     static CUpnpFileTransferTimerObserver* NewLC( MUpnpFileTransferTimerObserver* aCd, TInt aTransferId);
       
    63 
       
    64     /**
       
    65     * Two-phased constructor for creating FiletransferTimerObsever
       
    66     * @since Series60 2.6
       
    67     * @param aService Parent service 
       
    68     */
       
    69     //static CUpnpFileTransferTimerObserver* NewLC(CUpnpContentDirectory* aCd);
       
    70 
       
    71     /**
       
    72     * Destructor.
       
    73     */
       
    74     virtual ~CUpnpFileTransferTimerObserver();
       
    75 
       
    76 private:
       
    77     /**
       
    78     * C++ default constructor.
       
    79     */
       
    80     CUpnpFileTransferTimerObserver( MUpnpFileTransferTimerObserver* aCd, TInt aTransferId );
       
    81     
       
    82     /**
       
    83     * Second phase of the constructor.
       
    84     * Initialises a DOM tree.
       
    85     * By default Symbian 2nd phase constructor is private.
       
    86     * @param service Parent service
       
    87     */
       
    88     void ConstructL();
       
    89 
       
    90 public: //from NotifyTimerObserver
       
    91     void TimerEventL( CUpnpNotifyTimer* aTimer );
       
    92     TInt TransferId();
       
    93     
       
    94 private: //data
       
    95     // Notify timer, owned
       
    96     MUpnpFileTransferTimerObserver* iCd;
       
    97     CUpnpNotifyTimer*    iEventTimer;
       
    98     TInt iTransferId;
       
    99     
       
   100     };
       
   101 
       
   102 #endif      // C_CUPNPFILETRANSFERTIMEROBSERVER_H   
       
   103         
       
   104 // End of File