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_NS_InterfaceunifiedLogCapture
19 /// \brief This file supports USB logging threads.
21 ///////////////////////////////////////////////////////////////////////////////
22 #ifndef LOGGER_SERVICE_SERVER_INCLUDE_SS_LOGGER_DEVICE_DETECTION_H_
23 #define LOGGER_SERVICE_SERVER_INCLUDE_SS_LOGGER_DEVICE_DETECTION_H_
25 #include <system_service/ss_devicedetection_service_notifications.h>
26 #include <system_service/ss_devicedetection_service_ifc.h>
27 #include "ss_logger_cfg.h"
28 #include "ss_logger_util.h"
30 extern const char * USB_INSERTED_RULE;
32 // USB device is ejected
33 extern const CHAR USB_EJECTED_RULE[];
35 // The trigger event file (/log/retrievelog.evt) file is found on USB
36 extern const CHAR USB_CAPTURE_LOG_EVENT_RULE[];
38 // When the command to update system with script is executed all the console
39 // output will be redirected to this file on /tmp folder. later it will be
41 extern const CHAR CAPTURE_LOG_FILENAME[];
44 extern const SI_32 INVALID_FD;
45 class CLoggerDeviceDetection {
47 CLoggerDeviceDetection();
48 ~CLoggerDeviceDetection();
50 EFrameworkunifiedStatus Initialize(HANDLE hApp, CLoggerCfg *f_pLoggerCfg);
51 EFrameworkunifiedStatus DD_ServiceAvailabilityCallBack(HANDLE hApp);
52 EFrameworkunifiedStatus DD_OpenSessionAckCallBack(HANDLE hApp);
53 EFrameworkunifiedStatus DD_CloseSessionAckCallBack(HANDLE hApp);
54 EFrameworkunifiedStatus DD_CloseSessionWithDevDetectionSrv(HANDLE hApp);
55 EFrameworkunifiedStatus DD_MediaDetectCallBack(HANDLE hApp);
57 EFrameworkunifiedStatus OnStop(void);
59 CLoggerCfg *m_pLoggerCfg;
61 /// Device Detection Class Instance
62 DeviceDetectionServiceIf m_devDetect;
64 CLoggerUtil *m_loggerUtil;
66 #endif // LOGGER_SERVICE_SERVER_INCLUDE_SS_LOGGER_DEVICE_DETECTION_H_