# HG changeset patch
# User melunko
# Date 1201873100 0
# Node ID ea19ac6f452e655eb7b410d769b255c97775db90
# Parent  fe307d0f75bd174d6838dfcfc541769e8261cce5
[svn r910] fixed dbus xml interface bug for add_exception function

diff -r fe307d0f75bd -r ea19ac6f452e gmyth-dbus/debian/changelog
--- a/gmyth-dbus/debian/changelog	Thu Jan 31 20:02:39 2008 +0000
+++ b/gmyth-dbus/debian/changelog	Fri Feb 01 13:38:20 2008 +0000
@@ -1,3 +1,9 @@
+gmyth-dbus (0.1.4) unstable; urgency=low
+
+  * Fixed dbus interface bug for add_exception function.
+
+ -- Hallyson <hallyson.melo@ndt.org.br>  Fri, 01 Feb 2008 10:35:55 -0300
+
 gmyth-dbus (0.1.3) unstable; urgency=low
 
   * updated to gmyth 0.6;
diff -r fe307d0f75bd -r ea19ac6f452e gmyth-dbus/src/gmyth-dbus-server.c
--- a/gmyth-dbus/src/gmyth-dbus-server.c	Thu Jan 31 20:02:39 2008 +0000
+++ b/gmyth-dbus/src/gmyth-dbus-server.c	Fri Feb 01 13:38:20 2008 +0000
@@ -82,7 +82,7 @@
 /* Dbus */
 static gboolean gmyth_dbus_server_connect           (GObject *obj,
                                                      const gchar *host,
-                                                     guint port,
+                                                     gint port,
                                                      const gchar *user,
                                                      const gchar *password,
                                                      GError **error);
@@ -139,7 +139,7 @@
                                                      gboolean *result,
                                                      GError **error);
 static gboolean gmyth_dbus_server_add_schedule      (GObject *obj,
-                                                     guint channel_id,
+                                                     gint channel_id,
                                                      const gchar *program_id,
                                                      const gchar *start_time,
                                                      const gchar *end_time,
@@ -149,7 +149,7 @@
                                                      GError **error);
 static gboolean gmyth_dbus_server_add_exception     (GObject *obj,
                                                      guint schedule_id,
-                                                     guint channel_id,
+                                                     gint channel_id,
                                                      const gchar *program_id,
                                                      const gchar *start_time,
                                                      const gchar *end_time,
@@ -290,7 +290,7 @@
 static gboolean
 gmyth_dbus_server_connect  (GObject *obj,
                             const gchar *host,
-                            guint port,
+                            gint port,
                             const gchar *user,
                             const gchar *password,
                             GError **error)
@@ -1046,7 +1046,7 @@
 
 static gboolean
 gmyth_dbus_server_add_schedule (GObject *obj,
-                                guint channel_id,
+                                gint channel_id,
                                 const gchar *program_id,
                                 const gchar *start_time,
                                 const gchar *end_time,
@@ -1073,14 +1073,13 @@
 
     g_time_val_from_iso8601 (start_time, &start_vtime);
     g_time_val_from_iso8601 (end_time, &end_vtime);
-    g_debug ("%s:%d", __FUNCTION__, __LINE__);
+
     sch_info = gmyth_dbus_server_new_schedule_info (description,
                                                     channel_id,
                                                     program_id,
                                                     &start_vtime,
                                                     &end_vtime);
 
-    g_debug ("%s:%d", __FUNCTION__, __LINE__);
     if (sch_info != NULL) {
         GMythScheduleType type;
         GTimeVal t_now;
@@ -1092,20 +1091,17 @@
 
         g_get_current_time (&t_now);
 
-    g_debug ("%s:%d", __FUNCTION__, __LINE__);
         has_record = gmyth_scheduler_was_recorded_before (priv->myth_scheduler, 
                                                           channel_id,
                                                           (time_t) start_vtime.tv_sec);
 
 
-    g_debug ("%s:%d", __FUNCTION__, __LINE__);
         if ((t_now.tv_sec >= start_vtime.tv_sec)
             && (t_now.tv_sec <= end_vtime.tv_sec) && has_record)
         {
             GMythSocket    *socket;
             gboolean        res = FALSE;
 
-    g_debug ("%s:%d", __FUNCTION__, __LINE__);
             socket = gmyth_backend_info_get_connected_socket (priv->myth_backend);
             res = gmyth_scheduler_reactivate_schedule(priv->myth_scheduler,
                                                       channel_id,
@@ -1113,21 +1109,17 @@
             if (res) {
                 GMythStringList *slist = gmyth_string_list_new();
 
-    g_debug ("%s:%d", __FUNCTION__, __LINE__);
                 gmyth_string_list_append_char_array(slist, "RESCHEDULE_RECORDINGS 0");
                 gmyth_socket_sendreceive_stringlist(socket, slist);
                 res = (gmyth_string_list_get_int(slist, 0) == 1);
                 g_object_unref(slist);
-    g_debug ("%s:%d", __FUNCTION__, __LINE__);
             }
-    g_debug ("%s:%d", __FUNCTION__, __LINE__);
 
             g_object_unref(socket);
             return res;
         }
         else
         {
-    g_debug ("%s:%d", __FUNCTION__, __LINE__);
             if (!gmyth_scheduler_add_schedule_full (priv->myth_scheduler,
                                                     sch_info,
                                                     type))
@@ -1136,11 +1128,8 @@
                 return FALSE;
             }
 
-    g_debug ("%s:%d", __FUNCTION__, __LINE__);
             (*schedule_id) = sch_info->schedule_id;
-    g_debug ("%s:%d", __FUNCTION__, __LINE__);
             gmyth_schedule_info_free (sch_info);
-    g_debug ("%s:%d", __FUNCTION__, __LINE__);
             return TRUE;
         }
     }
@@ -1150,7 +1139,7 @@
 static gboolean
 gmyth_dbus_server_add_exception (GObject *obj,
                                  guint schedule_id,
-                                 guint channel_id,
+                                 gint channel_id,
                                  const gchar *program_id,
                                  const gchar *start_time,
                                  const gchar *end_time,
diff -r fe307d0f75bd -r ea19ac6f452e gmyth-dbus/src/gmyth-dbus-server.xml
--- a/gmyth-dbus/src/gmyth-dbus-server.xml	Thu Jan 31 20:02:39 2008 +0000
+++ b/gmyth-dbus/src/gmyth-dbus-server.xml	Fri Feb 01 13:38:20 2008 +0000
@@ -84,8 +84,8 @@
 
     <method name="AddException">
       <arg type="u" name="schedule_id" direction="in" />
+      <arg type="i" name="channel_id" direction="in" />
       <arg type="s" name="program_id" direction="in" />
-      <arg type="i" name="channel_id" direction="in" />
       <arg type="s" name="start_time" direction="in" />
       <arg type="s" name="end_time" direction="in" />
       <arg type="s" name="description" direction="in" />