diff options
author | Max Kellermann <max@duempel.org> | 2015-08-06 22:10:25 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2015-08-12 08:41:05 +0200 |
commit | 7652a2986b0d0ad55b2776685130f1c68d7108c7 (patch) | |
tree | b4d45e60e97757454f1ff8e4dc793a1e7d852c36 /src/TagPrint.cxx | |
parent | b1480167be487d09ff46bb86ad02041fb28acff1 (diff) |
client/Response: new Client wrapper class for writing responses
Diffstat (limited to 'src/TagPrint.cxx')
-rw-r--r-- | src/TagPrint.cxx | 30 |
1 files changed, 15 insertions, 15 deletions
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); } |