mirror of
https://github.com/nasa/trick.git
synced 2025-01-10 06:52:52 +00:00
14a75508a3
Changed all header file once include variables to follow the same naming convention and not start with any underscores. Also deleted old incorrect copyright notices. Also removed $Id: tags from all files. Fixes #14. Fixes #22.
56 lines
933 B
C++
56 lines
933 B
C++
|
|
/*
|
|
PURPOSE:
|
|
(Test Zeroconf publishing.)
|
|
*/
|
|
|
|
#ifndef ZEROCONF_HH
|
|
#define ZEROCONF_HH
|
|
|
|
#include <string>
|
|
#ifdef HAVE_ZEROCONF
|
|
#if __linux
|
|
#include <avahi-client/client.h>
|
|
#include <avahi-client/publish.h>
|
|
#include <avahi-common/simple-watch.h>
|
|
#endif
|
|
#if __APPLE__
|
|
#include <dns_sd.h>
|
|
#endif
|
|
#endif
|
|
|
|
namespace Trick {
|
|
|
|
class Zeroconf {
|
|
public:
|
|
Zeroconf() ;
|
|
~Zeroconf() {} ;
|
|
|
|
int init() ;
|
|
|
|
std::string get_name() ;
|
|
void set_name(std::string) ;
|
|
|
|
std::string get_type() ;
|
|
void set_type(std::string) ;
|
|
|
|
protected:
|
|
std::string name ;
|
|
std::string type ;
|
|
#ifdef HAVE_ZEROCONF
|
|
#if __linux
|
|
AvahiSimplePoll *simple_poll ;
|
|
AvahiClient *client ;
|
|
AvahiEntryGroup *group ;
|
|
#endif
|
|
#if __APPLE__
|
|
DNSServiceRef dns_service_ref ;
|
|
#endif
|
|
#endif
|
|
|
|
} ;
|
|
|
|
}
|
|
|
|
#endif
|