Commits

shuerhaaken committed ee2806c

API break: rename funtion

  • Participants
  • Parent commits b4fc44e

Comments (3)

Files changed (23)

bindings/c/taginfo_c.cc

 
 char * taginfo_info_get_title(const TagInfo_Info *info) {
     const Info *i = reinterpret_cast<const Info *>(info);
-    String title = i->get_track_name();
+    String title = i->get_title();
     char *s = ::strdup(title.toCString(true));
     if(stringManagementEnabled)
         strings.prepend(s);
 }
 void taginfo_info_set_title(TagInfo_Info *info, const char *title) {
     Info *i = reinterpret_cast<Info *>(info);
-    i->set_track_name(String(title, String::UTF8));
+    i->set_title(String(title, String::UTF8));
 }
 
 char * taginfo_info_get_albumartist(const TagInfo_Info *info) {

libtaginfo/info.cc

 
 void Info::read_virtual_tags(TagLib::Tag * tag) {
     if(tag) {
-        track_name  = tag->title();
+        title  = tag->title();
         artist      = tag->artist();
         album       = tag->album();
         genre       = tag->genre();
 
 void Info::write_virtual_tags(TagLib::Tag * tag) {
     if(changedflag & CHANGED_TITLE_TAG)
-        tag->setTitle(track_name);
+        tag->setTitle(title);
     if(changedflag & CHANGED_ARTIST_TAG)
         tag->setArtist(artist);
     if(changedflag & CHANGED_ALBUM_TAG)
     return true;
 }
 
-void Info::set_track_name(String new_track_name) {
-    track_name = new_track_name;
+void Info::set_title(String new_title) {
+    title = new_title;
     changedflag |= CHANGED_TITLE_TAG;
 }
 
-String Info::get_track_name() const {
-    return track_name;
+String Info::get_title() const {
+    return title;
 }
 
 void Info::set_genre(String new_genre) {

libtaginfo/taginfo.h

             String file_name;
             
             //Tags
-            String track_name;
+            String title;
             String genre;
             String artist;
             String album_artist;
             String get_file_name(void);
             
             //Tag access functions
-            String get_track_name(void) const;
-            void   set_track_name(String new_track_name);
+            String get_title(void) const;
+            void   set_title(String new_title);
             
             String get_genre(void) const;
             void   set_genre(String new_genre);

tests/read_aif/main.cc

     info = Info::create_tag_info(target);
     if( info ) {
         if( info->read() ) {
-            //std::cout << "info->artist: " << info->get_track_name() << std::endl;
-            if(info->get_track_name() == "Aiff Title" && info->get_artist() == "Aiff Artist") {
+            //std::cout << "info->artist: " << info->get_title() << std::endl;
+            if(info->get_title() == "Aiff Title" && info->get_artist() == "Aiff Artist") {
                 delete info;
                 if(remove(target.c_str()) != 0 )
                     return EXIT_FAILURE;

tests/read_ape/main.cc

         if( TagInfo->read() )
         {
             //std::cout << "TagInfo->artist: " << TagInfo->artist << std::endl;
-            if(TagInfo->get_track_name() == "APE title" && TagInfo->get_artist() == "APE artist") {
+            if(TagInfo->get_title() == "APE title" && TagInfo->get_artist() == "APE artist") {
                 delete TagInfo;
                 if(remove(target.c_str()) != 0 )
                     return EXIT_FAILURE;

tests/read_ext_header/main.cc

     {
         if( TagInfo->read() )
         {
-            //std::cout << "TagInfo->track_name: " << TagInfo->track_name << std::endl;
-            if(TagInfo->get_track_name() == "Title v1") {
+            //std::cout << "TagInfo->title: " << TagInfo->title << std::endl;
+            if(TagInfo->get_title() == "Title v1") {
                 delete TagInfo;
                 return EXIT_SUCCESS;
             }

tests/read_flac/main.cc

     TagInfo = Info::create_tag_info( val );
     if( TagInfo ) {
         if( TagInfo->read() ) {
-            //std::cout << "TagInfo->track_name: " << TagInfo->track_name << std::endl;
-            if(TagInfo->get_track_name() == "FLAC title") {
+            //std::cout << "TagInfo->title: " << TagInfo->title << std::endl;
+            if(TagInfo->get_title() == "FLAC title") {
                 delete TagInfo;
                 return EXIT_SUCCESS;
             }

tests/read_m4a/main.cc

     TagInfo = Info::create_tag_info(val);
     if(TagInfo) {
         if( TagInfo->read() ) {
-            //std::cout << "TagInfo->track_name: " << TagInfo->track_name << std::endl;
-            if(TagInfo->get_track_name() == "M4A title") {
+            //std::cout << "TagInfo->title: " << TagInfo->title << std::endl;
+            if(TagInfo->get_title() == "M4A title") {
                 delete TagInfo;
                 return EXIT_SUCCESS;
             }

tests/read_mp3_v1/main.cc

     {
         if( TagInfo->read() )
         {
-            if(TagInfo->get_track_name() == "MP3 title") {
+            if(TagInfo->get_title() == "MP3 title") {
                 delete TagInfo;
                 return EXIT_SUCCESS;
             }

tests/read_mp3_v2/main.cc

     TagInfo = Info::create_tag_info( val );
     if( TagInfo ) {
         if( TagInfo->read() ) {
-            //std::cout << "TagInfo->get_track_name: " << TagInfo->get_track_name() << std::endl;
+            //std::cout << "TagInfo->get_title: " << TagInfo->get_title() << std::endl;
             //std::cout << "TagInfo->artist: " << TagInfo->artist << std::endl;
             //std::cout << "TagInfo->album: " << TagInfo->album << std::endl;
-            if(TagInfo->get_track_name() == "MP3 title") {
+            if(TagInfo->get_title() == "MP3 title") {
                 delete TagInfo;
                 return EXIT_SUCCESS;
             }

tests/read_mpc/main.cc

     {
         if( TagInfo->read() )
         {
-            //std::cout << "TagInfo->track_name: " << TagInfo->track_name << std::endl;
-            if(TagInfo->get_track_name() == "MPC title") {
+            //std::cout << "TagInfo->title: " << TagInfo->title << std::endl;
+            if(TagInfo->get_title() == "MPC title") {
                 delete TagInfo;
                 return EXIT_SUCCESS;
             }

tests/read_ogg/main.cc

     TagInfo = Info::create_tag_info( val );
     if( TagInfo ) {
         if( TagInfo->read() ) {
-            //std::cout << "2TagInfo->track_name: " << TagInfo->track_name << std::endl;
-            if(TagInfo->get_track_name() == "OGG title") {
+            //std::cout << "2TagInfo->title: " << TagInfo->title << std::endl;
+            if(TagInfo->get_title() == "OGG title") {
                 delete TagInfo;
                 return EXIT_SUCCESS;
             }

tests/read_wma/main.cc

     TagInfo = Info::create_tag_info( val );
     if( TagInfo ) {
         if( TagInfo->read() ) {
-            //std::cout << "TagInfo->track_name: " << TagInfo->track_name << std::endl;
-            if(TagInfo->get_track_name() == "WMA title") {
+            //std::cout << "TagInfo->title: " << TagInfo->title << std::endl;
+            if(TagInfo->get_title() == "WMA title") {
                 delete TagInfo;
                 return EXIT_SUCCESS;
             }

tests/write_ape/main.cc

     
     info = Info::create_tag_info(target);
     if(info) {
-        info->set_track_name("titlöe");
+        info->set_title("titlöe");
         info->set_album_artist("äöé");
         info->write();
     }
     info = Info::create_tag_info(target);
     if( info ) {
         if(info->read()) {
-            if(info->get_track_name() == "titlöe" &&
+            if(info->get_title() == "titlöe" &&
                info->get_album_artist() == "äöé") {
                 delete info;
                 if(remove(target.c_str()) != 0 )

tests/write_flac/main.cc

     
     info = Info::create_tag_info(target);
     if( info ) {
-        info->set_track_name(TESTNAME);
+        info->set_title(TESTNAME);
         info->set_album_artist("äää");
         info->set_is_compilation(true);
         info->write();
     info = Info::create_tag_info(target);
     if( info ) {
         if( info->read() ) {
-            if(info->get_track_name() == TESTNAME &&
+            if(info->get_title() == TESTNAME &&
                info->get_is_compilation() == true &&
                info->get_album_artist() == "äää") {
                 delete info;

tests/write_m4a/main.cc

     TagInfo = Info::create_tag_info(target);
     if( TagInfo )
     {
-        TagInfo->set_track_name(TESTNAME);
+        TagInfo->set_title(TESTNAME);
         TagInfo->write();
     }
     delete TagInfo;
     {
         if( TagInfo->read() )
         {
-            if(TagInfo->get_track_name() == TESTNAME) {
+            if(TagInfo->get_title() == TESTNAME) {
                 delete TagInfo;
                 if(remove(target.c_str()) != 0 )
                     return EXIT_FAILURE;

tests/write_mp3/main.cc

     
     info = Info::create_tag_info(target);
     if( info ) {
-        info->set_track_name(TESTNAME);
+        info->set_title(TESTNAME);
         info->set_album_artist("äöé");
         info->set_is_compilation(true);
         info->write();
     info = Info::create_tag_info(target);
     if( info ) {
         if( info->read() ) {
-            if(info->get_track_name() == TESTNAME &&
+            if(info->get_title() == TESTNAME &&
                info->get_album_artist() == "äöé" &&
                info->get_is_compilation() == true) {
                 delete info;

tests/write_mpc/main.cc

     TagInfo = Info::create_tag_info(target);
     if( TagInfo )
     {
-        TagInfo->set_track_name(TESTNAME);
+        TagInfo->set_title(TESTNAME);
         TagInfo->write();
     }
     delete TagInfo;
     {
         if( TagInfo->read() )
         {
-            if(TagInfo->get_track_name() == TESTNAME) {
+            if(TagInfo->get_title() == TESTNAME) {
                 delete TagInfo;
                 if(remove(target.c_str()) != 0 )
                     return EXIT_FAILURE;

tests/write_ogg/main.cc

     
     info = Info::create_tag_info(target);
     if( info ) {
-        info->set_track_name(TESTNAME);
+        info->set_title(TESTNAME);
         info->set_album_artist("äöé");
         info->set_is_compilation(true);
         info->write();
     info = Info::create_tag_info(target);
     if( info ) {
         if( info->read() ) {
-            if(info->get_track_name() == TESTNAME &&
+            if(info->get_title() == TESTNAME &&
                info->get_album_artist() == "äöé" &&
                info->get_is_compilation() == true) {
                 delete info;

tests/write_speex/main.cc

     TagInfo = Info::create_tag_info(target);
     if( TagInfo )
     {
-        TagInfo->set_track_name(TESTNAME);
+        TagInfo->set_title(TESTNAME);
         TagInfo->set_album_artist("äéö");
         TagInfo->set_is_compilation(true);
         TagInfo->write();
     {
         if( TagInfo->read() )
         {
-            if(TagInfo->get_track_name() == TESTNAME &&
+            if(TagInfo->get_title() == TESTNAME &&
                TagInfo->get_is_compilation() == true &&
                TagInfo->get_album_artist() == "äéö") {
                 delete TagInfo;

tests/write_tta/main.cc

     
     TagInfo = Info::create_tag_info(target);
     if( TagInfo ) {
-        TagInfo->set_track_name(TESTNAME);
+        TagInfo->set_title(TESTNAME);
         TagInfo->set_album_artist("äöé");
         TagInfo->set_is_compilation(true);
         TagInfo->write();
     TagInfo = Info::create_tag_info(target);
     if( TagInfo ) {
         if( TagInfo->read() ) {
-            if(TagInfo->get_track_name() == TESTNAME &&
+            if(TagInfo->get_title() == TESTNAME &&
                TagInfo->get_album_artist() == "äöé" &&
                TagInfo->get_is_compilation() == true) {
                 delete TagInfo;

tests/write_wav/main.cc

     TagInfo = Info::create_tag_info(target);
     if( TagInfo )
     {
-        TagInfo->set_track_name(TESTNAME);
+        TagInfo->set_title(TESTNAME);
         TagInfo->set_album_artist("äöé");
         TagInfo->set_is_compilation(true);
         TagInfo->write();
     {
         if( TagInfo->read() )
         {
-            if(TagInfo->get_track_name() == TESTNAME &&
+            if(TagInfo->get_title() == TESTNAME &&
                TagInfo->get_album_artist() == "äöé" &&
                TagInfo->get_is_compilation() == true) {
                 delete TagInfo;

tests/write_wma/main.cc

     
     info = Info::create_tag_info(target);
     if( info ) {
-        info->set_track_name(TESTNAME);
+        info->set_title(TESTNAME);
         info->set_album_artist("äöé");
         info->write();
     }
     info = Info::create_tag_info(target);
     if( info ) {
         if( info->read() ) {
-            if(info->get_track_name() == TESTNAME &&
+            if(info->get_title() == TESTNAME &&
                info->get_album_artist() == "äöé") {
                 delete info;
                 if(remove(target.c_str()) != 0 )