blob: 9e8b5c22ec99aee67cf739b28ddbfd2456ee9830 (
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
|
#include "MMIProtoBridge.h"
#define INIT_PROTO_LIFE_CYCLE_EVENT(type) \
::LifeCycleEvent lifeCycleEvent; \
lifeCycleEvent.set_type(type); \
lifeCycleEvent.set_requestid(mmiEvent.requestId); \
lifeCycleEvent.set_source(mmiEvent.source); \
lifeCycleEvent.set_target(mmiEvent.target);
namespace uscxml {
::LifeCycleEvent MMIProtoBridge::toProto(const NewContextRequest& mmiEvent) {
INIT_PROTO_LIFE_CYCLE_EVENT(::LifeCycleEvent_LifeCycleEventType_NEW_CONTEXT_REQUEST);
return lifeCycleEvent;
}
::LifeCycleEvent MMIProtoBridge::toProto(const NewContextResponse& mmiEvent) {
INIT_PROTO_LIFE_CYCLE_EVENT(::LifeCycleEvent_LifeCycleEventType_NEW_CONTEXT_RESPONSE);
return lifeCycleEvent;
}
::LifeCycleEvent MMIProtoBridge::toProto(const PrepareRequest& mmiEvent) {
INIT_PROTO_LIFE_CYCLE_EVENT(::LifeCycleEvent_LifeCycleEventType_PREPARE_REQUEST);
return lifeCycleEvent;
}
::LifeCycleEvent MMIProtoBridge::toProto(const PrepareResponse& mmiEvent) {
INIT_PROTO_LIFE_CYCLE_EVENT(::LifeCycleEvent_LifeCycleEventType_PREPARE_RESPONSE);
return lifeCycleEvent;
}
::LifeCycleEvent MMIProtoBridge::toProto(const StartRequest& mmiEvent) {
INIT_PROTO_LIFE_CYCLE_EVENT(::LifeCycleEvent_LifeCycleEventType_START_REQUEST);
::LifeCycleRequest* lifeCycleRequest = lifeCycleEvent.MutableExtension(::LifeCycleRequest::Request);
lifeCycleRequest->set_context(mmiEvent.context);
::StartRequest* startRequest = lifeCycleRequest->MutableExtension(::StartRequest::Request);
startRequest->set_content(mmiEvent.content);
startRequest->set_contenturl(mmiEvent.contentURL.href);
::StartRequestData* startRequestData = startRequest->MutableExtension(::StartRequestData::Request);
startRequestData->set_data(mmiEvent.data);
return lifeCycleEvent;
}
::LifeCycleEvent MMIProtoBridge::toProto(const StartResponse& mmiEvent) {
INIT_PROTO_LIFE_CYCLE_EVENT(::LifeCycleEvent_LifeCycleEventType_START_RESPONSE);
return lifeCycleEvent;
}
::LifeCycleEvent MMIProtoBridge::toProto(const DoneNotification& mmiEvent) {
INIT_PROTO_LIFE_CYCLE_EVENT(::LifeCycleEvent_LifeCycleEventType_DONE_NOTIFICATION);
return lifeCycleEvent;
}
::LifeCycleEvent MMIProtoBridge::toProto(const CancelRequest& mmiEvent) {
INIT_PROTO_LIFE_CYCLE_EVENT(::LifeCycleEvent_LifeCycleEventType_CANCEL_REQUEST);
return lifeCycleEvent;
}
::LifeCycleEvent MMIProtoBridge::toProto(const CancelResponse& mmiEvent) {
INIT_PROTO_LIFE_CYCLE_EVENT(::LifeCycleEvent_LifeCycleEventType_CANCEL_RESPONSE);
return lifeCycleEvent;
}
::LifeCycleEvent MMIProtoBridge::toProto(const PauseRequest& mmiEvent) {
INIT_PROTO_LIFE_CYCLE_EVENT(::LifeCycleEvent_LifeCycleEventType_PAUSE_REQUEST);
return lifeCycleEvent;
}
::LifeCycleEvent MMIProtoBridge::toProto(const PauseResponse& mmiEvent) {
INIT_PROTO_LIFE_CYCLE_EVENT(::LifeCycleEvent_LifeCycleEventType_PAUSE_RESPONSE);
return lifeCycleEvent;
}
::LifeCycleEvent MMIProtoBridge::toProto(const ResumeRequest& mmiEvent) {
INIT_PROTO_LIFE_CYCLE_EVENT(::LifeCycleEvent_LifeCycleEventType_RESUME_REQUEST);
return lifeCycleEvent;
}
::LifeCycleEvent MMIProtoBridge::toProto(const ResumeResponse& mmiEvent) {
INIT_PROTO_LIFE_CYCLE_EVENT(::LifeCycleEvent_LifeCycleEventType_RESUME_RESPONSE);
return lifeCycleEvent;
}
::LifeCycleEvent MMIProtoBridge::toProto(const ExtensionNotification& mmiEvent) {
INIT_PROTO_LIFE_CYCLE_EVENT(::LifeCycleEvent_LifeCycleEventType_EXTENSION_NOTIFICATION);
return lifeCycleEvent;
}
::LifeCycleEvent MMIProtoBridge::toProto(const ClearContextRequest& mmiEvent) {
INIT_PROTO_LIFE_CYCLE_EVENT(::LifeCycleEvent_LifeCycleEventType_CLEAR_CONTEXT_REQUEST);
return lifeCycleEvent;
}
::LifeCycleEvent MMIProtoBridge::toProto(const ClearContextResponse& mmiEvent) {
INIT_PROTO_LIFE_CYCLE_EVENT(::LifeCycleEvent_LifeCycleEventType_CLEAR_CONTEXT_RESPONSE);
return lifeCycleEvent;
}
::LifeCycleEvent MMIProtoBridge::toProto(const StatusRequest& mmiEvent) {
INIT_PROTO_LIFE_CYCLE_EVENT(::LifeCycleEvent_LifeCycleEventType_STATUS_REQUEST);
return lifeCycleEvent;
}
::LifeCycleEvent MMIProtoBridge::toProto(const StatusResponse& mmiEvent) {
INIT_PROTO_LIFE_CYCLE_EVENT(::LifeCycleEvent_LifeCycleEventType_STATUS_RESPONSE);
return lifeCycleEvent;
}
}
|