omadrm/drmengine/server/src/drmmeteringdbdata.cpp
changeset 0 95b198f216e5
equal deleted inserted replaced
-1:000000000000 0:95b198f216e5
       
     1 /*
       
     2 * Copyright (c) 2007-2008 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:  Datatype for the Metering Database Data
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 // INCLUDE FILES
       
    20 #include "drmmeteringdbdata.h"
       
    21 
       
    22 // ============================ MEMBER FUNCTIONS ===============================
       
    23 
       
    24 // -----------------------------------------------------------------------------
       
    25 // CDrmMeteringDbData::NewLC
       
    26 // Constructor. Leaves the object in the cleanup stack.
       
    27 // -----------------------------------------------------------------------------
       
    28 //
       
    29 CDrmMeteringDbData* CDrmMeteringDbData::NewLC()
       
    30     {
       
    31     CDrmMeteringDbData* self = new ( ELeave ) CDrmMeteringDbData();
       
    32     CleanupStack::PushL( self );
       
    33     return self;
       
    34     }
       
    35 
       
    36 
       
    37 // -----------------------------------------------------------------------------
       
    38 // CDrmMeteringDbData::NewL
       
    39 // Constructor
       
    40 // -----------------------------------------------------------------------------
       
    41 //
       
    42 CDrmMeteringDbData* CDrmMeteringDbData::NewL()
       
    43     {
       
    44     CDrmMeteringDbData* self = NewLC();
       
    45     CleanupStack::Pop();
       
    46     return self;
       
    47     }
       
    48 
       
    49 // -----------------------------------------------------------------------------
       
    50 // Default Constructor - First phase
       
    51 // Can be used by itself to generate an empty object
       
    52 // -----------------------------------------------------------------------------
       
    53 //
       
    54 CDrmMeteringDbData::CDrmMeteringDbData():
       
    55     iContentId( NULL ),
       
    56     iCount( 0 ),
       
    57     iAccumulatedTime( 0 ),
       
    58     iPermission( ContentAccess::EPlay ),
       
    59     iParentUid( NULL )
       
    60     {
       
    61     iRiId.SetLength( KRiIdSize );
       
    62     iRiId.Fill( 0 );
       
    63     }
       
    64 
       
    65 // -----------------------------------------------------------------------------
       
    66 // Destructor
       
    67 // -----------------------------------------------------------------------------
       
    68 //
       
    69 CDrmMeteringDbData::~CDrmMeteringDbData()
       
    70     {
       
    71     if( iContentId )
       
    72         {
       
    73         delete iContentId;
       
    74         iContentId = NULL;
       
    75         }
       
    76 
       
    77     if( iParentUid )
       
    78         {
       
    79         delete iParentUid;
       
    80         iParentUid = NULL;
       
    81         }
       
    82     }
       
    83 
       
    84 // -----------------------------------------------------------------------------
       
    85 // CDrmMeteringDbData::ConstructL
       
    86 // 2nd phase constructor
       
    87 // -----------------------------------------------------------------------------
       
    88 //
       
    89 void CDrmMeteringDbData::ConstructL()
       
    90     {
       
    91     }
       
    92 
       
    93 // End of File