tag: convert to C++

This commit is contained in:
Max Kellermann
2013-07-30 20:11:57 +02:00
parent 6a9ab8bc0e
commit 06f898cc12
105 changed files with 711 additions and 723 deletions

View File

@@ -23,7 +23,7 @@
#include "audio_format.h"
#include "conf.h"
#include "stdbin.h"
#include "tag.h"
#include "Tag.hxx"
#include <glib.h>
@@ -83,15 +83,13 @@ main(G_GNUC_UNUSED int argc, G_GNUC_UNUSED char **argv)
encoder_to_stdout(*encoder);
struct tag *tag = tag_new();
tag_add_item(tag, TAG_ARTIST, "Foo");
tag_add_item(tag, TAG_TITLE, "Bar");
Tag tag;
tag.AddItem(TAG_ARTIST, "Foo");
tag.AddItem(TAG_TITLE, "Bar");
success = encoder_tag(encoder, tag, NULL);
success = encoder_tag(encoder, &tag, NULL);
assert(success);
tag_free(tag);
encoder_to_stdout(*encoder);
/* write another block of data */