Fawkes API
Fawkes Development Version
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
All
Classes
Namespaces
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Groups
Pages
battery_monitor.h
1
2
/***************************************************************************
3
* battery_monitor.h - Fawkes Battery Monitor
4
*
5
* Created: Mon Apr 06 17:09:40 2009
6
* Copyright 2009 Daniel Beck
7
*
8
****************************************************************************/
9
10
/* This program is free software; you can redistribute it and/or modify
11
* it under the terms of the GNU General Public License as published by
12
* the Free Software Foundation; either version 2 of the License, or
13
* (at your option) any later version.
14
*
15
* This program is distributed in the hope that it will be useful,
16
* but WITHOUT ANY WARRANTY; without even the implied warranty of
17
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
* GNU Library General Public License for more details.
19
*
20
* Read the full text in the LICENSE.GPL file in the doc directory.
21
*/
22
23
#ifndef __TOOLS_BATTERY_MONITOR_BATTERY_MONITOR_H_
24
#define __TOOLS_BATTERY_MONITOR_BATTERY_MONITOR_H_
25
26
#include <netcomm/service_discovery/browse_handler.h>
27
28
#include <gtkmm.h>
29
30
#include <map>
31
#include <string>
32
33
class
BatteryMonitorTreeView
;
34
35
namespace
fawkes {
36
class
AvahiThread;
37
}
38
39
class
BatteryMonitor
40
:
public
Gtk::Window,
41
fawkes::ServiceBrowseHandler
42
{
43
public
:
44
BatteryMonitor
(Glib::RefPtr<Gtk::Builder> builder);
45
~BatteryMonitor
();
46
47
Gtk::Window&
get_window
()
const
;
48
49
protected
:
50
// service browser handler
51
void
all_for_now
();
52
void
cache_exhausted
();
53
void
browse_failed
(
const
char
* name,
54
const
char
* type,
55
const
char
* domain );
56
void
service_added
(
const
char
* name,
57
const
char
* type,
58
const
char
* domain,
59
const
char
* host_name,
60
const
struct
sockaddr* addr,
61
const
socklen_t addr_size,
62
uint16_t port,
63
std::list<std::string>& txt,
64
int
flags );
65
void
service_removed
(
const
char
* name,
66
const
char
* type,
67
const
char
* domain );
68
69
private
:
70
void
on_btn_quit_clicked();
71
72
Gtk::Window* m_wnd_main;
73
BatteryMonitorTreeView
* m_trv_battery;
74
Gtk::Button* m_btn_quit;
75
76
std::map< std::string, std::string > m_services;
77
fawkes::AvahiThread
* m_avahi;
78
};
79
80
#endif
/* __TOOLS_BATTERY_MONITOR_BATTERY_MONITOR_H_ */
src
tools
battery_monitor
battery_monitor.h
Generated by
1.8.1.1