graveman-cvs
[Top][All Lists]
Advanced

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

[Graveman-cvs] Changes to graveman/current/src/matos.c


From: sylvain cresto
Subject: [Graveman-cvs] Changes to graveman/current/src/matos.c
Date: Tue, 08 Feb 2005 13:06:57 -0500

Index: graveman/current/src/matos.c
diff -u graveman/current/src/matos.c:1.9 graveman/current/src/matos.c:1.10
--- graveman/current/src/matos.c:1.9    Tue Feb  8 02:32:57 2005
+++ graveman/current/src/matos.c        Tue Feb  8 18:06:51 2005
@@ -96,6 +96,28 @@
   if (g_slist_length(Glistdrives)==0) Glistdrives = NULL;
 }
 
+void get_current_matos(gboolean *Areadcd, gboolean *Awritecdr, gboolean 
*Awritecdrw, gboolean *Areaddvd, gboolean *Awritedvd)
+{
+  GSList *Lcur;
+  Tdriveinfo *Ldrive;
+
+  if (Areadcd) *Areadcd = FALSE;
+  if (Awritecdr) *Awritecdr = FALSE;
+  if (Awritecdrw) *Awritecdrw = FALSE;
+  if (Areaddvd) *Areaddvd = FALSE;
+  if (Awritedvd) *Awritedvd = FALSE;
+
+  for (Lcur = Glistdrives; Lcur; Lcur = g_slist_next(Lcur)) { 
+    Ldrive = (Tdriveinfo *)Lcur->data;
+
+    if (DRIVE_READER(Ldrive) && Areadcd) *Areadcd = TRUE;
+    if (DRIVE_WRITER(Ldrive) && Awritecdr) *Awritecdr = TRUE; 
+    if (DRIVE_CDRW_WRITER(Ldrive) && Awritecdrw) *Awritecdrw = TRUE; 
+    if (DRIVE_DVDREADER(Ldrive) && Areaddvd) *Areaddvd = TRUE;
+    if (DRIVE_DVDWRITER(Ldrive) && Awritedvd) *Awritedvd = TRUE;
+  }
+}
+
 void insert_or_update_drive(gchar *Adev, gchar *Amarque, gchar *Amodel, gchar 
*Aquoi, Tsearchdrive *Adrivedesc)
 {
   /* on commence par construire l'identifiant */




reply via email to

[Prev in Thread] Current Thread [Next in Thread]