Music Hub  ..
A session-wide music playback service
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
call_monitor.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2014 Canonical Ltd
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License version 3 as
6  * published by the Free Software Foundation.
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU Lesser General Public License for more details.
12  *
13  * You should have received a copy of the GNU Lesser General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  *
16  * Author: Justin McPherson <justin.mcpherson@canonical.com>
17  */
18 
19 
20 #ifndef CALLMONITOR_H
21 #define CALLMONITOR_H
22 
23 #include <functional>
24 
25 class CallMonitorPrivate;
26 
28 {
29 public:
30  enum State { OffHook, OnHook };
31 
32  CallMonitor();
33  ~CallMonitor();
34 
35  void on_change(const std::function<void(CallMonitor::State)>& func);
36 
37 private:
39 };
40 
41 #endif // CALLMONITOR_H
void on_change(const std::function< void(CallMonitor::State)> &func)