diff options
author | PacketVideo CM <engbuild@pv.com> | 2010-06-15 16:36:09 -0700 |
---|---|---|
committer | PacketVideo CM <engbuild@pv.com> | 2010-06-15 16:36:09 -0700 |
commit | b0c60f1e694b06835f60cc906a0dcabf54f777ce (patch) | |
tree | 07c7078c1511fa4575006539061b2d28e85016e4 | |
parent | 37da4d0ed7f73fb8947943663f0f955c3ebb2bdd (diff) | |
download | opencore-b0c60f1e694b06835f60cc906a0dcabf54f777ce.tar.gz |
RIO-8611: Modified CPM plugin data structure
Change-Id: Icf901e24e003e3e7dffedf947d7962f9c26df84d
6 files changed, 48 insertions, 79 deletions
diff --git a/engines/2way/src/pv_2way_sdkinfo.h b/engines/2way/src/pv_2way_sdkinfo.h index bf56f22e9..c098b7505 100644 --- a/engines/2way/src/pv_2way_sdkinfo.h +++ b/engines/2way/src/pv_2way_sdkinfo.h @@ -21,7 +21,7 @@ // This header file is automatically generated at build-time // *** OFFICIAL RELEASE INFO -- Will not auto update -#define PV2WAY_ENGINE_SDKINFO_LABEL "1488665" +#define PV2WAY_ENGINE_SDKINFO_LABEL "1489641" #define PV2WAY_ENGINE_SDKINFO_DATE 0x20100610 #endif //PV_2WAY_SDKINFO_H_INCLUDED diff --git a/engines/author/src/pv_author_sdkinfo.h b/engines/author/src/pv_author_sdkinfo.h index e5eeb57ce..c7fb7d3c7 100644 --- a/engines/author/src/pv_author_sdkinfo.h +++ b/engines/author/src/pv_author_sdkinfo.h @@ -21,7 +21,7 @@ // This header file is automatically generated at build-time // *** OFFICIAL RELEASE INFO -- Will not auto update -#define PVAUTHOR_ENGINE_SDKINFO_LABEL "1488665" +#define PVAUTHOR_ENGINE_SDKINFO_LABEL "1489641" #define PVAUTHOR_ENGINE_SDKINFO_DATE 0x20100610 #endif //PV_AUTHOR_SDKINFO_H_INCLUDED diff --git a/engines/player/src/pv_player_sdkinfo.h b/engines/player/src/pv_player_sdkinfo.h index 08d510e3d..d7d9552ae 100644 --- a/engines/player/src/pv_player_sdkinfo.h +++ b/engines/player/src/pv_player_sdkinfo.h @@ -21,7 +21,7 @@ // This header file is automatically generated at build-time // *** OFFICIAL RELEASE INFO -- Will not auto update -#define PVPLAYER_ENGINE_SDKINFO_LABEL "1488665" +#define PVPLAYER_ENGINE_SDKINFO_LABEL "1489641" #define PVPLAYER_ENGINE_SDKINFO_DATE 0x20100610 #endif //PV_PLAYER_SDKINFO_H_INCLUDED diff --git a/pvmi/content_policy_manager/plugins/common/include/pvmf_cpmplugin_license_interface_types.h b/pvmi/content_policy_manager/plugins/common/include/pvmf_cpmplugin_license_interface_types.h index 0bd3d8702..20d2a340a 100644 --- a/pvmi/content_policy_manager/plugins/common/include/pvmf_cpmplugin_license_interface_types.h +++ b/pvmi/content_policy_manager/plugins/common/include/pvmf_cpmplugin_license_interface_types.h @@ -28,6 +28,46 @@ #include "oscl_mem.h" #endif +#define PVMF_CPM_DRM_ID_SIZE 16 +#define PVMF_CPM_CONTENT_ID_SIZE PVMF_CPM_DRM_ID_SIZE +#define PVMF_CPM_METER_ID_SIZE PVMF_CPM_DRM_ID_SIZE + +class PVMFCPMDrmId +{ + public: + PVMFCPMDrmId() + { + Clear(); + } + PVMFCPMDrmId(const PVMFCPMDrmId &aId) + { + Set((uint8*)aId.iData); + } + + PVMFCPMDrmId operator=(const PVMFCPMDrmId &aId) + { + Set((uint8*)aId.iData); + return *this; + } + + void Clear() + { + oscl_memset(iData, 0, PVMF_CPM_DRM_ID_SIZE); + } + + void Set(uint8 *aData) + { + if (aData) + { + oscl_memcpy(iData, aData, PVMF_CPM_DRM_ID_SIZE); + } + } + uint8 iData[PVMF_CPM_DRM_ID_SIZE]; +}; + +typedef PVMFCPMDrmId PVMFCPMContentId; +typedef PVMFCPMDrmId PVMFCPMMeterId; + //A class to hold detailed status information on communication with license servers. // This information is primarily for debugging. class PVMFCPMLicenseStatus diff --git a/pvmi/content_policy_manager/plugins/common/include/pvmf_cpmplugin_license_manager_interface_types.h b/pvmi/content_policy_manager/plugins/common/include/pvmf_cpmplugin_license_manager_interface_types.h index 8f61a5b43..0b86b5002 100644 --- a/pvmi/content_policy_manager/plugins/common/include/pvmf_cpmplugin_license_manager_interface_types.h +++ b/pvmi/content_policy_manager/plugins/common/include/pvmf_cpmplugin_license_manager_interface_types.h @@ -25,49 +25,7 @@ #include "oscl_types.h" #endif - -//A class to hold a content ID. -class PVMFCPMContentId -{ - public: - PVMFCPMContentId(): iData(NULL), iDataLen(0) - {} - - PVMFCPMContentId(const PVMFCPMContentId& aVal) - { - iData = NULL; - iDataLen = 0; - Set(aVal); - } - - ~PVMFCPMContentId() - { - if (iData) - OSCL_FREE(iData); - iData = NULL; - } - - void Set(uint8* aData, uint32 aDataLen) - { - if (iData) - OSCL_FREE(iData); - iData = NULL; - if (aDataLen) - { - iData = (uint8*)OSCL_MALLOC(aDataLen); - if (iData) - oscl_memcpy(iData, aData, aDataLen); - iDataLen = aDataLen; - } - } - void Set(const PVMFCPMContentId& aId) - { - Set(aId.iData, aId.iDataLen); - } - - uint8* iData; - uint32 iDataLen; -}; +#include "pvmf_cpmplugin_license_interface_types.h" //A class to hold information about a license request class PVMFCPMLicenseUpdateInfo @@ -91,13 +49,13 @@ class PVMFCPMLicenseUpdateInfo void Clear() { iValid = false; - iLicenseSyncId.Set(NULL, 0); + iLicenseSyncId.Clear(); } void Set(const PVMFCPMLicenseUpdateInfo& aInfo) { iValid = aInfo.iValid; iLicenseSyncIndex = aInfo.iLicenseSyncIndex; - iLicenseSyncId.Set(aInfo.iLicenseSyncId); + iLicenseSyncId = aInfo.iLicenseSyncId; iURL = aInfo.iURL; } }; diff --git a/pvmi/content_policy_manager/plugins/common/include/pvmf_cpmplugin_metering_interface_types.h b/pvmi/content_policy_manager/plugins/common/include/pvmf_cpmplugin_metering_interface_types.h index c99d4f6d9..b7bc1c557 100644 --- a/pvmi/content_policy_manager/plugins/common/include/pvmf_cpmplugin_metering_interface_types.h +++ b/pvmi/content_policy_manager/plugins/common/include/pvmf_cpmplugin_metering_interface_types.h @@ -25,37 +25,8 @@ #include "oscl_types.h" #endif -#define PVMF_CPM_METER_ID_SIZE 16 +#include "pvmf_cpmplugin_license_interface_types.h" -//A class to hold a metering ID. -class PVMFCPMMeterId -{ - public: - PVMFCPMMeterId() - { - oscl_memset(data, 0, PVMF_CPM_METER_ID_SIZE); - } - PVMFCPMMeterId(const PVMFCPMMeterId &aId) - { - Set((uint8*)aId.data); - } - - PVMFCPMMeterId operator=(const PVMFCPMMeterId &aId) - { - Set((uint8*)aId.data); - return *this; - } - - void Set(uint8 *aData) - { - if (aData) - { - oscl_memcpy(data, aData, PVMF_CPM_METER_ID_SIZE); - } - } - - uint8 data [PVMF_CPM_METER_ID_SIZE]; -}; //A class to hold information about a metering certificate class PVMFCPMMeterCertInfo @@ -77,7 +48,7 @@ class PVMFCPMMeterCertInfo { iValid = false; iURL = _STRLIT_WCHAR(""); - oscl_memset(iMeterId.data, 0, sizeof(iMeterId.data)); + oscl_memset(iMeterId.iData, 0, sizeof(iMeterId.iData)); } void Set(const PVMFCPMMeterCertInfo& aInfo) { |