Init basesystem source codes.
[staging/basesystem.git] / nsframework / framework_unified / client / NS_MessageCenter / include / ns_mc_internal.h
1 /*
2  * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
3  *
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
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  */
16
17 ///////////////////////////////////////////////////////////////////////////////
18 /// \ingroup  tag_NS_MessageCenter
19 /// \brief    Declares the internal methods of message center
20 ///
21 ///
22 ///
23 ///////////////////////////////////////////////////////////////////////////////
24
25 #ifndef FRAMEWORK_UNIFIED_CLIENT_NS_MESSAGECENTER_INCLUDE_NS_MC_INTERNAL_H_
26 #define FRAMEWORK_UNIFIED_CLIENT_NS_MESSAGECENTER_INCLUDE_NS_MC_INTERNAL_H_
27
28
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32
33
34 ////////////////////////////////////////////////////////////////////////////////////////////
35 /// GetData
36 /// Get the message data, this may be from a queue or shared memory.
37 /// Deletes the data based on the value of BOOL retain, if it is stored in shared memory.
38 ///
39 /// \param [in] data
40 ///          PVOID -  pointer to the data received from the McReceive Call
41 /// \param [in] to
42 ///          PVOID -  pointer to the data to be received
43 /// \param [in] retain
44 ///          BOOL -  TRUE to retain the data in shared memory
45 ///            FALSE to release the data
46 ///
47 /// \return EFrameworkunifiedStatus
48 ///         EFrameworkunifiedStatus - status indicating success or failure
49 ///
50 ////////////////////////////////////////////////////////////////////////////////////////////
51 EFrameworkunifiedStatus GetData(PVOID data, PVOID to, BOOL retain);
52
53 ////////////////////////////////////////////////////////////////////////////////////////////
54 /// McLogTransmitLoggingMsgProcessed
55 ///
56 /// \param [in] p_sysHdr
57 ///          PVOID - Header of the received message. Passed as PVOID since Frameworkunified layer doesn't have
58 ///          knowledge about the header.
59 /// \param [in] bMsgProcessed
60 ///          BOOL -  TRUE - If any action was taken on the received message else FALSE
61 ///
62 /// \return none
63 ///
64 ////////////////////////////////////////////////////////////////////////////////////////////
65 VOID McLogTransmitLoggingMsgProcessed(PVOID p_sysHdr, BOOL bMsgProcessed);
66
67 ////////////////////////////////////////////////////////////////////////////////////////////
68 /// Get the session id.
69 ///
70 /// \param [in] data
71 ///          PVOID -  pointer to the data was received from the McReceive Call
72 ///
73 /// \return UI_32
74 ///         sessionId - session id
75 ////////////////////////////////////////////////////////////////////////////////////////////
76 UI_32 mcGetMsgSsessionId(PVOID data);
77
78 ////////////////////////////////////////////////////////////////////////////////////////////
79 /// Gets the is type of sync from message header.
80 ///
81 /// \param [in] pData
82 ///         void* -  pointer to the data was received from the McReceive Call
83 ///
84 /// \return BOOL
85 ///         isTypeOfSync -
86 ///       if message type is sync, return TRUE. or not return FALSE.
87 ////////////////////////////////////////////////////////////////////////////////////////////
88 BOOL mcGetIsTypeOfSync(PVOID data);
89
90 #ifdef __cplusplus
91 }
92 #endif
93 #endif  // FRAMEWORK_UNIFIED_CLIENT_NS_MESSAGECENTER_INCLUDE_NS_MC_INTERNAL_H_