Health: added thread dead-lock detection
[profile/ivi/layer-management.git] / LayerManagerBase / include / IHealthMonitor.h
1 /***************************************************************************
2 *
3 * Copyright 2012 BMW Car IT GmbH
4 *
5 *
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
9 *
10 *        http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 *
18 ****************************************************************************/
19
20 #ifndef __IHEALTHMONITOR_H__
21 #define __IHEALTHMONITOR_H__
22
23 #include "ilm_types.h"
24
25 class ICommandExecutor;
26 class Configuration;
27
28 class IHealthMonitor
29 {
30 public:
31     IHealthMonitor(ICommandExecutor& executor, Configuration& config);
32     virtual ~IHealthMonitor();
33
34     virtual t_ilm_bool start() = 0;
35     virtual t_ilm_bool stop() = 0;
36     virtual int getPluginReportIntervalInMs() = 0;
37
38 protected:
39     ICommandExecutor& mExecutor;
40     Configuration& mConfiguration;
41 };
42
43 inline
44 IHealthMonitor::IHealthMonitor(ICommandExecutor& executor, Configuration& config)
45 : mExecutor(executor)
46 , mConfiguration(config)
47 {
48 }
49
50 inline
51 IHealthMonitor::~IHealthMonitor()
52 {
53 }
54
55 #endif // __IHEALTHMONITOR_H__