1.1 --- a/gmyth/src/gmyth_recprofile.c Wed May 23 19:50:41 2007 +0100
1.2 +++ b/gmyth/src/gmyth_recprofile.c Thu Jun 14 18:19:52 2007 +0100
1.3 @@ -37,54 +37,54 @@
1.4 #include "gmyth_debug.h"
1.5 #include "gmyth_http.h"
1.6
1.7 -static void gmyth_recprofile_class_init ( GMythRecProfileClass * klass );
1.8 -static void gmyth_recprofile_init ( GMythRecProfile * object );
1.9 +static void gmyth_recprofile_class_init(GMythRecProfileClass * klass);
1.10 +static void gmyth_recprofile_init(GMythRecProfile * object);
1.11
1.12 -static void gmyth_recprofile_dispose ( GObject * object );
1.13 -static void gmyth_recprofile_finalize ( GObject * object );
1.14 +static void gmyth_recprofile_dispose(GObject * object);
1.15 +static void gmyth_recprofile_finalize(GObject * object);
1.16
1.17 -G_DEFINE_TYPE ( GMythRecProfile, gmyth_recprofile, G_TYPE_OBJECT )
1.18 - static void gmyth_recprofile_class_init ( GMythRecProfileClass * klass )
1.19 +G_DEFINE_TYPE(GMythRecProfile, gmyth_recprofile, G_TYPE_OBJECT)
1.20 + static void gmyth_recprofile_class_init(GMythRecProfileClass * klass)
1.21 {
1.22 - GObjectClass *gobject_class = G_OBJECT_CLASS ( klass );
1.23 + GObjectClass *gobject_class = G_OBJECT_CLASS(klass);
1.24
1.25 - gobject_class->dispose = gmyth_recprofile_dispose;
1.26 - gobject_class->finalize = gmyth_recprofile_finalize;
1.27 + gobject_class->dispose = gmyth_recprofile_dispose;
1.28 + gobject_class->finalize = gmyth_recprofile_finalize;
1.29 }
1.30
1.31 static void
1.32 -gmyth_recprofile_init ( GMythRecProfile * recprofile )
1.33 +gmyth_recprofile_init(GMythRecProfile * recprofile)
1.34 {
1.35 }
1.36
1.37 static void
1.38 -gmyth_recprofile_dispose ( GObject * object )
1.39 +gmyth_recprofile_dispose(GObject * object)
1.40 {
1.41 - GMythRecProfile *recprofile = GMYTH_RECPROFILE ( object );
1.42 + GMythRecProfile *recprofile = GMYTH_RECPROFILE(object);
1.43
1.44 - if ( recprofile->name )
1.45 - g_free ( recprofile->name );
1.46 + if (recprofile->name)
1.47 + g_free(recprofile->name);
1.48
1.49 - if ( recprofile->group )
1.50 - g_free ( recprofile->group );
1.51 + if (recprofile->group)
1.52 + g_free(recprofile->group);
1.53
1.54 - if ( recprofile->vcodec )
1.55 - g_free ( recprofile->vcodec );
1.56 + if (recprofile->vcodec)
1.57 + g_free(recprofile->vcodec);
1.58
1.59 - if ( recprofile->acodec )
1.60 - g_free ( recprofile->acodec );
1.61 + if (recprofile->acodec)
1.62 + g_free(recprofile->acodec);
1.63
1.64 - if ( recprofile->options )
1.65 - g_free ( recprofile->options );
1.66 + if (recprofile->options)
1.67 + g_free(recprofile->options);
1.68
1.69 - G_OBJECT_CLASS ( gmyth_recprofile_parent_class )->dispose ( object );
1.70 + G_OBJECT_CLASS(gmyth_recprofile_parent_class)->dispose(object);
1.71 }
1.72
1.73 static void
1.74 -gmyth_recprofile_finalize ( GObject * object )
1.75 +gmyth_recprofile_finalize(GObject * object)
1.76 {
1.77 - g_signal_handlers_destroy ( object );
1.78 - G_OBJECT_CLASS ( gmyth_recprofile_parent_class )->finalize ( object );
1.79 + g_signal_handlers_destroy(object);
1.80 + G_OBJECT_CLASS(gmyth_recprofile_parent_class)->finalize(object);
1.81 }
1.82
1.83 /**
1.84 @@ -93,19 +93,19 @@
1.85 * @return a new instance of GMythRecProfile.
1.86 **/
1.87 GMythRecProfile *
1.88 -gmyth_recprofile_new ( void )
1.89 +gmyth_recprofile_new(void)
1.90 {
1.91 - GMythRecProfile *recprofile = GMYTH_RECPROFILE
1.92 - ( g_object_new ( GMYTH_RECPROFILE_TYPE, NULL ) );
1.93 + GMythRecProfile *recprofile = GMYTH_RECPROFILE
1.94 + (g_object_new(GMYTH_RECPROFILE_TYPE, NULL));
1.95
1.96 - recprofile->id = 0;
1.97 - recprofile->name = NULL;
1.98 - recprofile->group = NULL;
1.99 - recprofile->vcodec = NULL;
1.100 - recprofile->acodec = NULL;
1.101 - recprofile->options = NULL;
1.102 + recprofile->id = 0;
1.103 + recprofile->name = NULL;
1.104 + recprofile->group = NULL;
1.105 + recprofile->vcodec = NULL;
1.106 + recprofile->acodec = NULL;
1.107 + recprofile->options = NULL;
1.108
1.109 - return recprofile;
1.110 + return recprofile;
1.111 }
1.112
1.113
1.114 @@ -118,9 +118,9 @@
1.115 *
1.116 **/
1.117 GSList *
1.118 -gmyth_recprofile_get_profile_list ( GMythBackendInfo * backend_info )
1.119 +gmyth_recprofile_get_profile_list(GMythBackendInfo * backend_info)
1.120 {
1.121 - return gmyth_http_retrieve_rec_profiles ( backend_info, "Transcoders" );
1.122 + return gmyth_http_retrieve_rec_profiles(backend_info, "Transcoders");
1.123 }
1.124
1.125 /**
1.126 @@ -133,10 +133,10 @@
1.127 *
1.128 **/
1.129 gint
1.130 -gmyth_recprofile_create_profile ( GMythBackendInfo * backend_info,
1.131 - GMythRecProfile * profile )
1.132 +gmyth_recprofile_create_profile(GMythBackendInfo * backend_info,
1.133 + GMythRecProfile * profile)
1.134 {
1.135 - return gmyth_http_create_rec_profile ( backend_info, profile );
1.136 + return gmyth_http_create_rec_profile(backend_info, profile);
1.137 }
1.138
1.139 /**
1.140 @@ -149,9 +149,9 @@
1.141 *
1.142 **/
1.143 gint
1.144 -gmyth_recprofile_del_profile_list ( GMythBackendInfo * backend_info, gint id )
1.145 +gmyth_recprofile_del_profile_list(GMythBackendInfo * backend_info, gint id)
1.146 {
1.147 - return gmyth_http_del_rec_profile ( backend_info, id );
1.148 + return gmyth_http_del_rec_profile(backend_info, id);
1.149 }
1.150
1.151 /**
1.152 @@ -164,10 +164,10 @@
1.153 *
1.154 **/
1.155 gint
1.156 -gmyth_recprofile_set_id ( GMythRecProfile * rec, gint id )
1.157 +gmyth_recprofile_set_id(GMythRecProfile * rec, gint id)
1.158 {
1.159 - rec->id = id;
1.160 - return 0;
1.161 + rec->id = id;
1.162 + return 0;
1.163 }
1.164
1.165 /**
1.166 @@ -181,27 +181,27 @@
1.167 *
1.168 **/
1.169 gint
1.170 -gmyth_recprofile_set ( GMythRecProfile * rec, gchar * member, gchar * value )
1.171 +gmyth_recprofile_set(GMythRecProfile * rec, gchar * member, gchar * value)
1.172 {
1.173 - int ret = 0;
1.174 + int ret = 0;
1.175
1.176 - if ( value != NULL )
1.177 - {
1.178 - if ( g_ascii_strcasecmp ( member, "name" ) == 0 )
1.179 - rec->name = g_strndup ( value, strlen ( value ) );
1.180 - else if ( g_ascii_strcasecmp ( member, "group" ) == 0 )
1.181 - rec->group = g_strndup ( value, strlen ( value ) );
1.182 - else if ( g_ascii_strcasecmp ( member, "vcodec" ) == 0 )
1.183 - rec->vcodec = g_strndup ( value, strlen ( value ) );
1.184 - else if ( g_ascii_strcasecmp ( member, "acodec" ) == 0 )
1.185 - rec->acodec = g_strndup ( value, strlen ( value ) );
1.186 - else
1.187 - ret = -1;
1.188 - }
1.189 - else
1.190 - ret = -1;
1.191 + if (value != NULL)
1.192 + {
1.193 + if (g_ascii_strcasecmp(member, "name") == 0)
1.194 + rec->name = g_strndup(value, strlen(value));
1.195 + else if (g_ascii_strcasecmp(member, "group") == 0)
1.196 + rec->group = g_strndup(value, strlen(value));
1.197 + else if (g_ascii_strcasecmp(member, "vcodec") == 0)
1.198 + rec->vcodec = g_strndup(value, strlen(value));
1.199 + else if (g_ascii_strcasecmp(member, "acodec") == 0)
1.200 + rec->acodec = g_strndup(value, strlen(value));
1.201 + else
1.202 + ret = -1;
1.203 + }
1.204 + else
1.205 + ret = -1;
1.206
1.207 - return ret;
1.208 + return ret;
1.209 }
1.210
1.211 /**
1.212 @@ -214,9 +214,9 @@
1.213 *
1.214 **/
1.215 gint
1.216 -gmyth_recprofile_set_name ( GMythRecProfile * rec, gchar * name )
1.217 +gmyth_recprofile_set_name(GMythRecProfile * rec, gchar * name)
1.218 {
1.219 - return gmyth_recprofile_set ( rec, "name", name );
1.220 + return gmyth_recprofile_set(rec, "name", name);
1.221 }
1.222
1.223 /**
1.224 @@ -229,9 +229,9 @@
1.225 *
1.226 **/
1.227 gint
1.228 -gmyth_recprofile_set_group ( GMythRecProfile * rec, gchar * group )
1.229 +gmyth_recprofile_set_group(GMythRecProfile * rec, gchar * group)
1.230 {
1.231 - return gmyth_recprofile_set ( rec, "group", group );
1.232 + return gmyth_recprofile_set(rec, "group", group);
1.233 }
1.234
1.235 /**
1.236 @@ -244,9 +244,9 @@
1.237 *
1.238 **/
1.239 gint
1.240 -gmyth_recprofile_set_vcodec ( GMythRecProfile * rec, gchar * vcodec )
1.241 +gmyth_recprofile_set_vcodec(GMythRecProfile * rec, gchar * vcodec)
1.242 {
1.243 - return gmyth_recprofile_set ( rec, "vcodec", vcodec );
1.244 + return gmyth_recprofile_set(rec, "vcodec", vcodec);
1.245 }
1.246
1.247 /**
1.248 @@ -259,7 +259,7 @@
1.249 *
1.250 **/
1.251 gint
1.252 -gmyth_recprofile_set_acodec ( GMythRecProfile * rec, gchar * acodec )
1.253 +gmyth_recprofile_set_acodec(GMythRecProfile * rec, gchar * acodec)
1.254 {
1.255 - return gmyth_recprofile_set ( rec, "acodec", acodec );
1.256 + return gmyth_recprofile_set(rec, "acodec", acodec);
1.257 }