diff -r 8cdda00a45da -r 04da681812a9 commondrm/drmrightsmanagerui/inc/DRMRightsMgrAppUi.h --- a/commondrm/drmrightsmanagerui/inc/DRMRightsMgrAppUi.h Wed Apr 14 16:15:06 2010 +0300 +++ b/commondrm/drmrightsmanagerui/inc/DRMRightsMgrAppUi.h Tue Apr 27 16:56:11 2010 +0300 @@ -25,7 +25,9 @@ #include #include #include +#include +#include "drmclockclient.h" #include "DrmViewItems.h" #include "DRMRightsManager.hrh" @@ -173,9 +175,42 @@ void CheckIndividualConstraint( const TDesC8& aContentURI, TBool& aIndividualConstraint, TBool& aUsageAllowed ); - + + /** + * Checks the composition of best rights to be shown in the details view. + * Leaves with KErrNotFound if no rights are found. + * @param aContentURI ContentURI for object to be opened when + * application is launched + * @param aRights Pointer to instance of CDRMRights for + * storing the rights + */ + void FindBestCompositionRightsL( const TDesC8& aContentURI, + CDRMRights*& aRights ); - + /** + * Compares the permissions in the the permission list one by one and + * constraint by constraint and stores the best constraint to the given + * composition permission. The function should be called only for a list of + * valid permissions. Puts the composition permission to cleanup stack. + * @param aCompositionPermission Permission which includes a composition of best + * constraints (or full rights information) from + * the given permission list. + * @param aPermissionList List which includes permissions to be checked + * constraint by constraint in order to create the + * best composition permission. + */ + void CheckBetterPermissionsAndStoreCompositionLC( + CDRMPermission*& aCompositionPermission, + RPointerArray& aList ); + /** + * Compares two permissions, and returns ETrue if aNewOne is more suitable + * for the usage. Assumes both are valid, i.e. not expired. + * @param aNewOne New constraint to be compared to the old one + * @param aOldOne Old constraint to be compared to the new one + */ + TBool BetterPermission( const CDRMConstraint& aNewOne, + const CDRMConstraint& aOldOne ); + public: // New functions /** * @param aContentURI ContentURI for object to be opened when @@ -390,7 +425,10 @@ // update the details view when returning to details view from another // application TBool iForegroundHasBeenActive; - + + // Drm clock client + RDRMClockClient iClockClient; + }; // Include inline functions