Fawkes API  Fawkes Development Version
network_manager.h
1 
2 /***************************************************************************
3  * network_manager.h - Fawkes network manager
4  *
5  * Created: Wed Nov 15 23:52:40 2006
6  * Copyright 2006-2011 Tim Niemueller [www.niemueller.de]
7  *
8  ****************************************************************************/
9 
10 /* This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * (at your option) any later version. A runtime exception applies to
14  * this software (see LICENSE.GPL_WRE file mentioned below for details).
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU Library General Public License for more details.
20  *
21  * Read the full text in the LICENSE.GPL_WRE file in the doc directory.
22  */
23 
24 #ifndef __FAWKES_NETWORK_MANAGER_H_
25 #define __FAWKES_NETWORK_MANAGER_H_
26 
27 #include <string>
28 
29 namespace fawkes {
30 #if 0 /* just to make Emacs auto-indent happy */
31 }
32 #endif
33 class ThreadCollector;
34 class FawkesNetworkServerThread;
35 class FawkesNetworkHandler;
36 class FawkesNetworkHub;
37 class AvahiThread;
38 class NetworkNameResolver;
39 class ServicePublisher;
40 class ServiceBrowser;
41 
43 {
44  public:
45  FawkesNetworkManager(ThreadCollector *thread_collector,
46  bool enable_ipv4, bool enable_ipv6,
47  const std::string &listen_ipv4, const std::string &listen_ipv6,
48  unsigned short int fawkes_port,
49  const char *service_name);
51 
56 
57  unsigned short int fawkes_port() const;
58 
59  private:
60  unsigned short int __fawkes_port;
61  ThreadCollector *__thread_collector;
62  FawkesNetworkServerThread *__fawkes_network_thread;
63  AvahiThread *__avahi_thread;
64 
65  NetworkNameResolver *__nnresolver;
66  ServicePublisher *__service_publisher;
67  ServiceBrowser *__service_browser;
68 };
69 
70 } // end namespace fawkes
71 
72 #endif
Service browser.
Service publisher interface.
NetworkNameResolver * nnresolver()
Get network name resolver.
unsigned short int fawkes_port() const
Get Fawkes TCP port.
Fawkes library namespace.
Thread collector.
FawkesNetworkHub * hub()
Get Fawkes network hub.
Fawkes Network Hub.
Definition: hub.h:33
ServicePublisher * service_publisher()
Get service publisher.
FawkesNetworkManager(ThreadCollector *thread_collector, bool enable_ipv4, bool enable_ipv6, const std::string &listen_ipv4, const std::string &listen_ipv6, unsigned short int fawkes_port, const char *service_name)
Constructor.
Avahi main thread.
Definition: avahi_thread.h:54
Network name and address resolver.
Definition: resolver.h:48
ServiceBrowser * service_browser()
Get service browser.
Fawkes Network Manager.
Fawkes Network Thread.
Definition: server_thread.h:46