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_ |
+ |