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..c89d3ff1fd82d32a659c9cf8909dd8885442fa47 |
--- /dev/null |
+++ b/cloud_print/gcp20/prototype/dns_txt_builder.h |
@@ -0,0 +1,38 @@ |
+// 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 |
+ void Build(std::string* out) const; |
Vitaly Buka (NO REVIEWS)
2013/06/14 19:27:07
Remove void Build(std::string* out)
maksymb
2013/06/14 22:17:14
Done.
|
+ |
+ // 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_ |
+ |