[gnome-games/wip/aplazas/781334-refactor-game-sources: 3/4] gameinfo: Add GameinfoDoc.get_disc_set_ids_for_disc_id()



commit 434489c0177f2c4e8f869f17641ca57d34c517de
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.

 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]