2 * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 #ifndef FRAMEWORK_UNIFIED_CLIENT_NS_MESSAGECENTER_INCLUDE_NS_MESSAGE_CENTER_INTERNAL_H_
18 #define FRAMEWORK_UNIFIED_CLIENT_NS_MESSAGECENTER_INCLUDE_NS_MESSAGE_CENTER_INTERNAL_H_
20 #include <native_service/frameworkunified_types.h>
21 #include <native_service/ns_shared_mem_if.h>
28 ////////////////////////////////////////////////////////////////////////////////////////////
33 /// PCSTR - Service name
37 /// >0 - Listen socket FD
38 ////////////////////////////////////////////////////////////////////////////////////////////
39 int mcOpenMonitor(PCSTR name);
41 ////////////////////////////////////////////////////////////////////////////////////////////
46 /// PCSTR - Service name
51 ////////////////////////////////////////////////////////////////////////////////////////////
52 int mcCloseMonitor(PCSTR name);
54 ////////////////////////////////////////////////////////////////////////////////////////////
62 /// \param [in] serverName
63 /// PCSTR - Server name
64 /// \param [in] clientName
65 /// PCSTR - Client name
69 /// >0 - Connect socket FD
70 ////////////////////////////////////////////////////////////////////////////////////////////
71 int mcSetConnectKey(char *buf, size_t size, PCSTR serverName, PCSTR clientName);
73 ////////////////////////////////////////////////////////////////////////////////////////////
77 /// \param [in] serverName
78 /// PCSTR - server name
79 /// \param [in] clientName
80 /// PCSTR - client name
84 /// >0 - Connect socket FD
85 ////////////////////////////////////////////////////////////////////////////////////////////
86 int mcConnectMonitor(PCSTR serverName, PCSTR clientName);
88 ////////////////////////////////////////////////////////////////////////////////////////////
89 /// mcCloseConnectMonitor
92 /// \param [in] serverName
93 /// PCSTR - server name
94 /// \param [in] clientName
95 /// PCSTR - client name
99 /// >0 - Connect socket FD
100 ////////////////////////////////////////////////////////////////////////////////////////////
101 int mcCloseConnectMonitor(PCSTR serverName, PCSTR clientName);
103 ////////////////////////////////////////////////////////////////////////////////////////////
107 /// \param [in] serverName
108 /// PCSTR - server name
109 /// \param [in] listenMonitorFd
110 /// int - Listen socket FD
114 /// >0 - Accept socket FD
115 ////////////////////////////////////////////////////////////////////////////////////////////
116 int mcAcceptMonitor(PCSTR serverName, int listenMonitorFd);
118 ////////////////////////////////////////////////////////////////////////////////////////////
119 /// mcGetAcceptMonitor
122 /// \param [in] serverName
123 /// PCSTR - server name
124 /// \param [in] clientName
125 /// PCSTR - client name
129 /// >0 - Accept socket FD
130 ////////////////////////////////////////////////////////////////////////////////////////////
131 int mcGetAcceptMonitor(PCSTR serverName, PCSTR clientName);
133 ////////////////////////////////////////////////////////////////////////////////////////////
134 /// mcCloseAcceptMonitor
137 /// \param [in] serverName
138 /// PCSTR - server name
139 /// \param [in] clientName
140 /// PCSTR - client name
144 /// >0 - Accept socket FD
145 ////////////////////////////////////////////////////////////////////////////////////////////
146 int mcCloseAcceptMonitor(PCSTR serverName, PCSTR clientName);
148 ////////////////////////////////////////////////////////////////////////////////////////////
149 /// mcGetClientNameFromConnectKey
152 /// \param [in] connectKey
153 /// PCSTR - connect key
154 /// \param [out] clientName
155 /// PCHAR - client name
157 /// size_t - clientname buffer length
161 /// >0 - Accept socket FD
162 ////////////////////////////////////////////////////////////////////////////////////////////
163 int mcGetClientNameFromConnectKey(PCSTR connectKey, PCHAR clientName, size_t len);
165 ////////////////////////////////////////////////////////////////////////////////////////////
166 /// mcGetServerNameFromConnectKey
169 /// \param [in] connectKey
170 /// PCSTR - connect key
171 /// \param [out] serverName
172 /// PCHAR - client name
174 /// size_t - serverName buffer length
178 /// >0 - Accept socket FD
179 ////////////////////////////////////////////////////////////////////////////////////////////
180 int mcGetServerNameFromConnectKey(PCSTR connectKey, PCHAR serverName, size_t len);
185 #endif // FRAMEWORK_UNIFIED_CLIENT_NS_MESSAGECENTER_INCLUDE_NS_MESSAGE_CENTER_INTERNAL_H_