Fawkes API  Fawkes Development Version
BatteryMonitor Class Reference

A battery monitor. More...

#include <tools/battery_monitor/battery_monitor.h>

Inheritance diagram for BatteryMonitor:

List of all members.

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.

Author:
Daniel Beck

Constructor & Destructor Documentation

BatteryMonitor::BatteryMonitor ( Glib::RefPtr< Gnome::Glade::Xml >  ref_xml)

Constructor.

Parameters:
ref_xmlGlade XML object

Definition at line 39 of file battery_monitor.cpp.

BatteryMonitor::~BatteryMonitor ( )

Destructor.

Definition at line 53 of file battery_monitor.cpp.


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 70 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:
namename of the service
typetype of the service
domaindomain of the service

Implements fawkes::ServiceBrowseHandler.

Definition at line 80 of file battery_monitor.cpp.

void BatteryMonitor::cache_exhausted ( ) [protected, virtual]

Cache exhausted.

Implements fawkes::ServiceBrowseHandler.

Definition at line 75 of file battery_monitor.cpp.

Gtk::Window & BatteryMonitor::get_window ( ) const

Obtain the main window.

Returns:
the main window

Definition at line 64 of file battery_monitor.cpp.

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:
namename of the service
typetype of the service
domaindomain of the service
host_namename of the host that provides the service
addrpointer to sockaddr struct of appropriate type for address
addr_sizesize of addr struct
portport of the service
txtlist of txt records.
flagsextra flags, see Avahi documentation

Implements fawkes::ServiceBrowseHandler.

Definition at line 87 of file battery_monitor.cpp.

void BatteryMonitor::service_removed ( const char *  name,
const char *  type,
const char *  domain 
) [protected, virtual]

A service has been removed from the network.

Parameters:
namename of the service
typetype of the service
domaindomain of the service

Implements fawkes::ServiceBrowseHandler.

Definition at line 104 of file battery_monitor.cpp.


The documentation for this class was generated from the following files: