commondrm/drmutility/src/drmuierrorhandling.cpp
changeset 0 95b198f216e5
child 18 8a03a285ab14
equal deleted inserted replaced
-1:000000000000 0:95b198f216e5
       
     1 /*
       
     2 * Copyright (c) 2007 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:  Implementation class that implements the MDrmErrorHandling
       
    15 *                API
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #include "drmuierrorhandling.h"
       
    21 #include "drmuihandlingimpl.h"
       
    22 
       
    23 // ---------------------------------------------------------------------------
       
    24 // Constructor
       
    25 // ---------------------------------------------------------------------------
       
    26 //
       
    27 DRM::CDrmUiErrorHandling::CDrmUiErrorHandling()
       
    28     {
       
    29     }
       
    30 
       
    31 // ---------------------------------------------------------------------------
       
    32 // CDrmUiErrorHandling::ConstructL
       
    33 // Second phase constructor
       
    34 // ---------------------------------------------------------------------------
       
    35 //
       
    36 void DRM::CDrmUiErrorHandling::ConstructL( DRM::CDrmUiHandlingImpl* aImplementation )
       
    37     {
       
    38     iImplementation = aImplementation;
       
    39     }
       
    40 
       
    41 // ---------------------------------------------------------------------------
       
    42 // Two-phased constructor
       
    43 // ---------------------------------------------------------------------------
       
    44 //
       
    45 EXPORT_C DRM::CDrmUiErrorHandling* DRM::CDrmUiErrorHandling::NewL(
       
    46     DRM::CDrmUiHandlingImpl* aImplementation )
       
    47     {
       
    48     DRM::CDrmUiErrorHandling* self( NewLC( aImplementation ) );
       
    49     CleanupStack::Pop( self );
       
    50     return self;
       
    51     }
       
    52 
       
    53 
       
    54 // ---------------------------------------------------------------------------
       
    55 // Two-phased constructor
       
    56 // ---------------------------------------------------------------------------
       
    57 //
       
    58 EXPORT_C DRM::CDrmUiErrorHandling* DRM::CDrmUiErrorHandling::NewLC(
       
    59     DRM::CDrmUiHandlingImpl* aImplementation )
       
    60     {
       
    61     DRM::CDrmUiErrorHandling* self( new( ELeave ) CDrmUiErrorHandling );
       
    62     CleanupStack::PushL( self );
       
    63     self->ConstructL( aImplementation );
       
    64     return self;
       
    65     }
       
    66 
       
    67 
       
    68 // ---------------------------------------------------------------------------
       
    69 // Destructor
       
    70 // ---------------------------------------------------------------------------
       
    71 //
       
    72 DRM::CDrmUiErrorHandling::~CDrmUiErrorHandling()
       
    73     {
       
    74     }
       
    75 
       
    76 // ---------------------------------------------------------------------------
       
    77 // CDrmUiErrorHandling::HandleErrorAsyncL
       
    78 // RFile based method
       
    79 // ---------------------------------------------------------------------------
       
    80 //
       
    81 EXPORT_C TInt DRM::CDrmUiErrorHandling::HandleErrorAsyncL( 
       
    82     RFile& aFile,
       
    83     ContentAccess::TIntent aIntent, 
       
    84     TInt aError, 
       
    85     DRM::MDrmHandleErrorObserver& aObserver )
       
    86     {
       
    87     TInt operation = iImplementation->HandleErrorAsyncL( aFile, 
       
    88                                                          aIntent, 
       
    89                                                          aError, 
       
    90                                                          aObserver);
       
    91     return operation;                                           
       
    92     }
       
    93         
       
    94 // ---------------------------------------------------------------------------
       
    95 // CDrmUiErrorHandling::HandleErrorL
       
    96 // RFile based method
       
    97 // ---------------------------------------------------------------------------
       
    98 //
       
    99 EXPORT_C void DRM::CDrmUiErrorHandling::HandleErrorL( 
       
   100     RFile& aFile,
       
   101     ContentAccess::TIntent aIntent,              
       
   102     TInt aError, 
       
   103     DRM::MDrmHandleErrorObserver* aObserver )
       
   104     {
       
   105     iImplementation->HandleErrorL( aFile, 
       
   106                                    aIntent, 
       
   107                                    aError, 
       
   108                                    aObserver);
       
   109     }
       
   110 
       
   111 // ---------------------------------------------------------------------------
       
   112 // CDrmUiErrorHandling::HandleErrorAsyncL
       
   113 // ContentAccess::CData based method
       
   114 // ---------------------------------------------------------------------------
       
   115 //
       
   116 EXPORT_C TInt DRM::CDrmUiErrorHandling::HandleErrorAsyncL( 
       
   117     ContentAccess::CData& aFile,
       
   118     ContentAccess::TIntent aIntent,
       
   119     TInt aError, 
       
   120     DRM::MDrmHandleErrorObserver& aObserver )
       
   121     {
       
   122     TInt operation = iImplementation->HandleErrorAsyncL( aFile, 
       
   123                                                          aIntent, 
       
   124                                                          aError, 
       
   125                                                          aObserver);
       
   126     return operation;     
       
   127     }
       
   128     
       
   129 // ---------------------------------------------------------------------------
       
   130 // CDrmUiErrorHandling::HandleErrorL
       
   131 // ContentAccess::CData based method
       
   132 // ---------------------------------------------------------------------------
       
   133 //
       
   134 EXPORT_C void DRM::CDrmUiErrorHandling::HandleErrorL( 
       
   135     ContentAccess::CData& aFile,
       
   136     ContentAccess::TIntent aIntent,
       
   137     TInt aError, 
       
   138     DRM::MDrmHandleErrorObserver* aObserver )
       
   139     {
       
   140     iImplementation->HandleErrorL( aFile, 
       
   141                                    aIntent, 
       
   142                                    aError, 
       
   143                                    aObserver);    
       
   144     }
       
   145 
       
   146 
       
   147 
       
   148 // End of File
       
   149