BatteryMonitor Class Reference
A battery monitor. More...
#include <tools/battery_monitor/battery_monitor.h>

Public Member Functions | |
| BatteryMonitor (Glib::RefPtr< Gnome::Glade::Xml > ref_xml) | |
| Constructor. | |
| ~BatteryMonitor () | |
| Destructor. | |
| Gtk::Window & | get_window () const |
| Obtain the main window. | |
Protected Member Functions | |
| void | all_for_now () |
| All results have been retrieved. | |
| void | cache_exhausted () |
| Cache exhausted. | |
| void | browse_failed (const char *name, const char *type, const char *domain) |
| Failed to browse for a given service. | |
| void | service_added (const char *name, const char *type, const char *domain, const char *host_name, const struct sockaddr *addr, const socklen_t addr_size, uint16_t port, std::list< std::string > &txt, int flags) |
| A service has been announced on the network. | |
| void | service_removed (const char *name, const char *type, const char *domain) |
| A service has been removed from the network. | |
Detailed Description
A battery monitor.
Definition at line 40 of file battery_monitor.h.
Constructor & Destructor Documentation
| BatteryMonitor::BatteryMonitor | ( | Glib::RefPtr< Gnome::Glade::Xml > | ref_xml | ) |
Constructor.
- Parameters:
-
ref_xml Glade XML object
Definition at line 41 of file battery_monitor.cpp.
References fawkes::get_widget(), fawkes::Thread::start(), and fawkes::AvahiThread::watch_service().
| BatteryMonitor::~BatteryMonitor | ( | ) |
Destructor.
Definition at line 55 of file battery_monitor.cpp.
References fawkes::Thread::cancel(), and fawkes::Thread::join().
Member Function Documentation
| void BatteryMonitor::all_for_now | ( | ) | [protected, virtual] |
All results have been retrieved.
If you read the DNS-SD specs you will see that there is no explicit "not existent" or "end of records" message - it cannot be. But after some time it is assumed that there are no more records. If that is the case this method is called.
Implements fawkes::ServiceBrowseHandler.
Definition at line 72 of file battery_monitor.cpp.
| void BatteryMonitor::browse_failed | ( | const char * | name, | |
| const char * | type, | |||
| const char * | domain | |||
| ) | [protected, virtual] |
Failed to browse for a given service.
- Parameters:
-
name name of the service type type of the service domain domain of the service
Implements fawkes::ServiceBrowseHandler.
Definition at line 82 of file battery_monitor.cpp.
| void BatteryMonitor::cache_exhausted | ( | ) | [protected, virtual] |
Cache exhausted.
Implements fawkes::ServiceBrowseHandler.
Definition at line 77 of file battery_monitor.cpp.
| Gtk::Window & BatteryMonitor::get_window | ( | ) | const |
| void BatteryMonitor::service_added | ( | const char * | name, | |
| const char * | type, | |||
| const char * | domain, | |||
| const char * | host_name, | |||
| const struct sockaddr * | addr, | |||
| const socklen_t | addr_size, | |||
| uint16_t | port, | |||
| std::list< std::string > & | txt, | |||
| int | flags | |||
| ) | [protected, virtual] |
A service has been announced on the network.
- Parameters:
-
name name of the service type type of the service domain domain of the service host_name name of the host that provides the service addr pointer to sockaddr struct of appropriate type for address addr_size size of addr struct port port of the service txt list of txt records. flags extra flags, see Avahi documentation
Implements fawkes::ServiceBrowseHandler.
Definition at line 89 of file battery_monitor.cpp.
References BatteryMonitorTreeView::add_host().
| void BatteryMonitor::service_removed | ( | const char * | name, | |
| const char * | type, | |||
| const char * | domain | |||
| ) | [protected, virtual] |
A service has been removed from the network.
- Parameters:
-
name name of the service type type of the service domain domain of the service
Implements fawkes::ServiceBrowseHandler.
Definition at line 106 of file battery_monitor.cpp.
References BatteryMonitorTreeView::rem_host().
The documentation for this class was generated from the following files:
- src/tools/battery_monitor/battery_monitor.h
- src/tools/battery_monitor/battery_monitor.cpp

