SLA.cpp
2.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
#include "stdafx.h"
#include "brom.h"
#include "flashtool_handle.h"
#include "SLA.h"
#include "Common.h"
//static CSLA* g_sla_ptr;
//===========================================================================
//*******************************************************************************
//=========REQ_AUTH_Create & REQ_AUTH_Destroy========================================
//*********************************************************************************
int REQ_AUTH_Create( void )
{
int ret;
ret = AUTH_Create( &g_sMetaComm.sAuthOption.t_AuthHandle );
if( ret != 0 )
{
goto Error;
}
return 0;
Error:
return -1;
}
//---------------------------------------------------------------------------
int REQ_AUTH_Destroy( void )
{
int ret;
if( g_sMetaComm.sAuthOption.t_AuthHandle == NULL)
{
goto Error;
}
ret = AUTH_Destroy( &g_sMetaComm.sAuthOption.t_AuthHandle );
if( ret != 0 )
{
goto Error;
}
return 0;
Error:
return -1;
}
//************************************************************************************
//===========REQ_AUTH_Load & REQ_AUTH_Unload====================
//*************************************************************************************
int REQ_AUTH_Load(const char *filepath )
{
int ret;
//g_sla_ptr = this;
if( g_sMetaComm.sAuthOption.t_AuthHandle== NULL)
{
goto Error;
}
ret = AUTH_Load( g_sMetaComm.sAuthOption.t_AuthHandle, filepath );
if( ret != 0 )
{
goto Error;
}
return 0;
Error:
return -1;
}
//--------------------------------------------------------------------------
int REQ_AUTH_Unload( void )
{
int ret;
if( g_sMetaComm.sAuthOption.t_AuthHandle == NULL)
{
goto Error;
}
ret = AUTH_Unload( g_sMetaComm.sAuthOption.t_AuthHandle );
if( ret != 0 )
{
goto Error;
}
return 0;
Error:
return -1;
}
//*****************************************************************************
//===========================================================================
//*****************************************************************************
/*int Get_ConfirmState( void )
{
return SLA_Obj.m_iConfirmState;
}
*/
//--------------------------------------------------------------------------
AUTH_HANDLE_T Get_AuthHandle( void )
{
return g_sMetaComm.sAuthOption.t_AuthHandle;
}
#if 0
#endif