23 #include "fountain_thread.h" 25 #include <core/exceptions/software.h> 26 #include <fvutils/net/fuse_server.h> 41 :
Thread(
"FountainThread", OPMODE_WAITFORWAKEUP)
51 if ( __fuse_server ) {
65 unsigned int port = 0;
68 if ( port > 0xFFFF ) {
72 bool enable_ipv4 =
true;
73 bool enable_ipv6 =
true;
74 std::string listen_ipv4;
75 std::string listen_ipv6;
91 __fuse_server =
new FuseServer(enable_ipv4, enable_ipv6,
92 listen_ipv4, listen_ipv6,
101 std::string sname =
"Fountain on ";
103 __service =
new NetworkService(sname.c_str(),
"_fountain._tcp", port);
114 delete __fuse_server;
115 __fuse_server = NULL;
125 printf(
"Sucker Loop\n");
FireVision FUSE protocol server.
ServicePublisher * service_publisher
Service publisher to publish services on the network.
virtual void unpublish_service(NetworkService *service)=0
Revoke service publication.
virtual void remove(ThreadList &tl)=0
Remove multiple threads.
virtual void publish_service(NetworkService *service)=0
Publish service.
Fawkes library namespace.
virtual bool get_bool(const char *path)=0
Get value from configuration which is of type bool.
virtual void init()
Initialize the thread.
virtual void loop()
Code to execute in the thread.
Thread class encapsulation of pthreads.
ThreadCollector * thread_collector
Thread collector.
FountainThread()
Constructor.
const char * short_hostname()
Get short hostname.
Base class for exceptions in Fawkes.
NetworkNameResolver * nnresolver
Network name resolver to lookup IP addresses of hostnames and vice versa.
virtual void add(ThreadList &tl)=0
Add multiple threads.
Representation of a service announced or found via service discovery (i.e.
void print_trace()
Prints trace to stderr.
virtual void finalize()
Finalize the thread.
virtual unsigned int get_uint(const char *path)=0
Get value from configuration which is of type unsigned int.
~FountainThread()
Destructor.
Configuration * config
This is the Configuration member used to access the configuration.
virtual std::string get_string(const char *path)=0
Get value from configuration which is of type string.