📄 o_drmreg.c
字号:
/****************************************************************************************************
* Copyright (c) 2005 ZORAN Corporation, All Rights Reserved
* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF ZORAN CORPORATION
*
* File: o_drmreg.c
*
* Description: Project definition of the MSO_DRMREG
* =========
*
****************************************************************************************************/
#include "Config.h" // Global Configuration - do not remove!
#include "include\sysdefs.h" // Global definition - do not remove!
#ifdef AVI_DRM_SUPPORT
/****************************************************************************************************
* INCLUDE FILES
****************************************************************************************************/
#include "GUI\Menu_system\osd_rendering.h"
#include "GUI\Menu_system\ms_screen.h"
#include "GUI\Menu_system\ms_container.h"
#include "Playcore\ScPad\SCMGR.h"
#include "Font\fonts.h"
#include "GUI\Resource\Bitmap\bitmap.h"
#include "GUI\Object_class\Confirm\mso_confirm.h"
#include "Components\Drm\o_drmreg.h"
#include "CoreAPI\CoreAPI.h"
// Include configuration header file: named constants, macros and typedefs.
#include "Components\Drm\o_drmreg_config.h"
// Include custom header file: customer specific definitions, over-writing common ones.
#include "Components\Custom\Drm\o_drmreg_custom.h"
/****************************************************************************************************
* DECLARATION: Private (static) functions
****************************************************************************************************/
STATIC MS_OP _Operation(MSO_OBJECT __NEAR* pThis, MS_OP MsOp, UINT32 lParam);
STATIC void _GetDRMRegistrationCodeStr(FORMATED_UNICODE_STRING __NEAR* pFormUniStr, UINT32 wParam);
/**************************************************************************
* Display functions
***************************************************************************/
/***************************************************************************************
* Include customization file.
****************************************************************************************/
// Include custom code file: customer specific code, over-writing common one.
#include "Components\Custom\Drm\o_drmreg_custom.c"
// Include configuration file: constants.
#include "Components\Drm\o_drmreg_config.c"
/**************************************************************************
* Utility functions
***************************************************************************/
/**************************************************************************
* Operation functions
***************************************************************************/
/**************************************************************************
* Function : _Operation
*
* In :
*
* Out :
*
* Desc :
***************************************************************************/
STATIC MS_OP _Operation(MSO_OBJECT __NEAR* pThis, MS_OP MsOp, UINT32 lParam)
{
MSO_DRMREG __NEAR* pDRMReg;
pDRMReg = (MSO_DRMREG __NEAR*)pThis;
switch(MsOp)
{
case MS_OP_INIT:
//fall through
case MS_OP_ON_DEFROST:
pDRMReg->moParam.mScFormUniStr = OSDR_MallocScFormUniStr();
if (NULL_HANDLE != pDRMReg->moParam.mScFormUniStr)
{
FORMATED_UNICODE_STRING oFormUniStr;
CoreAPI_GetDRMRegCode(oFormUniStr.mszUniStr,0,UNISTR_LENGTH_MAX);
oFormUniStr.mtFontIndex = FONT_0;
OSDR_FormatUniString((FORMATED_UNICODE_STRING __NEAR*)&oFormUniStr);
OSDR_SetScFormUniStr((FORMATED_UNICODE_STRING __NEAR*)&oFormUniStr, ((MSO_DRMREG __NEAR*)pThis)->moParam.mScFormUniStr);
}
break;
case MS_OP_PREPARE_FOR_FREEZE:
case MS_OP_EMPTY:
if (NULL_HANDLE != pDRMReg->moParam.mScFormUniStr)
{
OSDR_FreeScFormUniStr(pDRMReg->moParam.mScFormUniStr);
pDRMReg->moParam.mScFormUniStr = NULL_HANDLE;
}
break;
}
return OCONFIRM_Operation(pThis, MsOp, lParam);
}
/**************************************************************************
* Display functions
***************************************************************************/
/**************************************************************************
* Function : _GetDRMRegistrationCodeStr
*
* In :
*
* Out :
*
* Desc :
***************************************************************************/
STATIC void _GetDRMRegistrationCodeStr(FORMATED_UNICODE_STRING __NEAR* pFormUniStr, UINT32 lParam)
{
MSO_OBJECT *pObject = MS_FindObjectFromDescriptor((MSO_CONTAINER __NEAR*)gpScreen, (MS_DESCRIPTOR*)lParam);
if(pObject != NULL)
{
OSDR_GetFormUniStr_ScFormatted(pFormUniStr, (UINT32)((MSO_DRMREG __NEAR*)pObject)->moParam.mScFormUniStr);
}
else
OSDR_GetFormUniStr_OsdMessage(pFormUniStr, (UINT32)S_NULL);
}
#endif //AVI_DRM_SUPPORT
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -