commondrm/drmutility/src/DrmRightsInfo.cpp
branchRCL_3
changeset 18 8a03a285ab14
parent 0 95b198f216e5
equal deleted inserted replaced
17:e16d72588c28 18:8a03a285ab14
    19 // INCLUDE FILES
    19 // INCLUDE FILES
    20 #include <drmutility.h>
    20 #include <drmutility.h>
    21 #include <drmrightsinfo.h>
    21 #include <drmrightsinfo.h>
    22 #include <drmasyncobserver.h>
    22 #include <drmasyncobserver.h>
    23 
    23 
    24 #include "drmrightsinfoimpl.h"
    24 #include "DrmRightsInfoImpl.h"
    25 
    25 
    26 // ============================= LOCAL FUNCTIONS ===============================
    26 // ============================= LOCAL FUNCTIONS ===============================
    27 
    27 
    28 // ============================ MEMBER FUNCTIONS ===============================
    28 // ============================ MEMBER FUNCTIONS ===============================
    29 
    29 
    54 // -----------------------------------------------------------------------------
    54 // -----------------------------------------------------------------------------
    55 //
    55 //
    56 EXPORT_C DRM::CDrmRightsInfo* DRM::CDrmRightsInfo::NewL()
    56 EXPORT_C DRM::CDrmRightsInfo* DRM::CDrmRightsInfo::NewL()
    57     {
    57     {
    58     DRM::CDrmRightsInfo* self( NewLC() );
    58     DRM::CDrmRightsInfo* self( NewLC() );
    59     
    59 
    60     CleanupStack::Pop( self );
    60     CleanupStack::Pop( self );
    61 
    61 
    62     return self;
    62     return self;
    63     }
    63     }
    64 
    64 
    69 // -----------------------------------------------------------------------------
    69 // -----------------------------------------------------------------------------
    70 //
    70 //
    71 EXPORT_C DRM::CDrmRightsInfo* DRM::CDrmRightsInfo::NewLC()
    71 EXPORT_C DRM::CDrmRightsInfo* DRM::CDrmRightsInfo::NewLC()
    72     {
    72     {
    73     DRM::CDrmRightsInfo* self( new( ELeave ) CDrmRightsInfo );
    73     DRM::CDrmRightsInfo* self( new( ELeave ) CDrmRightsInfo );
    74     
    74 
    75     CleanupStack::PushL( self );
    75     CleanupStack::PushL( self );
    76     self->ConstructL();
    76     self->ConstructL();
    77     
    77 
    78     return self;
    78     return self;
    79     }
    79     }
    80 
    80 
    81     
    81 
    82 // Destructor
    82 // Destructor
    83 DRM::CDrmRightsInfo::~CDrmRightsInfo()
    83 DRM::CDrmRightsInfo::~CDrmRightsInfo()
    84     {
    84     {
    85     delete iImplementation;
    85     delete iImplementation;
    86     delete iUtility;
    86     delete iUtility;
    88 
    88 
    89 // -----------------------------------------------------------------------------
    89 // -----------------------------------------------------------------------------
    90 // CDrmRightsInfo::GetUtility
    90 // CDrmRightsInfo::GetUtility
    91 // (other items were commented in a header).
    91 // (other items were commented in a header).
    92 // -----------------------------------------------------------------------------
    92 // -----------------------------------------------------------------------------
    93 //  
    93 //
    94 EXPORT_C DRM::CDrmUtility& DRM::CDrmRightsInfo::GetUtility() const
    94 EXPORT_C DRM::CDrmUtility& DRM::CDrmRightsInfo::GetUtility() const
    95     {
    95     {
    96     return *iUtility;
    96     return *iUtility;
    97     }
    97     }
    98 
    98 
    99 
    99 
   100 // -----------------------------------------------------------------------------
   100 // -----------------------------------------------------------------------------
   101 // CDrmRightsInfo::CheckRightsL
   101 // CDrmRightsInfo::CheckRightsL
   102 // Syncronous method
   102 // Syncronous method
   103 // -----------------------------------------------------------------------------
   103 // -----------------------------------------------------------------------------
   104 //	
   104 //
   105 EXPORT_C void DRM::CDrmRightsInfo::CheckRightsL( 
   105 EXPORT_C void DRM::CDrmRightsInfo::CheckRightsL(
   106     const TDesC& aUniqueId, 
   106     const TDesC& aUniqueId,
   107     ContentAccess::TIntent aIntent,
   107     ContentAccess::TIntent aIntent,
   108     DRM::TDrmRightsInfo& aDetails )
   108     DRM::TDrmRightsInfo& aDetails )
   109     {
   109     {
   110     iImplementation->CheckRightsL( aUniqueId, aIntent, aDetails );    
   110     iImplementation->CheckRightsL( aUniqueId, aIntent, aDetails );
   111     }
   111     }
   112 
   112 
   113 // -----------------------------------------------------------------------------
   113 // -----------------------------------------------------------------------------
   114 // CDrmRightsInfo::CheckRightsL
   114 // CDrmRightsInfo::CheckRightsL
   115 // Asyncronous method
   115 // Asyncronous method
   116 // -----------------------------------------------------------------------------
   116 // -----------------------------------------------------------------------------
   117 //	
   117 //
   118 EXPORT_C TInt DRM::CDrmRightsInfo::CheckRightsAsyncL( 
   118 EXPORT_C TInt DRM::CDrmRightsInfo::CheckRightsAsyncL(
   119     const TDesC& aUniqueId, 
   119     const TDesC& aUniqueId,
   120     ContentAccess::TIntent aIntent,
   120     ContentAccess::TIntent aIntent,
   121     DRM::TDrmRightsInfo& aDetails,
   121     DRM::TDrmRightsInfo& aDetails,
   122     DRM::MDrmAsyncObserver& aObserver )
   122     DRM::MDrmAsyncObserver& aObserver )
   123     {
   123     {
   124     TInt operation = iImplementation->CheckRightsAsyncL( aUniqueId, 
   124     TInt operation = iImplementation->CheckRightsAsyncL( aUniqueId,
   125                                                          aIntent, 
   125                                                          aIntent,
   126                                                          aDetails, 
   126                                                          aDetails,
   127                                                          aObserver );
   127                                                          aObserver );
   128     return operation;                                                
   128     return operation;
   129     }
   129     }
   130 
   130 
   131 // -----------------------------------------------------------------------------
   131 // -----------------------------------------------------------------------------
   132 // CDrmRightsInfo::CancelOperation
   132 // CDrmRightsInfo::CancelOperation
   133 // Cancels the operation
   133 // Cancels the operation
   135 // -----------------------------------------------------------------------------
   135 // -----------------------------------------------------------------------------
   136 //
   136 //
   137 EXPORT_C TInt DRM::CDrmRightsInfo::CancelOperation( TInt aOperationId )
   137 EXPORT_C TInt DRM::CDrmRightsInfo::CancelOperation( TInt aOperationId )
   138     {
   138     {
   139     return iImplementation->CancelOperation( aOperationId );
   139     return iImplementation->CancelOperation( aOperationId );
   140     } 
   140     }
   141 
   141 
   142 //  End of File
   142 //  End of File