libshevek
Classes | Public Member Functions | Static Public Member Functions | List of all members
shevek::avahi Class Reference

Serve and browse the local network using avahi. More...

#include <avahi.hh>

Inheritance diagram for shevek::avahi:
shevek::refbase

Classes

class  browser
 Class for browsing other hosts. More...

Public Member Functions

void publish (Glib::ustring const &protocol, int port)
 Publish a service on a port.
Glib::RefPtr< browsercreate_browser (Glib::ustring const &protocol)
 Create a browser and populate it with a list of available hosts for the requested protocol.
 ~avahi ()
 Unpublish all ports and free all structures associated with the object.
- Public Member Functions inherited from shevek::refbase
template<typename _T >
Glib::RefPtr< _T > cast_dynamic ()
 Identical to GLib::RefPtr <>::cast_dynamic, but nicer to type.

Static Public Member Functions

static Glib::RefPtr< avahicreate (Glib::ustring const &name=Glib::ustring())
 Create an avahi object for serving and/or browsing.

Additional Inherited Members

- Protected Member Functions inherited from shevek::refbase
 refbase ()
 Constructor, increments reference count.
virtual ~refbase ()
 Destructor, decrements reference count and destroys the object if it reaches 0.
template<typename T >
Glib::RefPtr< T > refptr_this ()
 Get a RefPtr to this, protected because only members should need it.

Detailed Description

Serve and browse the local network using avahi.

Easy to use interface for serving and browsing avahi-supporting hosts. Note that it is not as configurable as using libavahi directly.

Member Function Documentation

Glib::RefPtr< avahi::browser > shevek::avahi::create_browser ( Glib::ustring const &  protocol)
inline

Create a browser and populate it with a list of available hosts for the requested protocol.

The browser must not contain a leading underscore, and must not contain the protocol specification. The actual requested port is _NAME._tcp. It is not possible to browse udp with this class.

void shevek::avahi::publish ( Glib::ustring const &  protocol,
int  port 
)

Publish a service on a port.

The protocol is the name of the protocol, without leading underscore and without protocol specification. The published port is _NAME._tcp. It is not possible to publish over udp with this class. Note that you must separately set up a server to listen on the port.


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