Change 'service_name' to 'service_type' Change _name to _type. Change-Id: I1f347f78951d95604a5df3e6cd81042d72cbfa6c
diff --git a/libweave/include/weave/mdns.h b/libweave/include/weave/mdns.h index d1b7232..5528f6e 100644 --- a/libweave/include/weave/mdns.h +++ b/libweave/include/weave/mdns.h
@@ -16,12 +16,12 @@ public: // Publishes new service on mDns or updates existing one. virtual void PublishService( - const std::string& service_name, + const std::string& service_type, uint16_t port, const std::map<std::string, std::string>& txt) = 0; // Stops publishing service. - virtual void StopPublishing(const std::string& service_name) = 0; + virtual void StopPublishing(const std::string& service_type) = 0; // Returns permanent device ID. // TODO(vitalybuka): Find better place for this information.
diff --git a/libweave/src/privet/publisher.cc b/libweave/src/privet/publisher.cc index 9daed21..4edb7bc 100644 --- a/libweave/src/privet/publisher.cc +++ b/libweave/src/privet/publisher.cc
@@ -21,7 +21,9 @@ namespace { // The name of the service we'll expose via peerd. -const char kPrivetServiceId[] = "privet"; +// TODO(rginda): This should become the proper mdns service, "_privet._tcp" +// if we drop peerd on ChromeOS. +const char kPrivetServiceType[] = "privet"; } // namespace @@ -82,12 +84,12 @@ if (!cloud_->GetDescription().empty()) txt_record.emplace("note", cloud_->GetDescription()); - mdns_->PublishService(kPrivetServiceId, port, txt_record); + mdns_->PublishService(kPrivetServiceType, port, txt_record); } void Publisher::RemoveService() { VLOG(1) << "Stopping service publishing."; - mdns_->StopPublishing(kPrivetServiceId); + mdns_->StopPublishing(kPrivetServiceType); } } // namespace privet