Fawkes API
Fawkes Development Version
|
A battery monitor. More...
#include <tools/battery_monitor/battery_monitor.h>
Public Member Functions | |
BatteryMonitor (Glib::RefPtr< Gtk::Builder > builder) | |
Constructor. More... | |
~BatteryMonitor () | |
Destructor. More... | |
Gtk::Window & | get_window () const |
Obtain the main window. More... | |
Protected Member Functions | |
void | all_for_now () |
All results have been retrieved. More... | |
void | cache_exhausted () |
Cache exhausted. More... | |
void | browse_failed (const char *name, const char *type, const char *domain) |
Failed to browse for a given service. More... | |
void | service_added (const char *name, const char *type, const char *domain, const char *host_name, const char *interface, 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. More... | |
void | service_removed (const char *name, const char *type, const char *domain) |
A service has been removed from the network. More... | |
A battery monitor.
Definition at line 39 of file battery_monitor.h.
BatteryMonitor::BatteryMonitor | ( | Glib::RefPtr< Gtk::Builder > | builder | ) |
Constructor.
builder | builder to get widgets from |
Definition at line 39 of file battery_monitor.cpp.
BatteryMonitor::~BatteryMonitor | ( | ) |
Destructor.
Definition at line 53 of file battery_monitor.cpp.
|
protectedvirtual |
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 70 of file battery_monitor.cpp.
|
protectedvirtual |
Failed to browse for a given service.
name | name of the service |
type | type of the service |
domain | domain of the service |
Implements fawkes::ServiceBrowseHandler.
Definition at line 80 of file battery_monitor.cpp.
|
protectedvirtual |
Cache exhausted.
Implements fawkes::ServiceBrowseHandler.
Definition at line 75 of file battery_monitor.cpp.
Gtk::Window & BatteryMonitor::get_window | ( | ) | const |
|
protectedvirtual |
A service has been announced on the network.
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 |
interface | name of network interface to reach 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 87 of file battery_monitor.cpp.
|
protectedvirtual |
A service has been removed from the network.
name | name of the service |
type | type of the service |
domain | domain of the service |
Implements fawkes::ServiceBrowseHandler.
Definition at line 105 of file battery_monitor.cpp.