upnpmediaserver/contentdirectoryservice/inc/upnpautodestroyobject.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:  Element table data handler
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef C_CUPNPAUTODESTROYOBJECT_H
       
    21 #define C_CUPNPAUTODESTROYOBJECT_H
       
    22 
       
    23 //  INCLUDES
       
    24 #include <e32base.h>
       
    25 #include <upnpnotifytimer.h>
       
    26 
       
    27 //FORWARD DECLARATIONS
       
    28 class CUpnpContentDirectory;
       
    29 class CUpnpNotifyTimer;
       
    30 
       
    31 
       
    32 // CLASS DECLARATION
       
    33 
       
    34 /**
       
    35 *  Auto destroy object
       
    36 *
       
    37 *  @lib AVContentDirectory.lib
       
    38 *  @since Series60 3.1
       
    39 */
       
    40 class CUpnpAutoDestroyObject: public CBase, public MUpnpNotifyTimerObserver
       
    41 {
       
    42 public:  // Constructors and destructor
       
    43     
       
    44     /**
       
    45     * Two-phased constructor.
       
    46     */
       
    47     static CUpnpAutoDestroyObject* NewL(CUpnpContentDirectory* aCd, TInt aObjId, TInt aResId );
       
    48 
       
    49     /**
       
    50     * Two-phased constructor.
       
    51     */
       
    52     static CUpnpAutoDestroyObject* NewLC(CUpnpContentDirectory* aCd, TInt aObjId, TInt aResId );
       
    53     
       
    54     
       
    55     /**
       
    56     * Destructor.
       
    57     */
       
    58     virtual ~CUpnpAutoDestroyObject();
       
    59 
       
    60 public: // New functions
       
    61     virtual void TimerEventL(CUpnpNotifyTimer* aTimer);
       
    62     TInt GetResId();
       
    63     TInt GetObjId();
       
    64     void SetTransferStartedL(TBool aVal);
       
    65     void RenewTimerL();    
       
    66 
       
    67 private:
       
    68 
       
    69     /**
       
    70     * C++ default constructor.
       
    71     */
       
    72     CUpnpAutoDestroyObject(CUpnpContentDirectory* aCd, TInt aObjId, TInt aResId);
       
    73 
       
    74     /**
       
    75     * By default Symbian 2nd phase constructor is private.
       
    76     */
       
    77     void ConstructL();
       
    78 
       
    79 private:    // Data
       
    80     CUpnpContentDirectory*      iCd;        // not owned
       
    81     CUpnpNotifyTimer*           iEventTimer;
       
    82     TInt                        iResId;
       
    83     TInt                        iObjectId;
       
    84     TBool                       iTransferStarted;
       
    85     TBool                       iTimeElapsed;
       
    86 };
       
    87 
       
    88 #endif      // C_CUPNPAUTODESTROYOBJECT_H   
       
    89         
       
    90 // End of File