summaryrefslogtreecommitdiff
path: root/idlc/c_gen/c_stub_header_gen_cb.h
blob: 49e37f0828418ea087cea4d173a080b5aa2941eb (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
/*
 * Copyright (c) 2017 Samsung Electronics Co., Ltd.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef IDLC_C_GEN_C_STUB_HEADER_GEN_CB_H_
#define IDLC_C_GEN_C_STUB_HEADER_GEN_CB_H_

const char CB_INTERFACE_DECL[] =
R"__c_cb(
typedef struct {
    void (*create)(rpc_port_stub_##_context_h context, void *user_data);
    void (*terminate)(rpc_port_stub_##_context_h context, void *user_data);
$$
} rpc_port_stub_##_callback_s;
)__c_cb";

const char CB_INTERFACE_CALLBACK[] =
R"__c_cb($$(*$$)(rpc_port_stub_$$_context_h context, $$void *user_data);)__c_cb";

const char CB_INTERFACE_CONTEXT_DECL[] =
R"__c_cb(
typedef struct ##_context_s* rpc_port_stub_##_context_h;
)__c_cb";

const char CB_INTERFACE_CONTEXT_SET_TAG[] =
R"__c_cb(
int rpc_port_stub_##_context_set_tag(rpc_port_stub_##_context_h ctx, void *tag);
)__c_cb";

const char CB_INTERFACE_CONTEXT_GET_TAG[] =
R"__c_cb(
int rpc_port_stub_##_context_get_tag(rpc_port_stub_##_context_h ctx, void **tag);
)__c_cb";

const char CB_INTERFACE_CONTEXT_GET_SENDER[] =
R"__c_cb(
int rpc_port_stub_##_context_get_sender(rpc_port_stub_##_context_h ctx, char **sender);
)__c_cb";

const char CB_INTERFACE_DELEGATOR_DECL[] =
R"__c_cb(
typedef struct ##_s *rpc_port_##_h;
)__c_cb";

const char CB_INTERFACE_DELEGATOR_DTOR[] =
R"__c_cb(
int rpc_port_##_destroy(rpc_port_##_h h);
)__c_cb";

const char CB_INTERFACE_DELEGATOR_CLONER[] =
R"__c_cb(
int rpc_port_##_clone(rpc_port_##_h h, rpc_port_##_h *clone);
)__c_cb";

const char CB_INTERFACE_DELEGATOR_INVOKER[] =
R"__c_cb(
int rpc_port_##_invoke(rpc_port_##_h h$$);
)__c_cb";

const char CB_INTERFACE_REGISTER[] =
R"__c_cb(
int rpc_port_stub_##_register(rpc_port_stub_##_callback_s *callback, void *user_data);
)__c_cb";

const char CB_INTERFACE_UNREGISTER[] =
R"__c_cb(
int rpc_port_stub_##_unregister(void);
)__c_cb";

const char CB_INTERFACE_CLIENT_NUMBER_GETTER[] =
R"__c_cb(
int rpc_port_stub_##_get_client_number(unsigned int *n);
)__c_cb";

#endif  // IDLC_C_GEN_C_STUB_HEADER_GEN_CB_H_