summaryrefslogtreecommitdiffstats
path: root/cloud_print/gcp20/prototype/printer.cc
diff options
context:
space:
mode:
authornoamsml@chromium.org <noamsml@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-31 09:00:40 +0000
committernoamsml@chromium.org <noamsml@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-31 09:00:40 +0000
commitb18498d8895b8c86b7e9d2b5a08a360639b920f8 (patch)
tree667c7bec61a2664778ed9d6cae86b822f667d7c6 /cloud_print/gcp20/prototype/printer.cc
parent269c2e84b46cb72986f60775efbfd5022fc75c9d (diff)
downloadchromium_src-b18498d8895b8c86b7e9d2b5a08a360639b920f8.zip
chromium_src-b18498d8895b8c86b7e9d2b5a08a360639b920f8.tar.gz
chromium_src-b18498d8895b8c86b7e9d2b5a08a360639b920f8.tar.bz2
Make gcp20_device respond to _printer._sub._privet.local queries
Make the GCP2.0 prototype respond to printer subtype queries and announce itself using the printer subtype record. BUG= Review URL: https://codereview.chromium.org/52113004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@232051 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cloud_print/gcp20/prototype/printer.cc')
-rw-r--r--cloud_print/gcp20/prototype/printer.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/cloud_print/gcp20/prototype/printer.cc b/cloud_print/gcp20/prototype/printer.cc
index 9513979..7c4141e 100644
--- a/cloud_print/gcp20/prototype/printer.cc
+++ b/cloud_print/gcp20/prototype/printer.cc
@@ -32,6 +32,7 @@ const uint16 kHttpPortDefault = 10101;
const uint32 kTtlDefault = 60*60; // in seconds
const char kServiceType[] = "_privet._tcp.local";
+const char kSecondaryServiceType[] = "_printer._sub._privet._tcp.local";
const char kServiceNamePrefixDefault[] = "first_gcp20_device";
const char kServiceDomainNameDefault[] = "my-privet-device.local";
@@ -825,7 +826,8 @@ bool Printer::StartDnsServer() {
std::string service_domain_name =
command_line_reader::ReadDomainName(kServiceDomainNameDefault);
- ServiceParameters params(kServiceType, service_name_prefix,
+ ServiceParameters params(kServiceType, kSecondaryServiceType,
+ service_name_prefix,
service_domain_name, ip, port);
return dns_server_.Start(params,
@@ -911,4 +913,3 @@ bool Printer::ChangeState(ConnectionState new_state) {
return true;
}
-