photosgallery/viewframework/drmutility/inc/glxdrmutility.h
branchRCL_3
changeset 18 78ad99c24f08
parent 13 bcb43dc84c44
equal deleted inserted replaced
17:a60acebbbd9d 18:78ad99c24f08
    27 #define C_GLXDRMUTILITY_H
    27 #define C_GLXDRMUTILITY_H
    28 
    28 
    29 // INCLUDES
    29 // INCLUDES
    30 
    30 
    31 #include <e32base.h>
    31 #include <e32base.h>
    32 
    32 #include <f32file.h>
    33 // FORWARD DECLARATIONS
    33 // FORWARD DECLARATIONS
    34 
    34 
    35 class CDRMHelper;
    35 class CDRMHelper;
    36 
    36 
    37 namespace ContentAccess
    37 namespace ContentAccess
    88      * @param aUri URI of the media item.
    88      * @param aUri URI of the media item.
    89      * @param aCheckViewRights, check view rights if true, play if false
    89      * @param aCheckViewRights, check view rights if true, play if false
    90      * @return ETrue if valid rights exist for the media item.
    90      * @return ETrue if valid rights exist for the media item.
    91      */
    91      */
    92     IMPORT_C TBool ItemRightsValidityCheckL(const TDesC& aUri, TBool aCheckViewRights);
    92     IMPORT_C TBool ItemRightsValidityCheckL(const TDesC& aUri, TBool aCheckViewRights);
       
    93     
       
    94     /**
       
    95      * Check whether DRM rights are valid for specified item
       
    96      * is called before right is consumed and for all items (focused or unfocused).
       
    97      * 
       
    98      * @param filehandle of the media item.
       
    99      * @param aCheckViewRights, check view rights if true, play if false
       
   100      * @return ETrue if valid rights exist for the media item.
       
   101      */
       
   102     IMPORT_C TBool ItemRightsValidityCheckL(RFile& aFileHandle, TBool aCheckViewRights);
    93 
   103 
    94     /**
   104     /**
    95      * Check whether DRM rights are valid for specified item
   105      * Check whether DRM rights are valid for specified item
    96      * If the rights were just consumed, then allow to display
   106      * If the rights were just consumed, then allow to display
    97      * Otherwise, obtain current rights
   107      * Otherwise, obtain current rights
   100      * @param aUri URI of the media item.
   110      * @param aUri URI of the media item.
   101      * @param aCheckViewRights, check view rights if true, play if false
   111      * @param aCheckViewRights, check view rights if true, play if false
   102      * @return ETrue if valid rights exist for the media item.
   112      * @return ETrue if valid rights exist for the media item.
   103      */
   113      */
   104     IMPORT_C TBool DisplayItemRightsCheckL(const TDesC& aUri, TBool aCheckViewRights);
   114     IMPORT_C TBool DisplayItemRightsCheckL(const TDesC& aUri, TBool aCheckViewRights);
       
   115     
       
   116     /**
       
   117      * Check whether DRM rights are valid for specified item
       
   118      * If the rights were just consumed, then allow to display
       
   119      * Otherwise, obtain current rights
       
   120      * is called after right is consumed and for only focused/displayed item.
       
   121      * 
       
   122      * @param filehandle of the media item.
       
   123      * @param aCheckViewRights, check view rights if true, play if false
       
   124      * @return ETrue if valid rights exist for the media item.
       
   125      */
       
   126     IMPORT_C TBool DisplayItemRightsCheckL(RFile& aFileHandle, TBool aCheckViewRights);
   105     
   127     
   106     /**
   128     /**
   107       * Consume rights for specified item
   129       * Consume rights for specified item
   108       * Caches item so that a client has right to display the item
   130       * Caches item so that a client has right to display the item
   109       *
   131       *
   110       * @param aUri URI for item
   132       * @param aUri URI for item
   111       * @return ETrue to no error in rights consumption
   133       * @return ETrue to no error in rights consumption
   112       */
   134       */
   113     IMPORT_C TBool ConsumeRightsL(const TDesC& aUri);
   135     IMPORT_C TBool ConsumeRightsL(const TDesC& aUri);
       
   136     
       
   137     /**
       
   138       * Consume rights for specified item
       
   139       * Caches item so that a client has right to display the item
       
   140       *
       
   141       * @param  Filehandle for item
       
   142       * @return ETrue to no error in rights consumption
       
   143       */
       
   144     IMPORT_C TBool ConsumeRightsL(RFile& aFileHandle);
   114 
   145 
   115     /**
   146     /**
   116      * Clears Last Consumed Uri
   147      * Clears Last Consumed Uri
   117      */
   148      */
   118     IMPORT_C void ClearLastConsumedItemUriL();
   149     IMPORT_C void ClearLastConsumedItemUriL();
   151      * @param aUri URI of the media item.
   182      * @param aUri URI of the media item.
   152      */
   183      */
   153     IMPORT_C void ShowDRMDetailsPaneL(const TDesC& aUri);
   184     IMPORT_C void ShowDRMDetailsPaneL(const TDesC& aUri);
   154     
   185     
   155     /**
   186     /**
       
   187      * Show DRM details for specified item.
       
   188      * @param Filehandle of the media item.
       
   189      */
       
   190     IMPORT_C void ShowDRMDetailsPaneL(RFile& aFileHandle);
       
   191     
       
   192     /**
   156       * Ask DRM manager if file is forward locked
   193       * Ask DRM manager if file is forward locked
   157       */
   194       */
   158     IMPORT_C TBool IsForwardLockedL(const TDesC& aUri);
   195     IMPORT_C TBool IsForwardLockedL(const TDesC& aUri);
   159     
   196     
   160     /**
   197     /**
   161       * Show rights info
   198       * Show rights info
   162       * @param aUri URI of the media item.
   199       * @param aUri URI of the media item.
   163       */
   200       */
   164     IMPORT_C void ShowRightsInfoL(const TDesC& aUri);
   201     IMPORT_C void ShowRightsInfoL(const TDesC& aUri);
       
   202     
       
   203     /**
       
   204       * Show rights info
       
   205       * @param filehandle of the media item.
       
   206       */
       
   207     IMPORT_C void ShowRightsInfoL(RFile& aFileHandle);
   165     
   208     
   166     /**
   209     /**
   167       * Get size of thumbnail to be requested for DRM invalid item
   210       * Get size of thumbnail to be requested for DRM invalid item
   168       * @param aSize size of image
   211       * @param aSize size of image
   169       * @return suggested thumbnail size (1/4 of original size)
   212       * @return suggested thumbnail size (1/4 of original size)