From 7652a2986b0d0ad55b2776685130f1c68d7108c7 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 6 Aug 2015 22:10:25 +0200 Subject: client/Response: new Client wrapper class for writing responses --- src/TagPrint.cxx | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'src/TagPrint.cxx') diff --git a/src/TagPrint.cxx b/src/TagPrint.cxx index 39027ba11..331cabda5 100644 --- a/src/TagPrint.cxx +++ b/src/TagPrint.cxx @@ -21,40 +21,40 @@ #include "TagPrint.hxx" #include "tag/Tag.hxx" #include "tag/TagSettings.h" -#include "client/Client.hxx" +#include "client/Response.hxx" -void tag_print_types(Client &client) +void +tag_print_types(Response &r) { int i; for (i = 0; i < TAG_NUM_OF_ITEM_TYPES; i++) { if (!ignore_tag_items[i]) - client_printf(client, "tagtype: %s\n", - tag_item_names[i]); + r.Format("tagtype: %s\n", tag_item_names[i]); } } void -tag_print(Client &client, TagType type, const char *value) +tag_print(Response &r, TagType type, const char *value) { - client_printf(client, "%s: %s\n", tag_item_names[type], value); + r.Format("%s: %s\n", tag_item_names[type], value); } void -tag_print_values(Client &client, const Tag &tag) +tag_print_values(Response &r, const Tag &tag) { for (const auto &i : tag) - client_printf(client, "%s: %s\n", - tag_item_names[i.type], i.value); + r.Format("%s: %s\n", tag_item_names[i.type], i.value); } -void tag_print(Client &client, const Tag &tag) +void +tag_print(Response &r, const Tag &tag) { if (!tag.duration.IsNegative()) - client_printf(client, "Time: %i\n" - "duration: %1.3f\n", - tag.duration.RoundS(), - tag.duration.ToDoubleS()); + r.Format("Time: %i\n" + "duration: %1.3f\n", + tag.duration.RoundS(), + tag.duration.ToDoubleS()); - tag_print_values(client, tag); + tag_print_values(r, tag); } -- cgit v1.2.3