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 API Header for Notification Service messages used by senders and recievers.
21 /// Declares the external Protocol messages to the Notification Service.
23 //////////////////////////////////////////////////////////////////////////////////////////////////
25 * @file ns_np_service_protocol.h
30 /** @addtogroup BaseSystem
33 /** @addtogroup native_service
37 /** @addtogroup notification_persistent_service
38 * @ingroup native_service
41 #ifndef __NATIVESERVICES_NP_SERVICE_PROTOCOL_H__ // NOLINT (build/header_guard)
42 #define __NATIVESERVICES_NP_SERVICE_PROTOCOL_H__
44 #include <native_service/frameworkunified_types.h>
45 #include <native_service/frameworkunified_service_protocol.h>
52 * \~english notification_persistent_service protocol msg name define
54 typedef enum _NS_NPServiceProtocol {
55 NPS_REGISTER_EV_REQ = PROTOCOL_FRAMEWORKUNIFIED_BASE_CMD + 0, /// <16+0 Request to register a Notification
56 NPS_UNREGISTER_EV_REQ , /// <1 Request to unregister a Notification
57 NPS_PUBLISH_EV_REQ , /// <2 Sender request to NP service to publish (send) a notification to subscribers
58 NPS_NOTIFY_EV_REQ , /// <3 Message to subscribers that the notification was generated by publisher
59 NPS_SUBSCRIBE_TO_EV_REQ , /// <4 Request to subscribe to a notification
60 NPS_UNSUBSCRIBE_FROM_EV_REQ , /// <5 Request to unsubscribe from a notification
61 NPS_SET_PERSIST_FILE_PATH_REQ , /// <6 Request to add a path to the list of files to be persisted
62 NPS_GET_PERS_DATA_REQ , /// <7 Request to get persistent data for specified notification
63 NPS_GET_PERS_DATA_ACK , /// <8 MSG from NPS to requester of persistent data.
64 NPS_GET_PERS_FILE_REQ , /// <9 Request to get persistent File from specified path
65 NPS_GET_PERS_FILE_ACK , /// <10 MSG from NPS to inform that file was retrieved from persistent
67 NPS_SAVE_PERS_DATA_REQ , /// <11 Request to save the persistent data to what ever file that has
69 NPS_SAVE_PERS_DATA_ACK , /// <12 MSG from NPS to requester of Save Action.
70 NPS_RELEASE_PERS_FILE_REQ , /// <13 Request to NPS to persist file in persistent memory
71 NPS_NPP_STOP_REQ , /// <14 MSG from system manager to NS_NPS to stop processing.
72 /// NS_NPS goes to idle state.
73 NPS_TST_WAKEUP , /// <15
74 NPS_BATCH_SUBSCRIBE_TO_EV_REQ , /// <16 Request to subscribe to a batch of notification(s)
75 NPS_GET_PERS_DATA_FAILED_ACK , /// <17 Failed to get persistent data
76 NPS_SET_PERSONALITY_REQ , /// <18 Request to change current user
77 NPS_CHANGE_PERSONALITY_REQ , /// <19 Request to change current user
78 NPS_USER_CHANGE_REQ , /// <20 MSG from NPS to frameworkunified applications.
79 NPS_SET_PERSIST_FOLDER_PATH_REQ , /// <21 Request to add a path to the folder to be persisted
80 NPS_GET_PERS_FOLDER_REQ , /// <22 Request to get persistent Folder from specified path
81 NPS_RELEASE_PERS_FOLDER_REQ , /// <23 Request to NPS to persist folder in persistent memory
82 NPS_GET_PERS_FOLDER_ACK, /// <24 Ack from NPS to requester to inform that folder was retrieved from persistent mem
84 NPS_NPP_STOP_ACK , /// <25 Ack from NS_NPS to system manager on NPS_NPP_STOP_REQ request
85 NPS_BATCH_UNSUBSCRIBE_FROM_EV_REQ , /// <26
86 NPS_GET_READYSTATUS_REQ , /// <27 Request from system manager to check the ready status of NPPService
87 NPS_GET_READYSTATUS_ACK , /// <28 Ack from NPPService to system manager, only if NPPService is in ready state
88 NPS_REGISTER_NOR_EV_REQ , /// <29 Request to register immediate notification
89 NPS_DELETE_PERSISTED_DATA_REQ , /// <30 Request to delete the persistent data.
90 NPS_DELETE_PERSISTED_DATA_ACK , /// <31 Ack of deleting the persistent data.
91 NPS_SET_DEFAULT_PERS_DATA , /// <32 Sets the default data for persistent notification.
92 NPS_SET_NOTFN_PERSISTENT_TYPE , /// <33 Sets the persistent type of notification.
93 NPS_SET_FILE_PERSISTENT_TYPE , /// <34 Sets the persistent type of file.
94 NPS_SET_FOLDER_PERSISTENT_TYPE , /// <35 Sets the persistent type of folder.
95 NPS_SYNCHRONOUS_WRITE_NOTIFY_REQ , /// <36 Updates the immediate notification data in NPPService,
96 /// when written using synchronous API.
97 NPS_IMMEDIATE_WRITE_ACK , /// <37 Sends the ack to publisher of immediate notification after
98 /// data is written to persistent memory.
99 NPS_NPP_SYNC_REQ /// <38 Processing which synchronizes by NPPService (syncfs)
100 } NS_NPServiceProtocol;
103 * \~english notification_persistent_service service event
105 typedef enum _NS_NPServiceEvent {
106 NPS_NPP_READY_EVENT = 0x100,
112 #endif /* __NATIVESERVICES_NP_SERVICE_PROTOCOL_H__ */ // NOLINT (build/header_guard)
113 /** @}*/ // end of notification_persistent_service
114 /** @}*/ // end of native_service
115 /** @}*/ // end of BaseSystem