[gnome-games] gameinfo: Add GameinfoDoc.get_disc_set_ids_for_disc_id()



commit c1b1d4c9c97c4302906cffc36e2ab057f76bf0aa
Author: Adrien Plazas <kekun plazas laposte net>
Date:   Fri Apr 14 15:47:17 2017 +0200

    gameinfo: Add GameinfoDoc.get_disc_set_ids_for_disc_id()
    
    This will be used in the next commit.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=781334

 src/gameinfo/gameinfo-doc.vala |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/src/gameinfo/gameinfo-doc.vala b/src/gameinfo/gameinfo-doc.vala
index 3eb74d2..df10a14 100644
--- a/src/gameinfo/gameinfo-doc.vala
+++ b/src/gameinfo/gameinfo-doc.vala
@@ -62,4 +62,10 @@ public class Games.GameinfoDoc : Object {
 
                return xml_doc.count_nodes (expr);
        }
+
+       public string[] get_disc_set_ids_for_disc_id (string disc_id) throws Error {
+               var expr = "/gameinfo/games/game/discs[disc[@id = \"" + disc_id + "\"]]/disc/@id";
+
+               return xml_doc.get_contents (expr);
+       }
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]