summaryrefslogtreecommitdiff
path: root/source/CEH/a2_commands_impl.cpp
blob: 675314575bcf99a898951d8a338b7a7dc402ddf1 (plain)
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
/*******************************************************************************
*
* Copyright (C) ST-Ericsson SA 2011
* License terms: 3-clause BSD license
*
*******************************************************************************/

#include "a2_commands_impl.h"
#include "Serialization.h"
#include "CmdResult.h"

ErrorCode_e A2LoaderRpcInterfaceImpl::DoneRPC_A2_System_ShutdownImpl(uint16 Session, ErrorCode_e Status)
{
    cmdResult_->GeneralResponse_Session = Session;

    return E_SUCCESS;
}

ErrorCode_e A2LoaderRpcInterfaceImpl::DoneRPC_A2_System_LoaderVersionImpl(uint16 Session, ErrorCode_e Status, int LoaderVersionOutPLSize, const void *LoaderVersionOut)
{
    if (0 == Status) {
        cmdResult_->A2_LoaderVersion = string(static_cast<const char *>(LoaderVersionOut), LoaderVersionOutPLSize);
    }

    cmdResult_->GeneralResponse_Session = Session;
    return E_SUCCESS;
}

ErrorCode_e A2LoaderRpcInterfaceImpl::DoneRPC_A2_System_LoaderOnLoaderImpl(uint16 Session, ErrorCode_e Status)
{
    cmdResult_->GeneralResponse_Session = Session;

    return E_SUCCESS;
}

ErrorCode_e A2LoaderRpcInterfaceImpl::DoneRPC_A2_System_ResetImpl(uint16 Session, ErrorCode_e Status)
{
    cmdResult_->GeneralResponse_Session = Session;

    return E_SUCCESS;
}

ErrorCode_e A2LoaderRpcInterfaceImpl::DoneRPC_A2_Flash_VerifySignedHeaderImpl(uint16 Session, ErrorCode_e Status)
{
    cmdResult_->GeneralResponse_Session = Session;

    return E_SUCCESS;
}

ErrorCode_e A2LoaderRpcInterfaceImpl::DoneRPC_A2_Flash_SoftwareBlockAddressImpl(uint16 Session, ErrorCode_e Status)
{
    cmdResult_->GeneralResponse_Session = Session;

    return E_SUCCESS;
}

ErrorCode_e A2LoaderRpcInterfaceImpl::DoneRPC_A2_Flash_ProgramFlashImpl(uint16 Session, ErrorCode_e Status)
{
    cmdResult_->GeneralResponse_Session = Session;

    return E_SUCCESS;
}

ErrorCode_e A2LoaderRpcInterfaceImpl::DoneRPC_A2_Flash_VerifySoftwareFlashImpl(uint16 Session, ErrorCode_e Status)
{
    cmdResult_->GeneralResponse_Session = Session;

    return E_SUCCESS;
}

ErrorCode_e A2LoaderRpcInterfaceImpl::DoneRPC_A2_Flash_EraseFlashImpl(uint16 Session, ErrorCode_e Status)
{
    cmdResult_->GeneralResponse_Session = Session;

    return E_SUCCESS;
}

ErrorCode_e A2LoaderRpcInterfaceImpl::DoneRPC_A2_Flash_SpeedflashImpl(uint16 Session, ErrorCode_e Status)
{
    cmdResult_->GeneralResponse_Session = Session;

    return E_SUCCESS;
}

ErrorCode_e A2LoaderRpcInterfaceImpl::DoRPC_A2_Control_LoaderStartedImpl(uint16 Session, const uint32 MaxLoaderPacketSize)
{
    cmdResult_->GeneralResponse_Session = Session;

    cmdResult_->A2_MaxLoaderPacketSize = MaxLoaderPacketSize;

    return E_SUCCESS;
}

ErrorCode_e A2LoaderRpcInterfaceImpl::DoneRPC_A2_Control_PingImpl(uint16 Session)
{
    cmdResult_->GeneralResponse_Session = Session;

    return E_SUCCESS;
}

ErrorCode_e A2LoaderRpcInterfaceImpl::DoRPC_A2_Control_PongImpl(uint16 Session)
{
    cmdResult_->GeneralResponse_Session = Session;

    return E_SUCCESS;
}

ErrorCode_e A2LoaderRpcInterfaceImpl::DoneRPC_A2_Control_MaxPacketSizeImpl(uint16 Session, const uint16 MaxLoaderPacketSize)
{
    cmdResult_->GeneralResponse_Session = Session;

    cmdResult_->A2_MaxLoaderPacketSize = MaxLoaderPacketSize;

    return E_SUCCESS;
}

ErrorCode_e A2LoaderRpcInterfaceImpl::DoRPC_A2_Control_LoaderNotStartedImpl(uint16 Session, uint16 ErrorCode)
{
    cmdResult_->GeneralResponse_Session = Session;

    return E_SUCCESS;
}