Commits

shuerhaaken  committed 9f7c991

update bindings

  • Participants
  • Parent commits 72566ed

Comments (0)

Files changed (5)

+commit 72566ede8b7a6ad9427c983ebeba60991aa08e4d
+Author: Jörn Magens <shuerhaaken@googlemail.com>
+Date:   Thu Mar 21 15:34:11 2013 +0100
+
+    handle rating and playcount
+
 commit 3824453c6a26c12c94f298dffbdaa93135699da9
 Author: Jörn Magens <shuerhaaken@googlemail.com>
 Date:   Thu Mar 21 14:20:14 2013 +0100

File bindings/c/taginfo_c.cc

     i->set_disk_number(number);
 }
 
+int taginfo_info_get_rating(const TagInfo_Info *info) {
+    const Info *i = reinterpret_cast<const Info *>(info);
+    return i->get_rating();
+}
+void taginfo_info_set_rating(TagInfo_Info *info, int rating) {
+    Info *i = reinterpret_cast<Info *>(info);
+    i->set_rating(rating);
+}
+
+int  taginfo_info_get_playcount(const TagInfo_Info *info) {
+    const Info *i = reinterpret_cast<const Info *>(info);
+    return i->get_playcount();
+}
+void taginfo_info_set_playcount(TagInfo_Info *info, int count) {
+    Info *i = reinterpret_cast<Info *>(info);
+    i->set_playcount(count);
+}
+
 BOOL taginfo_info_get_is_compilation(const TagInfo_Info *info) {
     const Info *i = reinterpret_cast<const Info *>(info);
     BOOL s = i->get_is_compilation();

File bindings/c/taginfo_c.h

 
 BOOL taginfo_info_get_has_image(const TagInfo_Info *info);
 
+// rating 1 - 5; 0 -> not set
+int  taginfo_info_get_rating(const TagInfo_Info *info);
+void taginfo_info_set_rating(TagInfo_Info *info, int rating);
+
+int  taginfo_info_get_playcount(const TagInfo_Info *info);
+void taginfo_info_set_playcount(TagInfo_Info *info, int count);
+
+int  taginfo_info_get_tracknumber(const TagInfo_Info *info);
+void taginfo_info_set_tracknumber(TagInfo_Info *info, int tracknumber);
+
 // deprecated - do not use
 char *taginfo_info_get_disk_string(const TagInfo_Info *info);
 // deprecated - do not use

File bindings/vala/libtaginfo_c.vapi

 			[CCode (cname = "taginfo_info_set_is_compilation")]
 			set;
 		}
+		public int rating {
+			[CCode (cname = "taginfo_info_get_rating")]
+			get;
+			[CCode (cname = "taginfo_info_set_rating")]
+			set;
+		}
+		public int playcount {
+			[CCode (cname = "taginfo_info_get_playcount")]
+			get;
+			[CCode (cname = "taginfo_info_set_playcount")]
+			set;
+		}
 		public int disk_number {
 			[CCode (cname = "taginfo_info_get_disk_number")]
 			owned get;

File libtaginfo/taginfo_internal.h

 
 
 namespace TagInfo {
-
+    // Internal changed flags
     enum ChangedData {
         CHANGED_DATA_NONE          = 0,
         CHANGED_ARTIST_TAG         = (1 << 0),