Init basesystem source codes.
[staging/basesystem.git] / systemservice / system_manager / server / include / crashdetector / ss_crashdetector.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_SystemManager
19 /// \brief    This file provides support for child process exit detection.
20 ///
21 ///////////////////////////////////////////////////////////////////////////////
22
23 #ifndef SS_CRASH_DETECTOR_H_  // NOLINT
24 #define SS_CRASH_DETECTOR_H_
25
26 #include <string>
27
28 class CCrashDetector {
29  public:
30               CCrashDetector();
31   virtual    ~CCrashDetector();
32   EFrameworkunifiedStatus  CrashDetectorInitialize(HANDLE hApp);
33   PCSTR       CrashDetectorGetThreadName();
34
35   HANDLE      m_hSmQueue;
36
37  private:
38   SI_32       CrashDetectorGetThreadPriority();
39
40   HANDLE      m_hApp;
41   pthread_t   m_ThreadId;
42   std::string m_ThreadName;
43   SI_32       m_siPriority;
44 };
45
46 #endif  // SS_CRASH_DETECTOR_H_  // NOLINT