update changelog
[profile/ivi/genivi/genivi-audio-manager.git] / AudioManagerDaemon / include / CAmWatchdog.h
1 /**
2  * Copyright (C) 2012, BMW AG
3  *
4  * This file is part of GENIVI Project AudioManager.
5  *
6  * Contributions are licensed to the GENIVI Alliance under one or more
7  * Contribution License Agreements.
8  *
9  * \copyright
10  * This Source Code Form is subject to the terms of the
11  * Mozilla Public License, v. 2.0. If a  copy of the MPL was not distributed with
12  * this file, You can obtain one at http://mozilla.org/MPL/2.0/.
13  *
14  *
15  * \author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
16  *
17  * \file CAmWatchdog.h
18  * For further information see http://www.genivi.org/.
19  *
20  */
21
22 #ifndef CAMWATCHDOG_H_
23 #define CAMWATCHDOG_H_
24
25 #include "shared/CAmSocketHandler.h"
26
27 namespace am
28 {
29
30 /**
31  * Implements the watchdog of the AudioManager with the help of systemd
32  */
33 class CAmWatchdog
34 {
35 public:
36     CAmWatchdog(CAmSocketHandler* CAmSocketHandler);
37     virtual ~CAmWatchdog();
38     void startWatchdog(); //!< starts the watchdog by sending ready to systemD
39     void timerCallback(sh_timerHandle_t handle, void * userData); //!< the watchdog timer callback
40     TAmShTimerCallBack<CAmWatchdog> TimerCallback;
41
42 private:
43     CAmSocketHandler* mpCAmSocketHandler; //!< pointer to the sockethandler
44     sh_timerHandle_t mHandle; //!< handle of the timer
45 };
46
47 } /* namespace am */
48 #endif /* CAMWATCHDOG_H_ */