# HG changeset patch # User melunko # Date 1205425778 0 # Node ID c93bfa74c71fd045936c6d90b9cfbcf80f548cb3 # Parent 2394aa79ef69b7f6564b1a5b19753355ecd6b6a6 [svn r951] gmyth now is 0.8.1. Added methods epg_is_connected() and scheduler_is_connected() diff -r 2394aa79ef69 -r c93bfa74c71f gmyth/configure.ac --- a/gmyth/configure.ac Tue Mar 04 13:57:55 2008 +0000 +++ b/gmyth/configure.ac Thu Mar 13 16:29:38 2008 +0000 @@ -1,4 +1,4 @@ -AC_INIT(gmyth, 0.8.0) +AC_INIT(gmyth, 0.8.1) AC_PREREQ(2.52) AC_CONFIG_SRCDIR(configure.ac) AC_CANONICAL_BUILD diff -r 2394aa79ef69 -r c93bfa74c71f gmyth/gmyth/gmyth_epg.c --- a/gmyth/gmyth/gmyth_epg.c Tue Mar 04 13:57:55 2008 +0000 +++ b/gmyth/gmyth/gmyth_epg.c Thu Mar 13 16:29:38 2008 +0000 @@ -124,6 +124,14 @@ return TRUE; } +gboolean +gmyth_epg_is_connected (GMythEPG *gmyth_epg) +{ + g_return_val_if_fail (gmyth_epg != NULL, FALSE); + + return gmyth_query_is_alive (gmyth_epg->sqlquery); +} + /** Disconnects from the Mysql database in the backend. * * @param gmyth_epg the GMythEPG instance to be disconnected diff -r 2394aa79ef69 -r c93bfa74c71f gmyth/gmyth/gmyth_epg.h --- a/gmyth/gmyth/gmyth_epg.h Tue Mar 04 13:57:55 2008 +0000 +++ b/gmyth/gmyth/gmyth_epg.h Thu Mar 13 16:29:38 2008 +0000 @@ -43,14 +43,7 @@ typedef struct _GMythEPGClass GMythEPGClass; struct _GMythEPGClass { - GObjectClass parent_class; - - /* - * callbacks - */ - /* - * no one for now - */ + GObjectClass parent_class; }; struct _GMythEPG { @@ -60,26 +53,28 @@ GMythBackendInfo *backend_info; }; -GType gmyth_epg_get_type (void) G_GNUC_CONST;; -GMythEPG* gmyth_epg_new (void); -gboolean gmyth_epg_connect (GMythEPG *gmyth_epg, - GMythBackendInfo *backend_info); -gboolean gmyth_epg_disconnect (GMythEPG *gmyth_epg); -gint gmyth_epg_get_channel_list (GMythEPG *gmyth_epg, - GList **glist_ptr); -gint gmyth_epg_get_program_list (GMythEPG *gmyth_epg, - GList **proglist, - gint chanNum, - GTimeVal *starttime, - GTimeVal *endtime); +GType gmyth_epg_get_type (void) G_GNUC_CONST;; +GMythEPG* gmyth_epg_new (void); +gboolean gmyth_epg_connect (GMythEPG *gmyth_epg, + GMythBackendInfo *backend_info); +gboolean gmyth_epg_is_connected (GMythEPG *gmyth_epg); + +gboolean gmyth_epg_disconnect (GMythEPG *gmyth_epg); +gint gmyth_epg_get_channel_list (GMythEPG *gmyth_epg, + GList **glist_ptr); +gint gmyth_epg_get_program_list (GMythEPG *gmyth_epg, + GList **proglist, + gint chanNum, + GTimeVal *starttime, + GTimeVal *endtime); GMythChannelInfo*gmyth_epg_get_channel_info (GMythEPG *gmyth_epg, gint channel_id); -gboolean gmyth_epg_channel_has_icon (GMythEPG *gmyth_epg, - GMythChannelInfo *channel); -gboolean gmyth_epg_channel_get_icon (GMythEPG *gmyth_epg, - GMythChannelInfo *channel, - guint8 **data, - guint *length); +gboolean gmyth_epg_channel_has_icon (GMythEPG *gmyth_epg, + GMythChannelInfo *channel); +gboolean gmyth_epg_channel_get_icon (GMythEPG *gmyth_epg, + GMythChannelInfo *channel, + guint8 **data, + guint *length); G_END_DECLS #endif /* GMYTH_EPG_H_ */ diff -r 2394aa79ef69 -r c93bfa74c71f gmyth/gmyth/gmyth_scheduler.c --- a/gmyth/gmyth/gmyth_scheduler.c Tue Mar 04 13:57:55 2008 +0000 +++ b/gmyth/gmyth/gmyth_scheduler.c Thu Mar 13 16:29:38 2008 +0000 @@ -210,6 +210,14 @@ return TRUE; } +gboolean +gmyth_scheduler_is_connected (GMythScheduler *scheduler) +{ + g_return_val_if_fail (scheduler != NULL, FALSE); + + return gmyth_query_is_alive (scheduler->msqlquery); +} + /** Disconnects from the Mysql database in the backend. * * @param scheduler the GMythScheduler instance to be disconnected diff -r 2394aa79ef69 -r c93bfa74c71f gmyth/gmyth/gmyth_scheduler.h --- a/gmyth/gmyth/gmyth_scheduler.h Tue Mar 04 13:57:55 2008 +0000 +++ b/gmyth/gmyth/gmyth_scheduler.h Thu Mar 13 16:29:38 2008 +0000 @@ -146,6 +146,7 @@ gboolean gmyth_scheduler_connect_with_timeout (GMythScheduler * scheduler, GMythBackendInfo * backend_info, guint timeout); +gboolean gmyth_scheduler_is_connected (GMythScheduler *scheduler); gboolean gmyth_scheduler_disconnect (GMythScheduler * scheduler); gint gmyth_scheduler_get_schedule_list (GMythScheduler * scheduler, GList ** sched_list);