drm_plat/roap_api/inc/RoapObserver.h
changeset 0 95b198f216e5
equal deleted inserted replaced
-1:000000000000 0:95b198f216e5
       
     1 /*
       
     2 * Copyright (c) 2002-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:  ROAP observer interface
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef ROAP_OBSERVER_H
       
    21 #define ROAP_OBSERVER_H
       
    22 
       
    23 
       
    24 // FORWARD DECLARATIONS
       
    25 class CDRMRights;
       
    26 
       
    27 // CLASS DECLARATION
       
    28 
       
    29 /**
       
    30 *  An interface containing callback methods for ROAP transaction
       
    31 *
       
    32 *  @since 3.0
       
    33 */
       
    34 
       
    35 namespace Roap
       
    36     {
       
    37     class MRoapObserver
       
    38         {
       
    39         public:
       
    40 
       
    41         /**
       
    42         * ConnectionConfL
       
    43         *
       
    44         * The function is called by ROAP engine when a network connection is to
       
    45         * be established. Return value ETrue indicates to the ROAP engine that
       
    46         * the user consent has been retrieved to create the network connection.
       
    47         *
       
    48         * @since  3.0
       
    49         *
       
    50         * @return ETrue: the network can be establish
       
    51         *         EFalse: the ROAP transaction is canceled
       
    52         *
       
    53         * @leave  System wide error code */
       
    54 
       
    55         virtual TBool ConnectionConfL() = 0;
       
    56 
       
    57         /**
       
    58         * ContactRiConfL
       
    59         *
       
    60         *
       
    61         * @since  3.0
       
    62         *
       
    63         * @return ETrue: the user consent is achieved
       
    64         *         EFalse: the user consent is not achieved
       
    65         *
       
    66         * @leave  System wide error code */
       
    67 
       
    68         virtual TBool ContactRiConfL() = 0;
       
    69 
       
    70         /**
       
    71         * TransIdConfL
       
    72         *
       
    73         * The function is called during RO acquisition when the ROAP engine wants
       
    74         * to perform trasaction tracking. The user conset must be asked before
       
    75         * the operation.
       
    76         *
       
    77         * @since  3.0
       
    78         *
       
    79         * @return ETrue: the user consent is achieved
       
    80         *         EFalse: the user consent is not achieved
       
    81         *
       
    82         * @leave  System wide error code */
       
    83 
       
    84         virtual TBool TransIdConfL() = 0;
       
    85 
       
    86         /**
       
    87         * RightsObjectDetailsL
       
    88         *
       
    89         * The function is called after successful completion of RO acquisition
       
    90         * protocol. The passes information about stored rights objects to the
       
    91         * observer.
       
    92         *
       
    93         * @since  3.0
       
    94         * @param aRightsList: A list of pointers to rights objects.
       
    95         *                     Contents of aRightsList are owend by ROAP engine
       
    96         *
       
    97         * @leave  System wide error code */
       
    98 
       
    99         virtual void RightsObjectDetailsL( const RPointerArray<CDRMRights>& aRightsList ) = 0;
       
   100 
       
   101         /**
       
   102         * ContentDownloadInfoL
       
   103         *
       
   104         * The function is called when the ROAP engine notices that it is about to
       
   105         * receive a multipart content as a ROAP response. The method must return via
       
   106         * out-parameter the path to a temp folder where the content is saved during
       
   107         * download. The name that is used as filename when saving the content to
       
   108         * the appropriate palce and the maximum size of the content (a safety upper limit)
       
   109         * must also be provided via out-parameters.
       
   110         *
       
   111         * @since 3.0
       
   112         * @param aTempFolder: (out-param) The path of the temp folder, or KNullDesC
       
   113         * @param aContentName: (out-param) The name of the content, or KNullDesC (defaut name is used)
       
   114         * @param aMaxSize: (out-param) The maximum size of the content, or -1 if not known
       
   115         *
       
   116         * @leave System wide error code */
       
   117 
       
   118         virtual void ContentDownloadInfoL( TPath& aTempFolder,
       
   119                                            TFileName& aContentName,
       
   120                                            TInt& aMaxSize ) = 0;
       
   121 
       
   122         /**
       
   123         * ContentDetailsL
       
   124         *
       
   125         * The function is called when the ROAP engine has received a DCF content (together
       
   126         * with a ROAP response) The ROAP engine saves the DCF to the appropriate location
       
   127         * and gives out the information about the saved DCF file by calling this method
       
   128         *
       
   129         * @since 3.0
       
   130         * @param aPath: The path andf the filename of the saved DCF file
       
   131         * @param aType: The plain MIME type of the saved DCF file
       
   132         * @param aAppUid: The handler app UID of the saved DCF file
       
   133         *
       
   134         * @leave System wide error code */
       
   135 
       
   136         virtual void ContentDetailsL( const TDesC& aPath,
       
   137                                       const TDesC8& aType,
       
   138                                       const TUid& aAppUid ) = 0;
       
   139 
       
   140         /**
       
   141         * RoapProgressInfoL
       
   142         *
       
   143         * The function provides progress information about ROAP processing to the
       
   144         * observer
       
   145         *
       
   146         * @since  3.0
       
   147         * @param aProgressInfo: An integer value representing the state of
       
   148         *                       ROAP processing, counting in bytes
       
   149         *
       
   150         * @leave  System wide error code */
       
   151 
       
   152         virtual void RoapProgressInfoL( const TInt aProgressInfo ) = 0;
       
   153 
       
   154         /**
       
   155         * ErrorUrlL
       
   156         *
       
   157         * The function is called in ROAP error case and it provides an error URL
       
   158         * for the caller. The calling entity should send an HTTP GET request to
       
   159         * the URL which should then return an HTML page.
       
   160         *
       
   161         * @since  3.0
       
   162         * @param aErrorUrl: The error URL
       
   163         *
       
   164         *
       
   165         * @leave  System wide error code */
       
   166 
       
   167         virtual void ErrorUrlL( const TDesC8& aErrorUrl ) = 0;
       
   168 
       
   169         /**
       
   170         * PostResponseUrlL
       
   171         *
       
   172         * The function is called if handled ROAP metering report response
       
   173         * contains PostResponseURL extension. The calling entity should send
       
   174         * an HTTP GET request to the URL, which should return ROAP trigger,
       
   175         * download descriptor or multipart message containing both
       
   176         * download descriptor and ROAP trigger.
       
   177         *
       
   178         * @since  3.2
       
   179         * @param aPostResponseUrl: The URL to be fetched
       
   180         *                          after handling ROAP metering response
       
   181         *                          with PostResponseURL extension.
       
   182         *
       
   183         *
       
   184         * @leave  System wide error code */
       
   185 
       
   186         virtual void PostResponseUrlL( const TDesC8& aPostResponseUrl ) = 0;
       
   187 
       
   188         };
       
   189     }
       
   190 #endif  // ROAP_OBSERVER_H
       
   191 
       
   192 // End of File