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..6ab9999f6eb0c3df496fc42ce95a14d457f738b5 |
--- /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 { |
gene
2013/06/19 05:40:51
Instead of TxtBuilder, you can just make Dns build
maksymb
2013/06/19 21:47:21
Done.
|
+ public: |
+ // Creates empty builder. |
+ DnsTxtBuilder() {} |
+ |
+ // Destroys the object. |
+ ~DnsTxtBuilder() {} |
+ |
+ // Append one record. |
+ void AddRecord(const char* str); |
+ |
+ // Builds TXT rdata |
+ std::string Build() const; |
+ |
+ private: |
+ // Stores rdata. |
+ std::string record; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(DnsTxtBuilder); |
+}; |
+ |
+#endif // CLOUD_PRINT_GCP20_PROTOTYPE_DNS_TXT_BUILDER_H_ |
+ |