This source file includes following definitions.
- instance_name
- service_type
#include "chrome/common/local_discovery/service_discovery_client.h"
namespace local_discovery {
ServiceDescription::ServiceDescription() {
}
ServiceDescription::~ServiceDescription() {
}
std::string ServiceDescription::instance_name() const {
size_t first_period = service_name.find_first_of('.');
return service_name.substr(0, first_period);
}
std::string ServiceDescription::service_type() const {
size_t first_period = service_name.find_first_of('.');
if (first_period == std::string::npos)
return "";
return service_name.substr(first_period+1);
}
}