00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #include <howl.h>
00020 #include "zeroconf.hpp"
00021
00022 namespace obby
00023 {
00024
00025
00026 class zeroconf_howl : public zeroconf_base
00027 {
00028 public:
00029 zeroconf_howl();
00030 virtual ~zeroconf_howl();
00031
00032 virtual void publish(const std::string& name, unsigned int port);
00033 virtual void unpublish(const std::string& name);
00034 virtual void unpublish_all();
00035 virtual void discover();
00036 virtual void select();
00037 virtual void select(unsigned int msecs);
00038
00039 private:
00040 std::map<std::string, sw_discovery_oid> m_published;
00041
00042 sw_discovery m_session;
00043 sw_salt m_salt;
00044
00045 static sw_result HOWL_API handle_publish_reply(sw_discovery discovery,
00046 sw_discovery_oid oid,
00047 sw_discovery_publish_status status,
00048 sw_opaque extra);
00049 static sw_result HOWL_API handle_browse_reply(sw_discovery discovery,
00050 sw_discovery_oid id,
00051 sw_discovery_browse_status status,
00052 sw_uint32 interface_index,
00053 sw_const_string name,
00054 sw_const_string type,
00055 sw_const_string domain,
00056 sw_opaque extra);
00057 static sw_result HOWL_API handle_resolve_reply(sw_discovery discovery,
00058 sw_discovery_oid oid,
00059 sw_uint32 interface_index,
00060 sw_const_string name,
00061 sw_const_string type,
00062 sw_const_string domain,
00063 sw_ipv4_address address,
00064 sw_port port,
00065 sw_octets text_record,
00066 sw_ulong text_record_len,
00067 sw_opaque extra);
00068 };
00069
00070 }
00071