# HG changeset patch # User Dario Sestito # Date 1279025873 -3600 # Node ID 5816b2634c8a39f4bac05c5bdcdccc587ba70c19 # Parent ad2863178d170183d99ebb14cdc4d1f89b65b39f# Parent bd9b181e836ad2990a48060c10fe16eafe1210d9 Re-merge fixes for bug 1993 and bug 2121 diff -r bd9b181e836a -r 5816b2634c8a commondrm/drmrightsmanagerui/data/DRMRightsManager.rss --- a/commondrm/drmrightsmanagerui/data/DRMRightsManager.rss Fri May 28 13:54:35 2010 +0100 +++ b/commondrm/drmrightsmanagerui/data/DRMRightsManager.rss Tue Jul 13 13:57:53 2010 +0100 @@ -74,7 +74,7 @@ caption_and_icon = CAPTION_AND_ICON_INFO { - caption = qtn_drm_mgr; + caption = " "; #ifdef __SCALABLE_ICONS number_of_icons = 1; diff -r bd9b181e836a -r 5816b2634c8a commondrm/drmrightsmanagerui/inc/DRMRightsMgrAppUi.h --- a/commondrm/drmrightsmanagerui/inc/DRMRightsMgrAppUi.h Fri May 28 13:54:35 2010 +0100 +++ b/commondrm/drmrightsmanagerui/inc/DRMRightsMgrAppUi.h Tue Jul 13 13:57:53 2010 +0100 @@ -25,9 +25,9 @@ #include #include #include -#include +#include -#include "drmclockclient.h" +#include "DRMClockClient.h" #include "DrmViewItems.h" #include "DRMRightsManager.hrh" diff -r bd9b181e836a -r 5816b2634c8a commondrm/drmrightsmanagerui/loc/DRMRightsManager.loc --- a/commondrm/drmrightsmanagerui/loc/DRMRightsManager.loc Fri May 28 13:54:35 2010 +0100 +++ b/commondrm/drmrightsmanagerui/loc/DRMRightsManager.loc Tue Jul 13 13:57:53 2010 +0100 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2003 - 2008 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2003 - 2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" @@ -22,7 +22,7 @@ //w: //r:3.0 // -#define qtn_drm_mgr_view_det "Licence details" +#define qtn_drm_mgr_view_det "License details" //d:Command in options menu. //l:list_single_pane_t1_cp2 @@ -44,42 +44,42 @@ //w: //r:3.0 // -#define qtn_drm_mgr_restore "Restore licences" +#define qtn_drm_mgr_restore "Restore licenses" //d:Caption and short caption. "Activ." stands for "Activation" //l:cell_app_pane_t1 //w: //r:3.0 // -#define qtn_drm_mgr "Licences" +#define qtn_drm_mgr "Licenses" //d:Title pane text in main view //l:title_pane_t2/opt9 //w: //r:3.0 // -#define qtn_drm_mgr_title_pane "Licences" +#define qtn_drm_mgr_title_pane "Licenses" //d:Error message //l:popup_note_window //w: //r:3.0 // -#define qtn_drm_mgr_query_restart "Unable to access licences. Phone will restart. Continue?" +#define qtn_drm_mgr_query_restart "Unable to access licenses. Phone will restart. Continue?" //d:Error message //l:popup_note_window //w: //r:3.0 // -#define qtn_drm_mgr_note_backup "Unable to access licences. Licence list should be restored." +#define qtn_drm_mgr_note_backup "Unable to access licenses. License list should be restored." //d:Empty text in listbox //l:main_list_empty_pane //w: //r:3.0 // -#define qtn_drm_mgr_no_files "no licences" +#define qtn_drm_mgr_no_files "no licenses" //d:Text to be used when related Media Object is not found in device //d:%N is a progressive number @@ -103,14 +103,14 @@ //w: //r:3.0 // -#define qtn_drm_mgr_det_valid "Licence is valid" +#define qtn_drm_mgr_det_valid "License is valid" //d:Possible second line for first entry of Details View listbox //l:list_double_pane_t2_cp2 //w: //r:3.0 // -#define qtn_drm_mgr_det_exp "Licence expired" +#define qtn_drm_mgr_det_exp "License expired" //d:First line of 'Content in phone' entry in Details View listbox. //d:It says if related Media Object is in device or not. If Media object is in device and not in a private @@ -575,7 +575,7 @@ //w: //r:3.0 // -#define qtn_drm_mgr_auto_del_romo "If you delete licence, %U will also be deleted. Continue?" +#define qtn_drm_mgr_auto_del_romo "If you delete license, %U will also be deleted. Continue?" //d:Confirmation query text used when deleting a Right Object //d:%U name of the file @@ -583,7 +583,7 @@ //w: //r:3.0 // -#define qtn_drm_mgr_del_single_ro "If you delete licence, file %U cannot be used. Continue?" +#define qtn_drm_mgr_del_single_ro "If you delete license, file %U cannot be used. Continue?" //d:Confirmation query text proposed to ask if also related file should be deleted //d:%U name of the file @@ -599,7 +599,7 @@ //w: //r:3.0 // -#define qtn_drm_mgr_wait_del_one_ro "Deleting licence for %U" +#define qtn_drm_mgr_wait_del_one_ro "Deleting license for %U" //d:Text during deletion //d:%U name of the file @@ -607,7 +607,7 @@ //w: //r:3.0 // -#define qtn_drm_mgr_wait_del_roco "Deleting %U and licence" +#define qtn_drm_mgr_wait_del_roco "Deleting %U and license" //d:Notification after deletion //d:%U name of the file @@ -615,7 +615,7 @@ //w: //r:3.0 // -#define qtn_drm_mgr_deleted_one_ro "Licence for %U deleted" +#define qtn_drm_mgr_deleted_one_ro "License for %U deleted" //d:Notification after deletion //d:%U name of the file @@ -623,7 +623,7 @@ //w: //r:3.0 // -#define qtn_drm_mgr_deleted_roco "Licence and %U deleted" +#define qtn_drm_mgr_deleted_roco "License and %U deleted" //d:Confirmation query text //d:%U name of the file @@ -639,7 +639,7 @@ //w: //r:3.0 // -#define qtn_drm_mgr_note_ro_removed "Unable to access licence" +#define qtn_drm_mgr_note_ro_removed "Unable to access license" // NEW STRINGS @@ -649,14 +649,14 @@ //w: //r:3.0 // -#define qtn_drm_mgr_list_valid_keys "Valid licences" +#define qtn_drm_mgr_list_valid_keys "Valid licenses" //d:Second item data text of Main View //l:list_single_large_graphic_pane_t1_cp2 //w: //r:3.0 // -#define qtn_drm_mgr_list_invalid_keys "Invalid licences" +#define qtn_drm_mgr_list_invalid_keys "Invalid licenses" //d:Third item data text of Main View //l:list_single_large_graphic_pane_t1_cp2 @@ -670,7 +670,7 @@ //w: //r:3.0 // -#define qtn_drm_mgr_del_group_ro_descr "After deleting the licence, several files may not be used" +#define qtn_drm_mgr_del_group_ro_descr "After deleting the license, several files may not be used" //d:Title of the list query //l:heading_pane_t1 @@ -691,14 +691,14 @@ //w: //r:3.0 // -#define qtn_drm_mgr_delete_group_ro "Delete licence to the files" +#define qtn_drm_mgr_delete_group_ro "Delete license to the files" //d:Notification after deletion //l:popup_note_window //w: //r:3.0 // -#define qtn_drm_mgr_deleted_ro "Licence deleted" +#define qtn_drm_mgr_deleted_ro "License deleted" //d:Data query prompt text When renaming an item //l:popup_query_data_window @@ -713,21 +713,21 @@ //w: //r:3.0 // -#define qtn_drm_mgr_title_valid_keys "Valid licences" +#define qtn_drm_mgr_title_valid_keys "Valid licenses" //d:Title pane text for Invalid keys View //l:title_pane_t2/opt9 //w: //r:3.0 // -#define qtn_drm_mgr_title_invalid_keys "Invalid licences" +#define qtn_drm_mgr_title_invalid_keys "Invalid licenses" //d:Title pane text for Keys not in use View //l:title_pane_t2/opt9 //w: //r:3.0 // -#define qtn_drm_mgr_title_keys_not_used "Licences not in use" +#define qtn_drm_mgr_title_keys_not_used "Licenses not in use" //d:Empty text in listbox //l:main_list_empty_pane @@ -744,7 +744,7 @@ //w: //r:3.0 // -#define qtn_drm_mgr_name_group_key "Group licence %N" +#define qtn_drm_mgr_name_group_key "Group license %N" //d:Menu item used in Group view to see the details of a Media Object. //l:list_single_pane_t1_cp2 @@ -786,7 +786,7 @@ //w: //r:3.0 // -#define qtn_drm_det_ro_number "Licence %0N/%1N" +#define qtn_drm_det_ro_number "License %0N/%1N" //d:Possible second line for first entry (qtn_drm_mgr_det_stat) of Details View //d:listbox, when the activation key is missing. @@ -794,7 +794,7 @@ //w: //r:3.0 // -#define qtn_drm_mgr_det_invalid "Licence is invalid" +#define qtn_drm_mgr_det_invalid "License is invalid" //d:Possible second line for first entry (qtn_drm_det_ro_number) of Details //d:View listbox, when the activation key is not yet valid. @@ -802,7 +802,7 @@ //w: //r:3.0 // -#define qtn_drm_mgr_det_not_valid_yet "Licence not valid yet" +#define qtn_drm_mgr_det_not_valid_yet "License not valid yet" //d:Command in options menu, used to rename a Group key. //l:list_single_pane_t1_cp2 @@ -838,7 +838,7 @@ //w: //r:3.0 // -#define qtn_drm_mgr_info_unable_delete "Licence lists are updated. Unable to delete during updating." +#define qtn_drm_mgr_info_unable_delete "License lists are updated. Unable to delete during updating." //d:Info popup for an activation key with future rights. %U is the date when //d:the activation key will start to be valid @@ -846,7 +846,7 @@ //w: //r:3.0 // -#define qtn_drm_mgr_info_popup_future "Licence is valid from %U" +#define qtn_drm_mgr_info_popup_future "License is valid from %U" //d:Possible first line for fourth entry of Details View listbox //d:Second line is qtn_drm_mgr_det_inter or qtn_drm_mgr_det_inter_two, meaning @@ -862,7 +862,7 @@ //l:popup_note_window //r:3.0 // -#define qtn_drm_mgr_query_enable_keys "Restore licences and enable on this phone?" +#define qtn_drm_mgr_query_enable_keys "Restore licenses and enable on this phone?" //d:Progress dialog text //d:Label for UDT progress note until HTTP connection has been estabilished @@ -883,7 +883,7 @@ //l:popup_note_wait_window //r:3.0 // -#define qtn_drm_mgr_prgr_restoring_keys "Restoring licences" +#define qtn_drm_mgr_prgr_restoring_keys "Restoring licenses" //d:Text for password editor in multiline query @@ -919,7 +919,7 @@ //l:popup_note_window //r:3.0 // -#define qtn_drm_mgr_info_no_backup_ros "No licences to restore" +#define qtn_drm_mgr_info_no_backup_ros "No licenses to restore" //d:Information note layout //d:Server unavailable @@ -933,7 +933,7 @@ //w: //r:3.1 // -#define qtn_drm_mgr_options_get_new_key "Get new licence" +#define qtn_drm_mgr_options_get_new_key "Get new license" //d:Confirmation query text //d:Shown when user has selected option Get new key, but valid, unlimited rights exist @@ -941,7 +941,7 @@ //w: //r:3.1 // -#define qtn_drm_mgr_query_unlimited_ro "Licence is valid for unlimited time. Get still new licence?" +#define qtn_drm_mgr_query_unlimited_ro "License is valid for unlimited time. Get still new license?" //d:First line of an entry of Details View listbox, for an individual constraint. //d:Second line is qtn_drm_det_sim_allowed or qtn_drm_det_sim_not_allowed. @@ -1023,7 +1023,7 @@ //w: //r:9.1 // -#define qtn_drm_details_valid "Licence is valid" +#define qtn_drm_details_valid "License is valid" //d:Possible second line for first entry of Details View listbox //l:list_double_pane_t2_cp2 @@ -1037,7 +1037,7 @@ //w: //r:9.1 // -#define qtn_drm_details_no_licence_available "No licence available" +#define qtn_drm_details_no_licence_available "No license available" //d:First line of third entry of Details View listbox //d:It reports if it is possible to send Media Object or not. diff -r bd9b181e836a -r 5816b2634c8a commondrm/drmutility/inc/DrmUiHandlingImpl.h --- a/commondrm/drmutility/inc/DrmUiHandlingImpl.h Fri May 28 13:54:35 2010 +0100 +++ b/commondrm/drmutility/inc/DrmUiHandlingImpl.h Tue Jul 13 13:57:53 2010 +0100 @@ -817,7 +817,7 @@ * CallSilentAvailble after right * @return Etrue, if silent RO rerieval led to usable content */ - TBool CDrmUiHandlingImpl::GetSilentAndCallL( + TBool GetSilentAndCallL( MDrmHandleErrorObserver* aObserver, TInt aOperationId, const ContentAccess::TIntent aIntent, @@ -830,7 +830,7 @@ * checks status if launched embedded. * CallRightsAvailable, if launched embedded or righsUrl not present */ - void CDrmUiHandlingImpl::GetRightsAndCallL( + void GetRightsAndCallL( MDrmHandleErrorObserver* aObserver, TInt aOperationId, const ContentAccess::TIntent aIntent, diff -r bd9b181e836a -r 5816b2634c8a commondrm/drmutility/loc/DRMUtility.loc --- a/commondrm/drmutility/loc/DRMUtility.loc Fri May 28 13:54:35 2010 +0100 +++ b/commondrm/drmutility/loc/DRMUtility.loc Tue Jul 13 13:57:53 2010 +0100 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" @@ -74,7 +74,7 @@ //w: //r: 3.0 // -#define qtn_drm_query_waiting_for_ro "Waiting for licence. Try again later." +#define qtn_drm_query_waiting_for_ro "Waiting for license. Try again later." //d: Text in confirmation query that is displayed when user tries to render MO that is missing RO. //d: The waiting time of RO to arrive has passed, and there is no possibility to get new RO (no rights @@ -83,7 +83,7 @@ //w: //r: 3.0 // -#define qtn_drm_query_ro_late "Licence not yet received. Expected time of delivery elapsed." +#define qtn_drm_query_ro_late "License not yet received. Expected time of delivery elapsed." //d: Text in confirmation query that is displayed when user tries to render MO that is missing RO. //d: The waiting time of RO to arrive has passed, and there is possibility to get new RO (rights issuer url exists). @@ -91,7 +91,7 @@ //w: //r: 3.0 // -#define qtn_drm_query_ro_late_activate "Licence not yet received. Expected time of delivery elapsed. Get new licence?" +#define qtn_drm_query_ro_late_activate "License not yet received. Expected time of delivery elapsed. Get new license?" //d: Text in confirmation query when user is asked about updating account. //d: Device is already connected to network, but must upgrade the domain key before rendering, @@ -138,7 +138,7 @@ //w: //r: // -#define qtn_drm_query_valid_rights_until "Licence for selected item valid until %U. Continue?" +#define qtn_drm_query_valid_rights_until "License for selected item valid until %U. Continue?" //d: Text in confirmation query //l: popup_note_window @@ -166,4 +166,4 @@ //w: //r: 9.2 // -#define qtn_drm_sync_with_pc "You must have valid license to play %U. Please sync your phone with your PC to update license." +#define qtn_drm_query_expired_connect_pc "You must have valid license to play %U. Please sync your phone with your PC to update license." diff -r bd9b181e836a -r 5816b2634c8a drm_plat/dcf_repository_api/inc/DcfRep.h --- a/drm_plat/dcf_repository_api/inc/DcfRep.h Fri May 28 13:54:35 2010 +0100 +++ b/drm_plat/dcf_repository_api/inc/DcfRep.h Tue Jul 13 13:57:53 2010 +0100 @@ -23,8 +23,8 @@ // INCLUDES #include #include -#include -#include "dcfrepcli.h" +#include +#include "DcfRepCli.h" // CONSTANTS // MACROS // DATA TYPES diff -r bd9b181e836a -r 5816b2634c8a drm_plat/drm_common_api/inc/DRMCommon.h --- a/drm_plat/drm_common_api/inc/DRMCommon.h Fri May 28 13:54:35 2010 +0100 +++ b/drm_plat/drm_common_api/inc/DRMCommon.h Tue Jul 13 13:57:53 2010 +0100 @@ -21,7 +21,7 @@ #define DRMCOMMON_H #include -#include +#include #include const TUint KDrmMaxContentInfoSize = 512; diff -r bd9b181e836a -r 5816b2634c8a drm_plat/drm_common_api/tsrc/data/mmc/DRM/content.dcf diff -r bd9b181e836a -r 5816b2634c8a drm_plat/drm_rights_api/inc/DcfCommon.h --- a/drm_plat/drm_rights_api/inc/DcfCommon.h Fri May 28 13:54:35 2010 +0100 +++ b/drm_plat/drm_rights_api/inc/DcfCommon.h Tue Jul 13 13:57:53 2010 +0100 @@ -23,8 +23,8 @@ // INCLUDES #include #include -#include -#include +#include +#include using namespace ContentAccess; // CONSTANTS diff -r bd9b181e836a -r 5816b2634c8a drm_plat/drm_rights_api/tsrc/data/c/content.dcf diff -r bd9b181e836a -r 5816b2634c8a drm_plat/drm_service_api/inc/drmserviceapi.h --- a/drm_plat/drm_service_api/inc/drmserviceapi.h Fri May 28 13:54:35 2010 +0100 +++ b/drm_plat/drm_service_api/inc/drmserviceapi.h Tue Jul 13 13:57:53 2010 +0100 @@ -21,7 +21,7 @@ #define C_CDRMSERVICEAPI_H #include -#include "drmtypes.h" +#include "DRMTypes.h" // Forward declarations class RDRMClockClient; diff -r bd9b181e836a -r 5816b2634c8a drm_plat/wmdrm_ota_access_api/inc/wmdrmotaaccess.h --- a/drm_plat/wmdrm_ota_access_api/inc/wmdrmotaaccess.h Fri May 28 13:54:35 2010 +0100 +++ b/drm_plat/wmdrm_ota_access_api/inc/wmdrmotaaccess.h Tue Jul 13 13:57:53 2010 +0100 @@ -28,7 +28,9 @@ * Functionality * * @code -* // Way to use CWmDrmOtaAccess +* Only one asynchronous operation can be happening at a time. +* If another call for async operation is received, this will result in +* KErrInUse leave code. * * CWmDrmOtaAccess* access( CWmDrmOtaAccess::NewL() ); * delete access; @@ -104,6 +106,17 @@ */ IMPORT_C void HandleLicenseResponseL( const TDesC8& aResponse, TRequestStatus& aStatus ); + + + /** + * CancelAllAsync + * + * Cancel all async methods + * + * @return None + */ + IMPORT_C void CancelAllAsync(); + private: /** Default constructor */ @@ -116,3 +129,4 @@ }; #endif // _WMDRM_OTA_ACCESS_API_H_ + diff -r bd9b181e836a -r 5816b2634c8a drm_plat/wmdrm_ota_access_api/inc/wmdrmotaaccessecominterface.h --- a/drm_plat/wmdrm_ota_access_api/inc/wmdrmotaaccessecominterface.h Fri May 28 13:54:35 2010 +0100 +++ b/drm_plat/wmdrm_ota_access_api/inc/wmdrmotaaccessecominterface.h Tue Jul 13 13:57:53 2010 +0100 @@ -22,9 +22,9 @@ #include // Class declaration -// CWmDrmAccessEcomInterface -// ecom plugin interface for WM DRM access implementation -// @see CWmDrmAccess +// CWmDrmOtaAccessEcomInterface +// ecom plugin interface for WM DRM ota access implementation +// @see CWmDrmOtaAccess NONSHARABLE_CLASS( CWmDrmOtaAccessEcomInterface ) : public CBase { public: @@ -94,6 +94,16 @@ */ virtual void HandleLicenseResponseL( const TDesC8& aResponse, TRequestStatus& aStatus ) = 0; + + /** + * CancelAllAsync + * + * Cancel all async methods + * + * @return None + */ + virtual void CancelAllAsync() = 0; + private: // internal variable used on freeing ecom related resources @@ -101,4 +111,6 @@ }; #include "wmdrmotaaccessecominterface.inl" + #endif _WMDRMOTAACCESSECOMINTERFACE_H_ + diff -r bd9b181e836a -r 5816b2634c8a drm_pub/drm_helper_api/loc/DRMCommon.loc --- a/drm_pub/drm_helper_api/loc/DRMCommon.loc Fri May 28 13:54:35 2010 +0100 +++ b/drm_pub/drm_helper_api/loc/DRMCommon.loc Tue Jul 13 13:57:53 2010 +0100 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2005 - 2008 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2005 - 2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" @@ -52,7 +52,7 @@ //w: //r: // -#define qtn_drm_gen_rights_exp "Licence expired for some of the selected objects" +#define qtn_drm_gen_rights_exp "License expired for some of the selected objects" //d: Text in information note //l: popup_note_window @@ -66,7 +66,7 @@ //w: //r: // -#define qtn_drm_mgr_det_exp "Licence expired" +#define qtn_drm_mgr_det_exp "License expired" //d: Text in message query //d: %N is number of deleted objects @@ -152,14 +152,14 @@ //w: //r: // -#define qtn_drm_cnt_or_dt_exp_multi "Licence will expire for some of the selected objects" +#define qtn_drm_cnt_or_dt_exp_multi "License will expire for some of the selected objects" //d: Text in confirmation query //l: popup_note_window //w: //r: // -#define qtn_drm_sd_rights_exp "Licence expired. Get new licence to unlock file?" +#define qtn_drm_sd_rights_exp "License expired. Get new license to unlock file?" //d: Text in confirmation query //d: %U is name of the media object @@ -182,7 +182,7 @@ //w: //r: // -#define qtn_drm_query_valid_rights_until "Licence for selected item valid until %U. Continue?" +#define qtn_drm_query_valid_rights_until "License for selected item valid until %U. Continue?" //d: Text in confirmation query when content with inactive interval rights is set as automated content. //d: %U is calculated expiration date of rights object, if rights are activated @@ -198,7 +198,7 @@ //w: //r: // -#define qtn_drm_note_cd_ro_expired "Licence for %U expired" +#define qtn_drm_note_cd_ro_expired "License for %U expired" //d: Text in confirmation note when superdistributable automated content has expired. //d: %U is name of the content @@ -206,7 +206,7 @@ //w: //r: // -#define qtn_drm_note_sd_ro_expired "Licence for %U expired. Get new licence to unlock file?" +#define qtn_drm_note_sd_ro_expired "License for %U expired. Get new license to unlock file?" //d: Text in information note when usage rights are not yet valid. //d: %U is start date of rights object @@ -214,14 +214,14 @@ //w: //r: 2.6 // -#define qtn_drm_note_ro_valid_on_future "Licence valid from %U" +#define qtn_drm_note_ro_valid_on_future "License valid from %U" //d:Possible second line for first entry of Details View listbox //l:list_double_pane_t2_cp2 //w: //r:3.0 // -#define qtn_drm_mgr_det_valid "Licence is valid" +#define qtn_drm_mgr_det_valid "License is valid" //d: Text in information note shown when removing device from account failed. //l: popup_note_window @@ -250,7 +250,7 @@ //w: //r: 3.0 // -#define qtn_drm_info_act_key_received "Licence received" +#define qtn_drm_info_act_key_received "License received" //d: Text in information note shown when getting rights object has failed. //d: Reason is permanent device or server error and there is no possibility to retry. @@ -258,7 +258,7 @@ //w: //r: 3.0 // -#define qtn_drm_info_getting_key_failed "Unable to get licence" +#define qtn_drm_info_getting_key_failed "Unable to get license" //d: Text in confirmation note shown when device has been succesfully removed from account. //l: popup_note_window @@ -339,7 +339,7 @@ //w: //r: 3.0 // -#define qtn_drm_get_key_failed_retry "Licence not received. Try again?" +#define qtn_drm_get_key_failed_retry "License not received. Try again?" //d: Text in wait note shown while device is acquiring RO and possibly completing registration //d: protocol with Rights Issuer. @@ -426,7 +426,7 @@ //w: //r: 3.0 // -#define qtn_drm_query_waiting_for_ro "Waiting for licence. Try again later." +#define qtn_drm_query_waiting_for_ro "Waiting for license. Try again later." //d: Text in confirmation query that is displayed when user tries to render MO that is missing RO. //d: The waiting time of RO to arrive has passed, and there is no possibility to get new RO (no rights @@ -435,7 +435,7 @@ //w: //r: 3.0 // -#define qtn_drm_query_ro_late "Licence not yet received. Expected time of delivery elapsed." +#define qtn_drm_query_ro_late "License not yet received. Expected time of delivery elapsed." //d: Text in confirmation query that is displayed when user tries to render MO that is missing RO. //d: The waiting time of RO to arrive has passed, and there is possibility to get new RO (rights issuer url exists). @@ -443,7 +443,7 @@ //w: //r: 3.0 // -#define qtn_drm_query_ro_late_activate "Licence not yet received. Expected time of delivery elapsed. Get new licence?" +#define qtn_drm_query_ro_late_activate "License not yet received. Expected time of delivery elapsed. Get new license?" //d: Text in confirmation note that is displayed when device registration is complete. //l: popup_note_window @@ -483,7 +483,7 @@ //w: //r: 3.0 // -#define qtn_drm_cal_tone_exp_activate "Licence for calendar alert tone %U expired. Get new licence to unlock file?" +#define qtn_drm_cal_tone_exp_activate "License for calendar alert tone %U expired. Get new license to unlock file?" //d: Text in information note that that is displayed when rights for calendar alert tone have expired. //d: Note is shown when Idle is activated. This info note is shown fore combined delivery object @@ -493,7 +493,7 @@ //w: //r: 3.0 // -#define qtn_drm_info_calendar_tone_exp "Licence for calendar alert tone %U expired" +#define qtn_drm_info_calendar_tone_exp "License for calendar alert tone %U expired" //d: Text in confirmation query that is displayed when rights for clock alarm tone have expired. //d: Query is shown when Idle is activated. Activation query is shown only for superdistributable @@ -503,7 +503,7 @@ //w: //r: 3.0 // -#define qtn_drm_clock_alrm_exp_activate "Licence for clock alarm tone %U expired. Get new licence to unlock file?" +#define qtn_drm_clock_alrm_exp_activate "License for clock alarm tone %U expired. Get new license to unlock file?" //d: Text in information note that that is displayed when rights for clock alarm tone have expired. //d: Note is shown when Idle is activated. This info note is shown fore combined delivery object @@ -513,7 +513,7 @@ //w: //r: 3.0 // -#define qtn_drm_info_clock_alarm_exp "Licence for clock alarm tone %U expired" +#define qtn_drm_info_clock_alarm_exp "License for clock alarm tone %U expired" //d: Text in confirmation query that is displayed when rights for e-mail alert tone have expired. //d: Query is shown when Idle is activated. Activation query is shown only for superdistributable @@ -523,7 +523,7 @@ //w: //r: 3.0 // -#define qtn_drm_email_tone_exp_activate "Licence for e-mail alert tone %U expired. Get new licence to unlock file?" +#define qtn_drm_email_tone_exp_activate "License for e-mail alert tone %U expired. Get new license to unlock file?" //d: Text in information note that that is displayed when rights for e-mail alert tone have expired. //d: Note is shown when Idle is activated. This info note is shown fore combined delivery object @@ -533,7 +533,7 @@ //w: //r: 3.0 // -#define qtn_drm_info_email_tone_exp "Licence for e-mail alert tone %U expired" +#define qtn_drm_info_email_tone_exp "License for e-mail alert tone %U expired" //d: Text in confirmation query that is displayed when rights for instant message alert tone have expired. //d: Query is shown when Idle is activated. Activation query is shown only for superdistributable @@ -543,7 +543,7 @@ //w: //r: 3.0 // -#define qtn_drm_im_tone_exp_activate "Licence for IM alert tone %U expired. Activate?" +#define qtn_drm_im_tone_exp_activate "License for IM alert tone %U expired. Activate?" //d: Text in information note that that is displayed when rights for instant message alert tone have expired. //d: Note is shown when Idle is activated. This info note is shown fore combined delivery object @@ -553,7 +553,7 @@ //w: //r: 3.0 // -#define qtn_drm_info_im_alert_tone_exp "Licence for IM alert tone %U expired" +#define qtn_drm_info_im_alert_tone_exp "License for IM alert tone %U expired" //d: Text in confirmation query that is displayed when rights for message alert tone have expired. //d: Query is shown when Idle is activated. Activation query is shown only for superdistributable @@ -563,7 +563,7 @@ //w: //r: 3.0 // -#define qtn_drm_msg_tone_exp_activate "Licence for message alert tone %U expired. Get new licence to unlock file?" +#define qtn_drm_msg_tone_exp_activate "License for message alert tone %U expired. Get new license to unlock file?" //d: Text in information note that that is displayed when rights for message alert tone have expired. //d: Note is shown when Idle is activated. This info note is shown fore combined delivery object @@ -573,7 +573,7 @@ //w: //r: 3.0 // -#define qtn_drm_info_msg_tone_exp "Licence for message alert tone %U expired" +#define qtn_drm_info_msg_tone_exp "License for message alert tone %U expired" //d: Text in confirmation query that is displayed when rights for ringing tone have expired. //d: Query is shown when Idle is activated. Activation query is shown only for superdistributable @@ -583,7 +583,7 @@ //w: //r: 3.0 // -#define qtn_drm_ring_tone_exp_activate "Licence for ringing tone %U expired. Get new licence to unlock file?" +#define qtn_drm_ring_tone_exp_activate "License for ringing tone %U expired. Get new license to unlock file?" //d: Text in information note that that is displayed when rights for ringing tone have expired. //d: Note is shown when Idle is activated. This info note is shown fore combined delivery object @@ -593,7 +593,7 @@ //w: //r: 3.0 // -#define qtn_drm_info_ring_tone_exp "Licence for ringing tone %U expired" +#define qtn_drm_info_ring_tone_exp "License for ringing tone %U expired" //d: Text in confirmation query that is displayed when rights for screensaver have expired. //d: Query is shown when Idle is activated. Activation query is shown only for superdistributable @@ -603,7 +603,7 @@ //w: //r: 3.0 // -#define qtn_drm_screensave_exp_activate "Licence for power saver %U expired. Get new licence to unlock file?" +#define qtn_drm_screensave_exp_activate "License for power saver %U expired. Get new license to unlock file?" //d: Text in information note that that is displayed when rights for screensaver have expired. //d: Note is shown when Idle is activated. This info note is shown fore combined delivery object @@ -623,7 +623,7 @@ //w: //r: 3.0 // -#define qtn_drm_wallpaper_exp_activate "Licence for wallpaper %U expired. Get new licence to unlock file?" +#define qtn_drm_wallpaper_exp_activate "License for wallpaper %U expired. Get new license to unlock file?" //d: Text in information note that that is displayed when rights for wallpaper have expired. //d: Note is shown when Idle is activated. This info note is shown fore combined delivery object @@ -633,7 +633,7 @@ //w: //r: 3.0 // -#define qtn_drm_info_wallpaper_exp "Licence for wallpaper %U expired" +#define qtn_drm_info_wallpaper_exp "License for wallpaper %U expired" //d: Text in confirmation query that is displayed when rights for theme have expired. //d: Query is shown when Idle is activated. Activation query is shown only for superdistributable @@ -643,7 +643,7 @@ //w: //r: 3.0 // -#define qtn_drm_theme_exp_activate "Licence for theme %U expired. Get new licence to unlock file?" +#define qtn_drm_theme_exp_activate "License for theme %U expired. Get new license to unlock file?" //d: Text in information note that that is displayed when rights for theme have expired. //d: Note is shown when Idle is activated. This info note is shown for combined delivery object @@ -653,7 +653,7 @@ //w: //r: 3.0 // -#define qtn_drm_info_theme_exp "Licence for theme %U expired" +#define qtn_drm_info_theme_exp "License for theme %U expired" //d: Text in information note shown when updating account has failed //d: (device was trying to join to new account). @@ -706,14 +706,14 @@ //w: //r: 3.0 // -#define qtn_drm_roap_title "Licence download" +#define qtn_drm_roap_title "License download" //d: Text in information note //l: popup_note_window //w: //r: // -#define qtn_drm_info_ro_expired "Licence expired" +#define qtn_drm_info_ro_expired "License expired" //d: Text in confirmation query shown when content cannot be rendered because of wrong SIM card in device //l: popup_note_window @@ -885,7 +885,7 @@ //l: None //r: 3.2 // -#define qtn_drm_msq_query_registration "Registration with content provider is needed. After registration, licences for protected files can be downloaded automatically." +#define qtn_drm_msq_query_registration "Registration with content provider is needed. After registration, licenses for protected files can be downloaded automatically." //Link text for more info //d: String which contains the description for more info -link diff -r bd9b181e836a -r 5816b2634c8a drm_pub/oma_drm_caf_agent_api/tsrc/bc/DRM_CAF/data/content.dcf diff -r bd9b181e836a -r 5816b2634c8a inc/drmrightsdb.h --- a/inc/drmrightsdb.h Fri May 28 13:54:35 2010 +0100 +++ b/inc/drmrightsdb.h Tue Jul 13 13:57:53 2010 +0100 @@ -57,6 +57,7 @@ class CDRMRightsCleaner; class CDRMRightsServer; class CDcfRep; +class CDRMRightsServer; // FUNCTION PROTOTYPES @@ -91,7 +92,8 @@ static CDRMRightsDB* NewLC( RFs& aFs, const TDesC& aDatabasePath, const TDesC8& aKey, - const TDesC& aImei ); + const TDesC& aImei, + CDRMRightsServer* aServer ); /** * NewL @@ -110,7 +112,8 @@ static CDRMRightsDB* NewL( RFs& aFs, const TDesC& aDatabasePath, const TDesC8& aKey, - const TDesC& aImei ); + const TDesC& aImei, + CDRMRightsServer* aServer ); /** * Destructor @@ -327,6 +330,7 @@ */ CDRMRightsCleaner* DeleteExpiredPermissionsL( const TTime& aTime, TRequestStatus& aStatus ); + /** * NameContentL @@ -369,6 +373,21 @@ */ TBool DeleteExpiredL( const TFileName& aFileName, const TTime& aTime ); + + /** + * DeleteExpiredL + * + * Delete expired from the current file store + * + * @since 3.0 + * @param aFileName : name of the permission file store + * @param aTime : current time. + * @return TBool : ETrue if the file can be deleted + * EFalse if the file can't be deleted + */ + TBool DeleteExpiredL( const TFileName& aFileName, + const TTime& aTime, + const TDesC8& aContentId ); /** * GetUdtDataL @@ -507,7 +526,7 @@ /** * Default Constructor - First phase. */ - CDRMRightsDB( RFs& aFs ); + CDRMRightsDB( RFs& aFs, CDRMRightsServer* aServer ); /** * ConstructL @@ -675,6 +694,8 @@ // Time stamp of the last update operation TTime iLastUpdate; + + CDRMRightsServer* iRightsServer; }; #endif // DRMRIGHTSDB_H diff -r bd9b181e836a -r 5816b2634c8a inc/wmdrmclient.h --- a/inc/wmdrmclient.h Fri May 28 13:54:35 2010 +0100 +++ b/inc/wmdrmclient.h Tue Jul 13 13:57:53 2010 +0100 @@ -384,6 +384,18 @@ */ IMPORT_C TInt GetTime( TTime& aTime, TBool& aValid ); + + /** + * CommitData + * Commits any cached data to storage + * + * @return KErrNone if successful + * Otherwise Symbian OS error code + */ + + IMPORT_C TInt CommitData(); + + }; #endif diff -r bd9b181e836a -r 5816b2634c8a omadrm/drmengine/agentv2/src/Oma2AgentManager.cpp --- a/omadrm/drmengine/agentv2/src/Oma2AgentManager.cpp Fri May 28 13:54:35 2010 +0100 +++ b/omadrm/drmengine/agentv2/src/Oma2AgentManager.cpp Tue Jul 13 13:57:53 2010 +0100 @@ -981,27 +981,7 @@ // void COma2AgentManager::DisplayManagementInfoL() { - TUid KRightsManagerUid = TUid::Uid(0x101F85C7); - RWsSession wsSession; - RApaLsSession appArcSession; - TThreadId id; - - User::LeaveIfError(wsSession.Connect()); - CleanupClosePushL(wsSession); - TApaTaskList tasklist(wsSession); - TApaTask task = tasklist.FindApp(KRightsManagerUid); - if (task.Exists()) - { - task.SendMessage(TUid::Uid(KUidApaMessageSwitchOpenFileValue), - KNullDesC8); - } - else - { - User::LeaveIfError(appArcSession.Connect()); - appArcSession.StartDocument(_L("0"), KRightsManagerUid, id); - appArcSession.Close(); - } - CleanupStack::PopAndDestroy(); - } + User::Leave(KErrCANotSupported); + } // End of File diff -r bd9b181e836a -r 5816b2634c8a omadrm/drmengine/group/CryptoPrep.flm --- a/omadrm/drmengine/group/CryptoPrep.flm Fri May 28 13:54:35 2010 +0100 +++ b/omadrm/drmengine/group/CryptoPrep.flm Tue Jul 13 13:57:53 2010 +0100 @@ -17,11 +17,6 @@ # first instance of this FLM _CRYPTOPREP_FLM_:= 1 -# darios: changing the value of EPOCROOT while make is running -# messes up the target dependecies -# also these two lines are not needed for this flm -#TMPROOT:=$(subst \,/,$(EPOCROOT)) -#EPOCROOT:=$(patsubst %/,%,$(TMPROOT))/ # NB: abspath doesn't like Windows drive letters CRYPTO_SOURCE_DRIVE:=$(firstword $(subst :, ,$(EXTENSION_ROOT))) diff -r bd9b181e836a -r 5816b2634c8a omadrm/drmengine/ro/inc/DRMProtectedRoParser.h --- a/omadrm/drmengine/ro/inc/DRMProtectedRoParser.h Fri May 28 13:54:35 2010 +0100 +++ b/omadrm/drmengine/ro/inc/DRMProtectedRoParser.h Tue Jul 13 13:57:53 2010 +0100 @@ -278,9 +278,8 @@ * @since Series 60 3.0 * @param aProtectedRo protected RO element * @return protected RO element, if namespace was not added NULL - */ - HBufC8* CDrmProtectedRoParser::AddRoapNamespaceL( - TDesC8& aProtectedRo ) const; + */ + HBufC8* AddRoapNamespaceL( TDesC8& aProtectedRo ) const; private: diff -r bd9b181e836a -r 5816b2634c8a omadrm/drmengine/server/inc/DRMRightsServer.h --- a/omadrm/drmengine/server/inc/DRMRightsServer.h Fri May 28 13:54:35 2010 +0100 +++ b/omadrm/drmengine/server/inc/DRMRightsServer.h Tue Jul 13 13:57:53 2010 +0100 @@ -40,7 +40,20 @@ class CDRMBackup; class RMobilePhone; -// CLASS DECLARATION +// CLASS DECLARATIONS + +// Data Class: +NONSHARABLE_CLASS( CUsageUrl ) : public CBase + { + public: + CUsageUrl(); + virtual ~CUsageUrl(); + + public: // Data + HBufC8* iUrl; + TInt iRefCounter; + }; + /** * This class implements the DRM5 Rights Server functionality. @@ -49,7 +62,7 @@ * @since S60Rel2.5 */ NONSHARABLE_CLASS( CDRMRightsServer ) : public CServer2, public MWatcherObserver - { + { public: // Constructors and destructor /** @@ -162,6 +175,34 @@ */ void AddActiveCountConstraintL( const TDesC8& aContentId ); + + /** + * Checks if a content ID is in the list of currently consumed contents + * + * @since 5.2 + * @param aContentId content ID to search for + * @return Index or the Url if the content ID is in the list + * KErrNotFound if the content ID is not in the list + */ + TInt IsAccessingUrl( const TDesC8& aContentId ); + + /** + * Removes a content ID from the list of currently consumed contents + * + * @since 5.2 + * @param aContentId content ID to remove + */ + void RemoveAccessingUrl( const TDesC8& aContentId ); + + /** + * Adds a content ID to the list of currently consumed contents + * + * @since 5.2 + * @param aContentId content ID to add + */ + void AddAccessingUrlL( const TDesC8& aContentId ); + + /** * Import rights objects on startup * @@ -275,6 +316,7 @@ RDRMClockClient iClock; RPointerArray* iXOmaHeaders; RPointerArray iActiveCountConstraints; + RPointerArray iActiveUrls; HBufC* iIMEI; @@ -307,6 +349,7 @@ }; + #endif // CDRMRIGHTSSERVER_H // End of File diff -r bd9b181e836a -r 5816b2634c8a omadrm/drmengine/server/src/DRMDbSession.cpp --- a/omadrm/drmengine/server/src/DRMDbSession.cpp Fri May 28 13:54:35 2010 +0100 +++ b/omadrm/drmengine/server/src/DRMDbSession.cpp Tue Jul 13 13:57:53 2010 +0100 @@ -1743,7 +1743,8 @@ // Count constraints are valid for the duration of the // session after they have been consumed earlier if ( !( iConsume && iConsume->CountConstraintActive() || - SERVER->HasActiveCountConstraint( *CID ) ) ) + SERVER->HasActiveCountConstraint( *CID ) || + SERVER->IsAccessingUrl( *CID ) != KErrNotFound ) ) { CDRMPermission* child( NULL ); HBufC8* uri( NULL ); diff -r bd9b181e836a -r 5816b2634c8a omadrm/drmengine/server/src/DRMRightsServer.cpp --- a/omadrm/drmengine/server/src/DRMRightsServer.cpp Fri May 28 13:54:35 2010 +0100 +++ b/omadrm/drmengine/server/src/DRMRightsServer.cpp Tue Jul 13 13:57:53 2010 +0100 @@ -294,6 +294,29 @@ // ============================ MEMBER FUNCTIONS =============================== +// CUsageUrl: + +//-------------------------------------------------------------------------- +// CUsageUrl::CUsageUrl +// Storage class default constructor +//-------------------------------------------------------------------------- +// +CUsageUrl::CUsageUrl() + { + } + +//-------------------------------------------------------------------------- +// CUsageUrl::~CUsageUrl +// Storage class destructor +//-------------------------------------------------------------------------- +// +CUsageUrl::~CUsageUrl() + { + delete iUrl; + } + +// CDRMRightsServer: + // ----------------------------------------------------------------------------- // CDRMRightsServer::NewLC // Two-phased constructor. @@ -354,6 +377,8 @@ delete iNotifier; iNotifier = NULL; } + iActiveUrls.ResetAndDestroy(); + //An empty semaphore RSemaphore semaphore; } @@ -599,13 +624,13 @@ #ifndef RD_MULTIPLE_DRIVE - iDb = CDRMRightsDB::NewL( iFs, KRightsDir, key, *iIMEI ); + iDb = CDRMRightsDB::NewL( iFs, KRightsDir, key, *iIMEI, const_cast(this) ); #else //RD_MULTIPLE_DRIVE tempPath.Format( KRightsDir, (TUint)driveLetter ); - iDb = CDRMRightsDB::NewL( iFs, tempPath, key, *iIMEI ); + iDb = CDRMRightsDB::NewL( iFs, tempPath, key, *iIMEI, const_cast(this) ); #endif @@ -1337,6 +1362,85 @@ } } + + +// ----------------------------------------------------------------------------- +// CDRMRightsServer::IsAccessingUrl +// Add ID to count constraint list +// ----------------------------------------------------------------------------- +// +TInt CDRMRightsServer::IsAccessingUrl( const TDesC8& aContentId ) + { + for( TInt i = 0; i < iActiveUrls.Count(); i++ ) + { + if( !iActiveUrls[i]->iUrl->Compare( aContentId ) ) + { + return i; + } + } + return KErrNotFound; + } + +// ----------------------------------------------------------------------------- +// CDRMRightsServer::RemoveAccessingUrl +// Add ID to count constraint list +// ----------------------------------------------------------------------------- +// +void CDRMRightsServer::RemoveAccessingUrl( const TDesC8& aContentId ) + { + CUsageUrl* usage = NULL; + TInt index = KErrNotFound; + + index = IsAccessingUrl( aContentId ); + + if( index != KErrNotFound ) + { + // If there are negative or 0 values in the list for some reason + // remove them + if( iActiveUrls[index]->iRefCounter <= 1 ) + { + usage = iActiveUrls[index]; + iActiveUrls.Remove( index ); + delete usage; + } + else + { + iActiveUrls[index]->iRefCounter--; + } + } + } + +// ----------------------------------------------------------------------------- +// CDRMRightsServer::AddAccessingUrlL +// Add ID to count constraint list +// ----------------------------------------------------------------------------- +// +void CDRMRightsServer::AddAccessingUrlL( const TDesC8& aContentId ) + { + CUsageUrl* usage = NULL; + TInt index = KErrNotFound; + + index = IsAccessingUrl( aContentId ); + + if( index == KErrNotFound ) + { + usage = new ( ELeave ) CUsageUrl(); + CleanupStack::PushL( usage ); + usage->iUrl = aContentId.AllocL(); + usage->iRefCounter = 1; + iActiveUrls.AppendL( usage ); + CleanupStack::Pop( usage ); + } + else + { + usage = iActiveUrls[index]; + usage->iRefCounter++; + } + } + + + + // ----------------------------------------------------------------------------- // CDRMRightsServer::StopWatchingL // Delete the watchers @@ -1425,6 +1529,8 @@ } #endif + + // ========================== OTHER EXPORTED FUNCTIONS ========================= diff -r bd9b181e836a -r 5816b2634c8a omadrm/drmengine/server/src/drmconsume.cpp --- a/omadrm/drmengine/server/src/drmconsume.cpp Fri May 28 13:54:35 2010 +0100 +++ b/omadrm/drmengine/server/src/drmconsume.cpp Tue Jul 13 13:57:53 2010 +0100 @@ -140,6 +140,12 @@ CDRMConsume::~CDRMConsume() { DRMLOG( _L( "CDRMConsume::~" ) ); + + if( iURI ) + { + SERVER->RemoveAccessingUrl( *iURI ); + } + TInt error( KErrNone ); if( IsActive() ) @@ -203,6 +209,8 @@ { iParentId = aParentId->AllocL(); } + + SERVER->AddAccessingUrlL( aURI ); } // ------------------------------------------------------------------------ diff -r bd9b181e836a -r 5816b2634c8a omadrm/drmengine/server/src/drmrightsdb.cpp --- a/omadrm/drmengine/server/src/drmrightsdb.cpp Fri May 28 13:54:35 2010 +0100 +++ b/omadrm/drmengine/server/src/drmrightsdb.cpp Tue Jul 13 13:57:53 2010 +0100 @@ -46,6 +46,7 @@ #include "DrmKeyStorage.h" #include "utf.h" // charconv, ConvertFromUnicodeToUtf8L #include "drmlog.h" +#include "DRMRightsServer.h" #ifdef RD_DRM_RIGHTS_MANAGER_REMOVAL #include "DRMClockClient.h" @@ -159,10 +160,11 @@ // might leave. // ----------------------------------------------------------------------------- // -CDRMRightsDB::CDRMRightsDB( RFs& aFs ) : +CDRMRightsDB::CDRMRightsDB( RFs& aFs, CDRMRightsServer* aServer ) : iFileServer( aFs ), iImei( NULL ), - iLastUpdate( Time::NullTTime() ) + iLastUpdate( Time::NullTTime() ), + iRightsServer( aServer ) { }; @@ -216,9 +218,10 @@ CDRMRightsDB* CDRMRightsDB::NewLC( RFs& aFs, const TDesC& aDatabasePath, const TDesC8& aKey, - const TDesC& aImei ) + const TDesC& aImei, + CDRMRightsServer* aServer ) { - CDRMRightsDB* self = new( ELeave ) CDRMRightsDB( aFs ); + CDRMRightsDB* self = new( ELeave ) CDRMRightsDB( aFs, aServer ); CleanupStack::PushL( self ); self->ConstructL( aDatabasePath, aKey, aImei ); @@ -233,9 +236,10 @@ CDRMRightsDB* CDRMRightsDB::NewL( RFs& aFs, const TDesC& aDatabaseFile, const TDesC8& aKey, - const TDesC& aImei ) + const TDesC& aImei, + CDRMRightsServer* aServer ) { - CDRMRightsDB* self = NewLC( aFs, aDatabaseFile, aKey, aImei ); + CDRMRightsDB* self = NewLC( aFs, aDatabaseFile, aKey, aImei, aServer ); CleanupStack::Pop(); return self; @@ -318,7 +322,7 @@ } // Delete expired: - TRAP_IGNORE( deleteAllowed = DeleteExpiredL( path, time ) ); + TRAP_IGNORE( deleteAllowed = DeleteExpiredL( path, time, aContentID ) ); // Check if it's possible to delete the file as well if( deleteAllowed ) @@ -1077,6 +1081,77 @@ // ----------------------------------------------------------------------------- +// CDRMRightsDB::DeleteExpiredL +// ----------------------------------------------------------------------------- +// +TBool CDRMRightsDB::DeleteExpiredL( const TFileName& aFileName, + const TTime& aTime, + const TDesC8& aContentId ) + { + CDRMRightsData* rights = NULL; + TInt amountLeft = -1; + TBool retVal = EFalse; + TBool parents = EFalse; + + DRMLOG( _L( "CDRMRightsDB::DeleteExpiredL(2) ->" ) ); + + // if there is a consumption session ongoing, we can't delete it at all + // or the decryption will not function properly after pause etc + if( iRightsServer->IsAccessingUrl( aContentId ) != KErrNotFound ) + { + return EFalse; + } + + // Indicate that the DB is updated + iLastUpdate.HomeTime(); + + // Open the rights file + DRMLOG( _L("Opening the file")); + rights = CDRMRightsData::OpenLC( aFileName, iFileServer ); + + DRMLOG( _L("Running Delete")); + amountLeft = rights->DeleteExpiredPermissionsL( aTime, parents ); + + DRMLOG2( _L("Checking for left RO:s %d"), amountLeft ); + + // See if any permissions are left if not check if the whole file + // can be proposed to be deleted or not, Java files require uninstallation + // so those need to be checked + if( !amountLeft && !parents ) + { + // get the common data + const CDRMCommonData* common= rights->GetCommonDataL(); + + // If it is a java file, dont allow deletion + if( !common->ContentName().Right(4).CompareF(KJavaExtension) ) + { + DRMLOG( _L("Is java file, do not delete")); + retVal = EFalse; + } + else if( !common->ContentName().Right(4).CompareF(KSISExtension) ) + { + DRMLOG( _L("Is an installation package, do not delete")); + retVal = EFalse; + } + else + { + retVal = ETrue; + } + } + CleanupStack::PopAndDestroy(); // rights + + DRMLOG( _L( "CDRMRightsDB::DeleteExpiredL <-" ) ); + + if( iRightsServer->HasActiveCountConstraint( aContentId )) + { + retVal = EFalse; + } + + return retVal; + } + + +// ----------------------------------------------------------------------------- // CDRMRightsDB::GetUdtDataLC // ----------------------------------------------------------------------------- // diff -r bd9b181e836a -r 5816b2634c8a omadrm/drmplugins/drmromtm/loc/RoMtmUi.loc --- a/omadrm/drmplugins/drmromtm/loc/RoMtmUi.loc Fri May 28 13:54:35 2010 +0100 +++ b/omadrm/drmplugins/drmromtm/loc/RoMtmUi.loc Tue Jul 13 13:57:53 2010 +0100 @@ -406,7 +406,7 @@ //w: //r:3.0 // -#define qtn_drm_query_rights_acq_msg "Connect to server to get a licence?" +#define qtn_drm_query_rights_acq_msg "Connect to server to get a license?" //d:Confirmation query text used when triggering registration to a domain //l:popup_note_window diff -r bd9b181e836a -r 5816b2634c8a wmdrm/camese/httpfiltercamese/Src/httpfiltercamesedrmheader.cpp --- a/wmdrm/camese/httpfiltercamese/Src/httpfiltercamesedrmheader.cpp Fri May 28 13:54:35 2010 +0100 +++ b/wmdrm/camese/httpfiltercamese/Src/httpfiltercamesedrmheader.cpp Tue Jul 13 13:57:53 2010 +0100 @@ -32,7 +32,7 @@ // Filter position: DRM Header needs to be positioned below the client. const TInt KCameseDrmHeaderFilterPosition = MHTTPFilter::EClient - 10; -const TUid KCRUidMusicShopSettings = {0x10207BF5}; // copied from MusicWapCenRepKeys.h - Album Download +const TUid KCRUidMusicShopSettings = {0x101FFB51}; // copied from MusicWapCenRepKeys.h - Album Download const TUint32 KSupportOmaDownloadDescriptor = 0x00000004; // copied from MusicWapCenRepKeys.h - Album Download const TUint32 KMusicServiceFeatureFlagSupport = 0x00000012; // referred from 5.0 MusicWapCenRepKeys.h - Album Download diff -r bd9b181e836a -r 5816b2634c8a wmdrm/camese/wmdrmdlaapp/src/wmdrmdlabrowsercontainer.cpp --- a/wmdrm/camese/wmdrmdlaapp/src/wmdrmdlabrowsercontainer.cpp Fri May 28 13:54:35 2010 +0100 +++ b/wmdrm/camese/wmdrmdlaapp/src/wmdrmdlabrowsercontainer.cpp Tue Jul 13 13:57:53 2010 +0100 @@ -107,6 +107,10 @@ // CWmDrmDlaBrowserContainer::~CWmDrmDlaBrowserContainer() { + if(iBrCtlInterface != NULL) + { + TRAP_IGNORE( iBrCtlInterface->HandleCommandL( (TInt)TBrCtlDefs::ECommandCancelFetch + (TInt)TBrCtlDefs::ECommandIdBase )); + } delete iBrCtlInterface; } diff -r bd9b181e836a -r 5816b2634c8a wmdrm/camese/wmdrmdlaapp/src/wmdrmdlabrowserview.cpp --- a/wmdrm/camese/wmdrmdlaapp/src/wmdrmdlabrowserview.cpp Fri May 28 13:54:35 2010 +0100 +++ b/wmdrm/camese/wmdrmdlaapp/src/wmdrmdlabrowserview.cpp Tue Jul 13 13:57:53 2010 +0100 @@ -155,6 +155,8 @@ } else { + iContainer->BrCtlInterface()->HandleCommandL( (TInt)TBrCtlDefs::ECommandCancelFetch + + (TInt)TBrCtlDefs::ECommandIdBase ); AppUi()->HandleCommandL( aCommand ); } } diff -r bd9b181e836a -r 5816b2634c8a wmdrm/camese/wmdrmdladefaulthttpplugin/src/wmdrmdladefaulthttpmanager.cpp --- a/wmdrm/camese/wmdrmdladefaulthttpplugin/src/wmdrmdladefaulthttpmanager.cpp Fri May 28 13:54:35 2010 +0100 +++ b/wmdrm/camese/wmdrmdladefaulthttpplugin/src/wmdrmdladefaulthttpmanager.cpp Tue Jul 13 13:57:53 2010 +0100 @@ -162,6 +162,8 @@ HandleDownloadComplete( KErrCancel ); } } + // Close the HTTP session in use + iHttpSession.Close(); CleanupConnection(); DeleteUsernamePassword(); @@ -565,6 +567,9 @@ GetConnectionInfoL( info ); iIapNumber = info.iIapId; + // Close old session: + iHttpSession.Close(); + // Open session iHttpSession.OpenL(); RStringPool pool = iHttpSession.StringPool(); @@ -730,7 +735,6 @@ iHdrFields.Reset(); iHttpTransaction.Close(); - iHttpSession.Close(); if ( !iKeepAlive ) { diff -r bd9b181e836a -r 5816b2634c8a wmdrm/wmdrmengine/wmdrmotaaccess/bwins/wmdrmotaaccessu.def --- a/wmdrm/wmdrmengine/wmdrmotaaccess/bwins/wmdrmotaaccessu.def Fri May 28 13:54:35 2010 +0100 +++ b/wmdrm/wmdrmengine/wmdrmotaaccess/bwins/wmdrmotaaccessu.def Tue Jul 13 13:57:53 2010 +0100 @@ -6,4 +6,5 @@ ?GetLicenseChallengeL@CWmDrmOtaAccess@@QAEXABVTDesC8@@AAPAVHBufC8@@AAVTRequestStatus@@@Z @ 5 NONAME ; void CWmDrmOtaAccess::GetLicenseChallengeL(class TDesC8 const &, class HBufC8 * &, class TRequestStatus &) ?HandleLicenseResponseL@CWmDrmOtaAccess@@QAEXABVTDesC8@@AAVTRequestStatus@@@Z @ 6 NONAME ; void CWmDrmOtaAccess::HandleLicenseResponseL(class TDesC8 const &, class TRequestStatus &) ?GetLicenseChallengeL@CWmDrmOtaAccess@@QAEXABVTDesC8@@AAPAVHBufC8@@@Z @ 7 NONAME ; void CWmDrmOtaAccess::GetLicenseChallengeL(class TDesC8 const &, class HBufC8 * &) + ?CancelAllAsync@CWmDrmOtaAccess@@QAEXXZ @ 8 NONAME ; void CWmDrmOtaAccess::CancelAllAsync(void) diff -r bd9b181e836a -r 5816b2634c8a wmdrm/wmdrmengine/wmdrmotaaccess/eabi/wmdrmotaaccessu.def --- a/wmdrm/wmdrmengine/wmdrmotaaccess/eabi/wmdrmotaaccessu.def Fri May 28 13:54:35 2010 +0100 +++ b/wmdrm/wmdrmengine/wmdrmotaaccess/eabi/wmdrmotaaccessu.def Tue Jul 13 13:57:53 2010 +0100 @@ -8,4 +8,5 @@ _ZN15CWmDrmOtaAccess20GetLicenseChallengeLERK6TDesC8RP6HBufC8R14TRequestStatus @ 7 NONAME _ZN15CWmDrmOtaAccess22HandleLicenseResponseLERK6TDesC8 @ 8 NONAME _ZN15CWmDrmOtaAccess22HandleLicenseResponseLERK6TDesC8R14TRequestStatus @ 9 NONAME + _ZN15CWmDrmOtaAccess14CancelAllAsyncEv @ 10 NONAME diff -r bd9b181e836a -r 5816b2634c8a wmdrm/wmdrmengine/wmdrmotaaccess/src/wmdrmotaaccess.cpp --- a/wmdrm/wmdrmengine/wmdrmotaaccess/src/wmdrmotaaccess.cpp Fri May 28 13:54:35 2010 +0100 +++ b/wmdrm/wmdrmengine/wmdrmotaaccess/src/wmdrmotaaccess.cpp Tue Jul 13 13:57:53 2010 +0100 @@ -121,6 +121,7 @@ iWmDrmOtaAccessEcomInterface->HandleLicenseResponseL( aResponse ); } + // --------------------------------------------------------------------------- // CWmDrmOtaAccess::HandleLicenseResponseL // --------------------------------------------------------------------------- @@ -137,7 +138,19 @@ aStatus ); } - +// --------------------------------------------------------------------------- +// CWmDrmOtaAccess::CancelAllAsync +// --------------------------------------------------------------------------- +EXPORT_C void CWmDrmOtaAccess::CancelAllAsync() + { + // Ecom interface not available + if( !iWmDrmOtaAccessEcomInterface ) + { + return; + } + + iWmDrmOtaAccessEcomInterface->CancelAllAsync(); + } // End of file diff -r bd9b181e836a -r 5816b2634c8a wmdrm/wmdrmengine/wmdrmserver/client/BWINS/wmdrmclientU.DEF --- a/wmdrm/wmdrmengine/wmdrmserver/client/BWINS/wmdrmclientU.DEF Fri May 28 13:54:35 2010 +0100 +++ b/wmdrm/wmdrmengine/wmdrmserver/client/BWINS/wmdrmclientU.DEF Tue Jul 13 13:57:53 2010 +0100 @@ -24,4 +24,5 @@ ?DeleteRights@RWmDrmClient@@QAEHXZ @ 23 NONAME ; int RWmDrmClient::DeleteRights(void) ?StoreState@RWmDrmClient@@QAEHAAW4TWmDrmStoreState@@@Z @ 24 NONAME ; int RWmDrmClient::StoreState(enum TWmDrmStoreState &) ?GetTime@RWmDrmClient@@QAEHAAVTTime@@AAH@Z @ 25 NONAME ; int RWmDrmClient::GetTime(class TTime &, int &) + ?CommitData@RWmDrmClient@@QAEHXZ @ 26 NONAME ; int RWmDrmClient::CommitData(void) diff -r bd9b181e836a -r 5816b2634c8a wmdrm/wmdrmengine/wmdrmserver/client/EABI/wmdrmclientU.DEF --- a/wmdrm/wmdrmengine/wmdrmserver/client/EABI/wmdrmclientU.DEF Fri May 28 13:54:35 2010 +0100 +++ b/wmdrm/wmdrmengine/wmdrmserver/client/EABI/wmdrmclientU.DEF Tue Jul 13 13:57:53 2010 +0100 @@ -24,4 +24,5 @@ _ZN12RWmDrmClient12DeleteRightsEv @ 23 NONAME _ZN12RWmDrmClient10StoreStateER16TWmDrmStoreState @ 24 NONAME _ZN12RWmDrmClient7GetTimeER5TTimeRi @ 25 NONAME + _ZN12RWmDrmClient10CommitDataEv @ 26 NONAME diff -r bd9b181e836a -r 5816b2634c8a wmdrm/wmdrmengine/wmdrmserver/client/src/wmdrmclient.cpp --- a/wmdrm/wmdrmengine/wmdrmserver/client/src/wmdrmclient.cpp Fri May 28 13:54:35 2010 +0100 +++ b/wmdrm/wmdrmengine/wmdrmserver/client/src/wmdrmclient.cpp Tue Jul 13 13:57:53 2010 +0100 @@ -542,4 +542,17 @@ return r; }; +//--------------------------------------------------------------------------- +// RWmDrmClient::CommitData +//--------------------------------------------------------------------------- +// +EXPORT_C TInt RWmDrmClient::CommitData() + { + TInt r = KErrNone; + LOGFNR( "RWmDrmClient::CommitData", r ); + r = SendReceive( ECommitData ); + return r; + }; + + diff -r bd9b181e836a -r 5816b2634c8a wmdrm/wmdrmengine/wmdrmserver/server/inc/clock.h --- a/wmdrm/wmdrmengine/wmdrmserver/server/inc/clock.h Fri May 28 13:54:35 2010 +0100 +++ b/wmdrm/wmdrmengine/wmdrmserver/server/inc/clock.h Tue Jul 13 13:57:53 2010 +0100 @@ -35,7 +35,7 @@ public: static const TInt KClockInterval = 15 * 60 * 1000000; - static CClock* CClock::NewL( CWmDrmServer* aServer ); + static CClock* NewL( CWmDrmServer* aServer ); ~CClock(); CClock( CWmDrmServer* aServer ); diff -r bd9b181e836a -r 5816b2634c8a wmdrm/wmdrmengine/wmdrmserver/server/inc/wmdrmclientserver.h --- a/wmdrm/wmdrmengine/wmdrmserver/server/inc/wmdrmclientserver.h Fri May 28 13:54:35 2010 +0100 +++ b/wmdrm/wmdrmengine/wmdrmserver/server/inc/wmdrmclientserver.h Tue Jul 13 13:57:53 2010 +0100 @@ -47,7 +47,8 @@ ESetTimeAsValid, EDeleteRights, EStoreState, - EGetTime + EGetTime, + ECommitData }; #endif // __WMDRMCLIENTSERVER_H diff -r bd9b181e836a -r 5816b2634c8a wmdrm/wmdrmengine/wmdrmserver/server/inc/wmdrmdb.h --- a/wmdrm/wmdrmengine/wmdrmserver/server/inc/wmdrmdb.h Fri May 28 13:54:35 2010 +0100 +++ b/wmdrm/wmdrmengine/wmdrmserver/server/inc/wmdrmdb.h Tue Jul 13 13:57:53 2010 +0100 @@ -109,6 +109,12 @@ TInt DataBaseSize( TBool aConfiguredDrive ); + // Checks how many SQL statements are prepared (buffered) currently and if either the maximum + // amount of buffered statements is exceeded or an enforced commit is needed, COMMITs the + // statements. The method also starts a new BEGIN statement after the commit operation to + // start a new buffering round of SQL statements. This method also controls a timer for + // triggering enforced commit after a predefined idle period without any prepared SQL statements. + void CheckDatabaseCommitL( TBool aEnforcedCommit ); protected: // from base class CActive void RunL(); @@ -131,12 +137,7 @@ void ConvertOldLicenseStoreL(); - // Checks how many SQL statements are prepared (buffered) currently and if either the maximum - // amount of buffered statements is exceeded or an enforced commit is needed, COMMITs the - // statements. The method also starts a new BEGIN statement after the commit operation to - // start a new buffering round of SQL statements. This method also controls a timer for - // triggering enforced commit after a predefined idle period without any prepared SQL statements. - void CheckDatabaseCommitL( TBool aEnforcedCommit ); + void Activate(); private: // data diff -r bd9b181e836a -r 5816b2634c8a wmdrm/wmdrmengine/wmdrmserver/server/inc/wmdrmsession.h --- a/wmdrm/wmdrmengine/wmdrmserver/server/inc/wmdrmsession.h Fri May 28 13:54:35 2010 +0100 +++ b/wmdrm/wmdrmengine/wmdrmserver/server/inc/wmdrmsession.h Tue Jul 13 13:57:53 2010 +0100 @@ -224,6 +224,13 @@ */ void GetTimeL( const RMessage2& aMessage ); + + /* Commits the database + * + * @param aMessage IPC message (not used) + */ + void CommitDataL( const RMessage2& aMessage ); + private: /* Desctructor. */ diff -r bd9b181e836a -r 5816b2634c8a wmdrm/wmdrmengine/wmdrmserver/server/src/wmdrmsession.cpp --- a/wmdrm/wmdrmengine/wmdrmserver/server/src/wmdrmsession.cpp Fri May 28 13:54:35 2010 +0100 +++ b/wmdrm/wmdrmengine/wmdrmserver/server/src/wmdrmsession.cpp Tue Jul 13 13:57:53 2010 +0100 @@ -686,6 +686,21 @@ aMessage.WriteL(1, validityPckg); } + +//--------------------------------------------------------------------------- +// CWmDrmSession::CommitDataL +//--------------------------------------------------------------------------- +// +void CWmDrmSession::CommitDataL( const RMessage2& aMessage ) + { + + LOGFN( "CWmDrmSession::CommitDataL" ); + + // Force a commit on the database + Server().Db()->CheckDatabaseCommitL( ETrue ); + } + + //--------------------------------------------------------------------------- // CWmDrmSession::ServiceL @@ -787,7 +802,10 @@ break; case EGetTime: TRAP( trap, GetTimeL( aMessage ) ); - break; + break; + case ECommitData: + TRAP( trap, CommitDataL( aMessage ) ); + break; default: r = KErrArgument; break;