omadrm/drmengine/server/inc/DRMDbSession.inl
changeset 0 95b198f216e5
child 12 8a03a285ab14
equal deleted inserted replaced
-1:000000000000 0:95b198f216e5
       
     1 /*
       
     2 * Copyright (c) 2003 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:  This file contains inline functions of class CDRMDbSession
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 // INCLUDE FILES
       
    21 #include "DRMConstraint.h"
       
    22 #include "DRMRightsServer.h"
       
    23 
       
    24 // ============================= LOCAL FUNCTIONS ===============================
       
    25 
       
    26 // ============================ MEMBER FUNCTIONS ===============================
       
    27 inline TBool CDRMDbSession::Invalid( const CDRMConstraint& aConstraint )
       
    28     {
       
    29     if ( ( ( aConstraint.iActiveConstraints & EConstraintCounter ) &&
       
    30            ( aConstraint.iCounter < 1 ) ) ||
       
    31          ( ( aConstraint.iActiveConstraints & 
       
    32              EConstraintInterval ) &&
       
    33            ( aConstraint.iIntervalStart != Time::NullTTime() ) ) )
       
    34         {
       
    35         return ETrue;
       
    36         }
       
    37 
       
    38     return EFalse;
       
    39     }
       
    40     
       
    41 // -----------------------------------------------------------------------------
       
    42 // CDRMDbSession::UpdateSecureTime
       
    43 // Update secure time.
       
    44 // -----------------------------------------------------------------------------
       
    45 inline void CDRMDbSession::UpdateSecureTime()
       
    46     {
       
    47     iSecureTime = ( ( CDRMRightsServer* )( Server() ) )->
       
    48                   GetSecureTime( iTrustedTime );
       
    49     }
       
    50 
       
    51 // -----------------------------------------------------------------------------
       
    52 // CDRMDbSession::UpdateSecureTime
       
    53 // Update secure time.
       
    54 // -----------------------------------------------------------------------------
       
    55 inline const TDesC8& CDRMDbSession::GetContentId()
       
    56     {
       
    57     return *iContentId;
       
    58     }
       
    59 
       
    60 
       
    61 // ========================== OTHER EXPORTED FUNCTIONS =========================
       
    62 //  End of File