summaryrefslogtreecommitdiff
path: root/idlc/gen/c_stub_header_gen_cb.h
diff options
context:
space:
mode:
Diffstat (limited to 'idlc/gen/c_stub_header_gen_cb.h')
-rw-r--r--idlc/gen/c_stub_header_gen_cb.h87
1 files changed, 87 insertions, 0 deletions
diff --git a/idlc/gen/c_stub_header_gen_cb.h b/idlc/gen/c_stub_header_gen_cb.h
new file mode 100644
index 0000000..49e37f0
--- /dev/null
+++ b/idlc/gen/c_stub_header_gen_cb.h
@@ -0,0 +1,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_