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 //////////////////////////////////////////////////////////////////////////////////////////////////
18 /// \ingroup tag_NPPService
19 /// \brief This file contains the declaration for methods to retrieve and store data for NOR storage
23 //////////////////////////////////////////////////////////////////////////////////////////////////
26 * @file ns_np_service_nor_persistence.h
27 * @brief This file contains the declaration for methods to retrieve and store data for NOR storage
30 /** @addtogroup BaseSystem
33 /** @addtogroup native_service
37 /** @addtogroup notification_persistent_service
38 * @ingroup native_service
42 #ifndef __NATIVESERVICES_NP_NOR_SERVICE_H__ // NOLINT (build/header_guard)
43 #define __NATIVESERVICES_NP_NOR_SERVICE_H__
45 ///////////////////////////////////////////////////////////////////////////////
47 ///////////////////////////////////////////////////////////////////////////////
48 #include <native_service/frameworkunified_types.h>
54 ////////////////////////////////////////////////////////////////////////////////////////////
55 /// \ingroup NPSynchronousReadPersistentData
56 /// \~english @par Brief
57 /// API to synchronously read persistent data corresponding to a notification before NPPService is available
58 /// \~english @param[in] pAppName
59 /// PCSTR - Application/ thread name
60 /// \~english @param[in] notif_name
61 // PCSTR - Name of Notification
62 /// \~english @param[in] pData
63 /// PVOID - Pointer to the buffer where read data will be written.
64 /// \~english @param[in] uiDataSize
65 /// UI_32 - Length of the data buffer.
66 /// \~english @param[in] ePersistCategory
67 /// const EFrameworkunifiedPersistCategory - Persist Category of Notification.
68 /// \~english @retval eFrameworkunifiedStatusOK
69 /// \~english @retval eFrameworkunifiedStatusInvldParam
70 /// \~english @retval eFrameworkunifiedStatusFail
71 /// \~english @par Preconditons
73 /// \~english @par Change of internal status
74 /// - Change of internal state according to the API does not occur.
75 /// \~english @par Conditions of processing failure
76 /// - NULL handle specified in the argument(pAppName).[eFrameworkunifiedStatusInvldParam]
77 /// - NULL handle specified in the argument(notif_name).[eFrameworkunifiedStatusInvldParam]
78 /// - NULL handle specified in the argument(pData).[eFrameworkunifiedStatusInvldParam]
79 /// - 0 specified in the argument(uiDataSize).[eFrameworkunifiedStatusFail]
80 /// - Handle of the application [eFrameworkunifiedStatusFail]
81 /// - If the file access process fails,.... [eFrameworkunifiedStatusFail]
82 /// \~english @par Detail
83 /// API to synchronously read persistent data corresponding to a notification before NPPService is available
85 /// File reading by this API is exclusive control by semaphore,
86 /// and writing to non-voatie area is to use NPSynchronousWritePersistentData().
87 /// \~english @par Classification
89 /// \~english @par Type
91 /// \~english @see NPSynchronousWritePersistentData
92 ////////////////////////////////////////////////////////////////////////////////////////////
93 EFrameworkunifiedStatus NPSynchronousReadPersistentData(PCSTR pAppName,
97 const EFrameworkunifiedPersistCategory ePersistCategory = eFrameworkunifiedUserData);
99 ////////////////////////////////////////////////////////////////////////////////////////////
100 /// \ingroup NPSynchronousWritePersistentData
101 /// \~english @par Brief
102 /// API to synchronously write persistent data corresponding to a notification before NPPService is available
103 /// \~english @param[in] pAppName
104 /// PCSTR - Application/ thread name
105 /// \~english @param[in] notif_name
106 // PCSTR - Name of Notification
107 /// \~english @param[in] pData
108 /// PVOID - Pointer to the buffer where read data will be written.
109 /// \~english @param[in] uiDataSize
110 /// UI_32 - Length of the data buffer.
111 /// \~english @param[in] ePersistCategory
112 /// const EFrameworkunifiedPersistCategory - Persist Category of Notification.
113 /// \~english @retval eFrameworkunifiedStatusOK
114 /// \~english @retval eFrameworkunifiedStatusInvldParam
115 /// \~english @retval eFrameworkunifiedStatusFail
116 /// \~english @par Preconditons
118 /// \~english @par Change of internal status
119 /// - Change of internal state according to the API does not occur.
120 /// \~english @par Conditions of processing failure
121 /// - NULL handle specified in the argument(pAppName).[eFrameworkunifiedStatusInvldParam]
122 /// - NULL handle specified in the argument(notif_name).[eFrameworkunifiedStatusInvldParam]
123 /// - NULL handle specified in the argument(pData).[eFrameworkunifiedStatusInvldParam]
124 /// - 0 specified in the argument(uiDataSize).[eFrameworkunifiedStatusFail]
125 /// - Handle of the application [eFrameworkunifiedStatusFail]
126 /// - If the file access process fails,.... [eFrameworkunifiedStatusFail]
127 /// \~english @par Detail
128 /// API to synchronously read persistent data corresponding to a notification before NPPService is available
130 /// File reading by this API is exclusive control by semaphore,
131 /// and writing to non-voatie area is to use NPSynchronousWritePersistentData().
132 /// \~english @par Classification
134 /// \~english @par Type
136 /// \~english @see NPSynchronousWritePersistentData
137 ////////////////////////////////////////////////////////////////////////////////////////////
138 EFrameworkunifiedStatus NPSynchronousWritePersistentData(PCSTR pAppName,
141 const UI_32 uiDataSize,
142 const EFrameworkunifiedPersistCategory ePersistCategory = eFrameworkunifiedUserData);
147 #endif /* __NATIVESERVICES_NP_NOR_SERVICE_H__ */ // NOLINT (build/header_guard)
148 /** @}*/ // end of notification_persistent_service
149 /** @}*/ // end of native_service
150 /** @}*/ // end of BaseSystem