ubit
zeroconf.hpp
1 /*************************************************************************
2 *
3 * zeroconf.hpp - UMS Server
4 * Ubit GUI Toolkit - Version 6.0
5 * (C) 2003-2008 Eric Lecolinet / ENST Paris / www.enst.fr/~elc/ubit
6 *
7 * ***********************************************************************
8 * COPYRIGHT NOTICE :
9 * THIS PROGRAM IS DISTRIBUTED WITHOUT ANY WARRANTY AND WITHOUT EVEN THE
10 * IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
11 * YOU CAN REDISTRIBUTE IT AND/OR MODIFY IT UNDER THE TERMS OF THE GNU
12 * GENERAL PUBLIC LICENSE AS PUBLISHED BY THE FREE SOFTWARE FOUNDATION;
13 * EITHER VERSION 2 OF THE LICENSE, OR (AT YOUR OPTION) ANY LATER VERSION.
14 * SEE FILES 'COPYRIGHT' AND 'COPYING' FOR MORE DETAILS.
15 * ***********************************************************************/
16 
17 #ifndef _zeroconf_hpp_
18 #define _zeroconf_hpp_
19 
20 #include "umserver.hpp"
21 #ifdef MACOSX
22 # include <CoreFoundation/CoreFoundation.h>
23 # include <DNSServiceDiscovery/DNSServiceDiscovery.h>
24 #else
25 # include <avahi-client/client.h>
26 #endif
27 
28 /* ==================================================== ======== ======= */
29 
30 class Mdns {
31 public:
32  Mdns(UMServer*, const char* hostname);
33  ~Mdns();
34 
35  bool registerUMSservice(const char* hostname, int portNo);
36  bool browseUMSservices();
37  void resolveAndAddRemoteUMS(const char* name, const char* type, const char* domain);
38 
39  static UMServer* ums;
40 
41  // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
42 
43 #ifdef MACOSX
44  dns_service_discovery_ref browse_client;
45 #else
46  //mDNS mdns;
47  bool ok;
48  struct {
49  //mDNS_PlatformSupport platform; // Stores this platform's globals
50  //CacheRecord cache[500];
51  } sto;
52  struct {
53  //DNSQuestion question;
54  bool ok;
55  } brw;
56  struct reg {
57  //ServiceRecordSet record_set;
58  bool ok;
59  } reg;
60 #endif
61 };
62 
63 #endif
64 /* ==================================================== [TheEnd] ======= */
65 /* ==================================================== [(c)Elc] ======= */
Definition: zeroconf.hpp:30
UMS server main class.
Definition: umserver.hpp:152
Definition: zeroconf.hpp:56