Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10)

Unified Diff: cloud_print/gcp20/prototype/dns_txt_builder.h

Issue 16975004: Finished DNS-SD server. Finished Privet-specified DNS-SD server. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added strong control of size in PrivetDnsResponseBuilder. Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: cloud_print/gcp20/prototype/dns_txt_builder.h
diff --git a/cloud_print/gcp20/prototype/dns_txt_builder.h b/cloud_print/gcp20/prototype/dns_txt_builder.h
new file mode 100644
index 0000000000000000000000000000000000000000..84ad539cd78baba395f896cb7b2d3bdb7e4605b9
--- /dev/null
+++ b/cloud_print/gcp20/prototype/dns_txt_builder.h
@@ -0,0 +1,35 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CLOUD_PRINT_GCP20_PROTOTYPE_DNS_TXT_BUILDER_H_
+#define CLOUD_PRINT_GCP20_PROTOTYPE_DNS_TXT_BUILDER_H_
+
+#include <string>
+
+#include "base/basictypes.h"
+
+// Class for building TXT dns records.
+class DnsTxtBuilder {
+ public:
+ // Initializes builder.
+ DnsTxtBuilder();
+
+ // Destroys builder.
+ ~DnsTxtBuilder();
+
+ // Append one record.
+ void AddRecord(const char* str);
+
+ // Builds TXT rdata
+ const std::string& Build() const;
+
+ private:
+ // Stores rdata.
+ std::string record;
+
+ DISALLOW_COPY_AND_ASSIGN(DnsTxtBuilder);
+};
+
+#endif // CLOUD_PRINT_GCP20_PROTOTYPE_DNS_TXT_BUILDER_H_
+

Powered by Google App Engine
This is Rietveld 408576698