Re-organized sub-directory by category
[staging/basesystem.git] / service / system / interface_unified / library / include / system_service / interfaceunified_system_application.h
diff --git a/service/system/interface_unified/library/include/system_service/interfaceunified_system_application.h b/service/system/interface_unified/library/include/system_service/interfaceunified_system_application.h
new file mode 100755 (executable)
index 0000000..fe5224e
--- /dev/null
@@ -0,0 +1,219 @@
+/*
+ * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
+ *
+ * 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.
+ */
+
+/**
+ * @file interfaceunified_system_application.h
+ * @brief This file supports the System Manager AGL framework client
+ *        interface.
+ */
+
+#ifndef INTERFACEUNIFIED_SYSTEM_APPLICATION_H_  // NOLINT (build/header_guard)
+#define INTERFACEUNIFIED_SYSTEM_APPLICATION_H_
+
+/** @addtogroup BaseSystem
+ *  @{
+ */
+/** @addtogroup system_service
+ *  @ingroup BaseSystem
+ *  @{
+ */
+/** @addtogroup interface_unified
+ *  @ingroup system_service
+ *  @{
+ */
+#include <native_service/frameworkunified_types.h>
+  /////////////////////////////////////////////////////////////////////////////////////
+  /// \ingroup InterfaceunifiedSystemConnectToPowerSerivce
+  /// \~english @par Summary
+  ///      Subscribe and attach call backs to notifications, to PowerSerivce!
+  /// \~english @param [in] hApp
+  ///       HANDLE - App handle
+  /// \~english @retval eFrameworkunifiedStatusOK Success
+  /// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
+  /// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
+  /// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid type of handle
+  /// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue is full
+  /// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid File-Descriptor
+  /// \~english @retval eFrameworkunifiedStatusErrNoEINTR An interrupt is generated by the system call (signal)
+  /// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer-size
+  /// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
+  /// \~english @retval eFrameworkunifiedStatusErrOther Other error has occurred(Cannot access shared memory, etc.)
+  /// \~english @par Preconditions
+  /// \~english @par Change of the internal state
+  ///       - Change of internal state according to the API does not occur.
+  /// \~english @par Conditions of processing failure
+  ///       - Pointer (pNtfyHandler) is NULL to the structure of the Notification Handler specified in the argument.
+  ///         [eFrameworkunifiedStatusInvldParam]
+  ///       - Notification Handler number specified in the argument (uiHandlerCount) 0. [eFrameworkunifiedStatusInvldParam]
+  ///       - HANDLE specified in the argument (hApp) is NULL. [eFrameworkunifiedStatusInvldParam]
+  ///       - HANDLE specified in the argument (hApp) is not appropriate(which is invalid). [eFrameworkunifiedStatusInvldParam]
+  ///       - Notification Handler number specified in the argument (uiHandlerCount) has exceeded
+  ///         the maximum number of Notification.[eFrameworkunifiedStatusFail]
+  ///       - The acquisition of the buffer for storing a plurality of information of
+  ///         Notification Handler specified by the argument has failed. [eFrameworkunifiedStatusInvldParam]
+  ///       - Can not be acquired memory in the acquisition of the buffer of the message for transmission (malloc).
+  ///         [eFrameworkunifiedStatusFail]
+  ///       - Message queue HANDLE in HANDLE specified in the argument (hApp) is NULL. [eFrameworkunifiedStatusInvldParam]
+  ///       - HANDLE specified in the argument message queue HANDLE in (hApp) is not appropriate (which is invalid).
+  ///         [eFrameworkunifiedStatusInvldParam]
+  ///       - Message queue name of HANDLE specified in the argument (hApp)
+  ///         is not appropriate(The name is NULL, more than 20byte) [eFrameworkunifiedStatusInvldHandle]
+  ///       - Message queue type of HANDLE specified in the argument (hApp) is not a transmission.
+  ///         [eFrameworkunifiedStatusInvldHndlType]
+  ///       - Session message queue is full to the NPP Service. [eFrameworkunifiedStatusMsgQFull]
+  ///       - It is invalid transmission file descriptor of the session message to the NPP Service.
+  ///         [eFrameworkunifiedStatusErrNoEBADF]
+  ///       - Interruption by the system call (signal) has occurred during the transmission of the session message
+  ///         for the NPP Service. [eFrameworkunifiedStatusErrNoEINTR]
+  ///       - Incorrect size of the transmit buffer of the session message to the NPP Service. [eFrameworkunifiedStatusInvldBufSize]
+  ///       - Any errors occur during the transmission of a session message to the NPP Service. [eFrameworkunifiedStatusFail]
+  ///       - It failed to shared memory access for transmission of the session message for the NPP Service.
+  ///         [eFrameworkunifiedStatusErrOther]
+  /// \~english @par Classification
+  ///          Public
+  /// \~english @par Type
+  ///          None
+  /// \~english @par Detail
+  ///          Subscribe and attach call backs to notifications, to PowerSerivce! \n
+  ///          if callback has not subscribe,resubscribe! \n
+  ///          if callback has been subscribed,initialize!
+  /// \~english @see FrameworkunifiedGetAppName FrameworkunifiedSubscribeNotificationsWithCallback
+  ////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus InterfaceunifiedSystemConnectToPowerSerivce(HANDLE hApp);
+  /////////////////////////////////////////////////////////////////////////////////////
+  /// \ingroup InterfaceunifiedSystemConnectToPowerSerivce
+  /// \~english @par Summary
+  ///      Called from framework for every app to start connection to HeartBeat
+  /// \~english @param [in] hApp
+  ///       HANDLE - App handle, Handle to message queue of HeartBeat Service.
+  /// \~english @retval eFrameworkunifiedStatusOK Success
+  /// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
+  /// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
+  /// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid type of handle
+  /// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue is full
+  /// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid File-Descriptor
+  /// \~english @retval eFrameworkunifiedStatusErrNoEINTR An interrupt is generated by the system call (signal)
+  /// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer-size
+  /// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
+  /// \~english @retval eFrameworkunifiedStatusErrOther Other error has occurred(Cannot access shared memory, etc.)
+  /// \~english @par Preconditions
+  /// \~english @par Change of the internal state
+  ///       - Change of internal state according to the API does not occur.
+  /// \~english @par Conditions of processing failure
+  ///       - Pointer (pNtfyHandler) is NULL to the structure of the Notification Handler specified
+  ///         in the argument. [eFrameworkunifiedStatusInvldParam]
+  ///       - Notification Handler number specified in the argument (uiHandlerCount) 0. [eFrameworkunifiedStatusInvldParam]
+  ///       - HANDLE specified in the argument (hApp) is NULL. [eFrameworkunifiedStatusInvldParam]
+  ///       - HANDLE specified in the argument (hApp) is not appropriate(which is invalid). [eFrameworkunifiedStatusInvldParam]
+  ///       - Notification Handler number specified in the argument (uiHandlerCount) has exceeded
+  ///         the maximum number of Notification. [eFrameworkunifiedStatusFail]
+  ///       - The acquisition of the buffer for storing a plurality of information of
+  ///         Notification Handler specified by the argument has failed. [eFrameworkunifiedStatusInvldParam]
+  ///       - Can not be acquired memory in the acquisition of the buffer of the message for transmission (malloc).
+  ///         [eFrameworkunifiedStatusFail]
+  ///       - Message queue HANDLE in HANDLE specified in the argument (hApp) is NULL. [eFrameworkunifiedStatusInvldParam]
+  ///       - HANDLE specified in the argument message queue HANDLE in (hApp) is not appropriate (which is invalid).
+  ///         [eFrameworkunifiedStatusInvldParam]
+  ///       - Message queue name of HANDLE specified in the argument (hApp)
+  ///         is not appropriate(The name is NULL, more than 20byte) [eFrameworkunifiedStatusInvldHandle]
+  ///       - Message queue type of HANDLE specified in the argument (hApp) is not a transmission.
+  //          [eFrameworkunifiedStatusInvldHndlType]
+  ///       - Session message queue is full to the NPP Service. [eFrameworkunifiedStatusMsgQFull]
+  ///       - It is invalid transmission file descriptor of the session message to the NPP Service.
+  ///         [eFrameworkunifiedStatusErrNoEBADF]
+  ///       - Interruption by the system call (signal) has occurred during the transmission of
+  ///         the session message for the NPP Service. [eFrameworkunifiedStatusErrNoEINTR]
+  ///       - Incorrect size of the transmit buffer of the session message to the NPP Service.
+  ///         [eFrameworkunifiedStatusInvldBufSize]
+  ///       - Any errors occur during the transmission of a session message to the NPP Service.
+  ///         [eFrameworkunifiedStatusFail]
+  ///       - It failed to shared memory access for transmission of the session message
+  ///         for the NPP Service. [eFrameworkunifiedStatusErrOther]
+  /// \~english @par Classification
+  ///          Public
+  /// \~english @par Type
+  ///          None
+  /// \~english @par Detail
+  ///          Called from framework for every app to start connection to HeartBeat \n
+  ///          if app has not connection,reconnection! \n
+  ///          if app has been connectioned,initialize it!
+  /// \~english @see FrameworkunifiedGetAppName FrameworkunifiedAttachCallbacksToDispatcher
+  ////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus InterfaceunifiedSystemConnectToHeartBeatService(HANDLE hApp);
+  /////////////////////////////////////////////////////////////////////////////////////
+  /// \ingroup InterfaceunifiedSystemConnectToPowerSerivce
+  /// \~english @par Summary
+  ///      Subscribe and attach callbacks to System Manager Service!
+  /// \~english @param [in] hApp
+  ///       HANDLE - App handle.
+  /// \~english @retval eFrameworkunifiedStatusOK Success
+  /// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
+  /// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
+  /// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid type of handle
+  /// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue is full
+  /// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid File-Descriptor
+  /// \~english @retval eFrameworkunifiedStatusErrNoEINTR An interrupt is generated by the system call (signal)
+  /// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer-size
+  /// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
+  /// \~english @retval eFrameworkunifiedStatusErrOther Other error has occurred(Cannot access shared memory, etc.)
+  /// \~english @par Preconditions
+  /// \~english @par Change of the internal state
+  ///       - Change of internal state according to the API does not occur.
+  /// \~english @par Conditions of processing failure
+  ///       - Pointer (pNtfyHandler) is NULL to the structure of
+  ///         the Notification Handler specified in the argument. [eFrameworkunifiedStatusInvldParam]
+  ///       - Notification Handler number specified in the argument (uiHandlerCount) 0. [eFrameworkunifiedStatusInvldParam]
+  ///       - HANDLE specified in the argument (hApp) is NULL. [eFrameworkunifiedStatusInvldParam]
+  ///       - HANDLE specified in the argument (hApp) is not appropriate(which is invalid). [eFrameworkunifiedStatusInvldParam]
+  ///       - Notification Handler number specified in the argument (uiHandlerCount)
+  ///         has exceeded the maximum number of Notification. [eFrameworkunifiedStatusFail]
+  ///       - The acquisition of the buffer for storing a plurality of information of
+  ///         Notification Handler specified by the argument has failed. [eFrameworkunifiedStatusInvldParam]
+  ///       - Can not be acquired memory in the acquisition of the buffer of
+  ///         the message for transmission (malloc). [eFrameworkunifiedStatusFail]
+  ///       - Message queue HANDLE in HANDLE specified in the argument (hApp) is NULL. [eFrameworkunifiedStatusInvldParam]
+  ///       - HANDLE specified in the argument message queue HANDLE in (hApp)
+  ///         is not appropriate (which is invalid). [eFrameworkunifiedStatusInvldParam]
+  ///       - Message queue name of HANDLE specified in the argument (hApp)
+  ///         is not appropriate(The name is NULL, more than 20byte) [eFrameworkunifiedStatusInvldHandle]
+  ///       - Message queue type of HANDLE specified in the argument (hApp)
+  ///         is not a transmission. [eFrameworkunifiedStatusInvldHndlType]
+  ///       - Session message queue is full to the NPP Service. [eFrameworkunifiedStatusMsgQFull]
+  ///       - It is invalid transmission file descriptor of the session message to the NPP Service.
+  ///         [eFrameworkunifiedStatusErrNoEBADF]
+  ///       - Interruption by the system call (signal) has occurred during the transmission of
+  ///         the session message for the NPP Service. [eFrameworkunifiedStatusErrNoEINTR]
+  ///       - Incorrect size of the transmit buffer of the session message to the NPP Service. [eFrameworkunifiedStatusInvldBufSize]
+  ///       - Any errors occur during the transmission of a session message to the NPP Service. [eFrameworkunifiedStatusFail]
+  ///       - It failed to shared memory access for transmission of the session message for
+  ///         the NPP Service. [eFrameworkunifiedStatusErrOther]
+  /// \~english @par Classification
+  ///          Public
+  /// \~english @par Type
+  ///          None
+  /// \~english @par Detail
+  ///          Subscribe and attach callbacks to System Manager Service! \n
+  ///          if app has not Subscribed,resubscribe!
+  /// \~english @see FrameworkunifiedGetAppName SystemManagerOpenSender
+  ////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus InterfaceunifiedSystemConnectToSystemManagerService(HANDLE hApp);
+
+/** @}*/
+/** @}*/
+/** @}*/
+
+
+#endif /* INTERFACEUNIFIED_SYSTEM_APPLICATION_H_ */  // NOLINT (build/header_guard)