1.1 --- a/gmyth/src/gmyth_recprofile.c Thu Jun 14 18:19:52 2007 +0100
1.2 +++ b/gmyth/src/gmyth_recprofile.c Thu Jun 14 20:40:47 2007 +0100
1.3 @@ -37,19 +37,20 @@
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 + static void gmyth_recprofile_class_init(GMythRecProfileClass *
1.20 + 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 @@ -60,31 +61,31 @@
1.33 static void
1.34 gmyth_recprofile_dispose(GObject * object)
1.35 {
1.36 - GMythRecProfile *recprofile = GMYTH_RECPROFILE(object);
1.37 + GMythRecProfile *recprofile = GMYTH_RECPROFILE(object);
1.38
1.39 - if (recprofile->name)
1.40 - g_free(recprofile->name);
1.41 + if (recprofile->name)
1.42 + g_free(recprofile->name);
1.43
1.44 - if (recprofile->group)
1.45 - g_free(recprofile->group);
1.46 + if (recprofile->group)
1.47 + g_free(recprofile->group);
1.48
1.49 - if (recprofile->vcodec)
1.50 - g_free(recprofile->vcodec);
1.51 + if (recprofile->vcodec)
1.52 + g_free(recprofile->vcodec);
1.53
1.54 - if (recprofile->acodec)
1.55 - g_free(recprofile->acodec);
1.56 + if (recprofile->acodec)
1.57 + g_free(recprofile->acodec);
1.58
1.59 - if (recprofile->options)
1.60 - g_free(recprofile->options);
1.61 + if (recprofile->options)
1.62 + g_free(recprofile->options);
1.63
1.64 - G_OBJECT_CLASS(gmyth_recprofile_parent_class)->dispose(object);
1.65 + G_OBJECT_CLASS(gmyth_recprofile_parent_class)->dispose(object);
1.66 }
1.67
1.68 static void
1.69 gmyth_recprofile_finalize(GObject * object)
1.70 {
1.71 - g_signal_handlers_destroy(object);
1.72 - G_OBJECT_CLASS(gmyth_recprofile_parent_class)->finalize(object);
1.73 + g_signal_handlers_destroy(object);
1.74 + G_OBJECT_CLASS(gmyth_recprofile_parent_class)->finalize(object);
1.75 }
1.76
1.77 /**
1.78 @@ -95,17 +96,17 @@
1.79 GMythRecProfile *
1.80 gmyth_recprofile_new(void)
1.81 {
1.82 - GMythRecProfile *recprofile = GMYTH_RECPROFILE
1.83 - (g_object_new(GMYTH_RECPROFILE_TYPE, NULL));
1.84 + GMythRecProfile *recprofile = GMYTH_RECPROFILE
1.85 + (g_object_new(GMYTH_RECPROFILE_TYPE, NULL));
1.86
1.87 - recprofile->id = 0;
1.88 - recprofile->name = NULL;
1.89 - recprofile->group = NULL;
1.90 - recprofile->vcodec = NULL;
1.91 - recprofile->acodec = NULL;
1.92 - recprofile->options = NULL;
1.93 + recprofile->id = 0;
1.94 + recprofile->name = NULL;
1.95 + recprofile->group = NULL;
1.96 + recprofile->vcodec = NULL;
1.97 + recprofile->acodec = NULL;
1.98 + recprofile->options = NULL;
1.99
1.100 - return recprofile;
1.101 + return recprofile;
1.102 }
1.103
1.104
1.105 @@ -117,10 +118,10 @@
1.106 * @return GSList
1.107 *
1.108 **/
1.109 -GSList *
1.110 +GSList *
1.111 gmyth_recprofile_get_profile_list(GMythBackendInfo * backend_info)
1.112 {
1.113 - return gmyth_http_retrieve_rec_profiles(backend_info, "Transcoders");
1.114 + return gmyth_http_retrieve_rec_profiles(backend_info, "Transcoders");
1.115 }
1.116
1.117 /**
1.118 @@ -134,9 +135,9 @@
1.119 **/
1.120 gint
1.121 gmyth_recprofile_create_profile(GMythBackendInfo * backend_info,
1.122 - GMythRecProfile * profile)
1.123 + GMythRecProfile * profile)
1.124 {
1.125 - return gmyth_http_create_rec_profile(backend_info, profile);
1.126 + return gmyth_http_create_rec_profile(backend_info, profile);
1.127 }
1.128
1.129 /**
1.130 @@ -151,7 +152,7 @@
1.131 gint
1.132 gmyth_recprofile_del_profile_list(GMythBackendInfo * backend_info, gint id)
1.133 {
1.134 - return gmyth_http_del_rec_profile(backend_info, id);
1.135 + return gmyth_http_del_rec_profile(backend_info, id);
1.136 }
1.137
1.138 /**
1.139 @@ -166,8 +167,8 @@
1.140 gint
1.141 gmyth_recprofile_set_id(GMythRecProfile * rec, gint id)
1.142 {
1.143 - rec->id = id;
1.144 - return 0;
1.145 + rec->id = id;
1.146 + return 0;
1.147 }
1.148
1.149 /**
1.150 @@ -183,25 +184,23 @@
1.151 gint
1.152 gmyth_recprofile_set(GMythRecProfile * rec, gchar * member, gchar * value)
1.153 {
1.154 - int ret = 0;
1.155 + int ret = 0;
1.156
1.157 - if (value != NULL)
1.158 - {
1.159 - if (g_ascii_strcasecmp(member, "name") == 0)
1.160 - rec->name = g_strndup(value, strlen(value));
1.161 - else if (g_ascii_strcasecmp(member, "group") == 0)
1.162 - rec->group = g_strndup(value, strlen(value));
1.163 - else if (g_ascii_strcasecmp(member, "vcodec") == 0)
1.164 - rec->vcodec = g_strndup(value, strlen(value));
1.165 - else if (g_ascii_strcasecmp(member, "acodec") == 0)
1.166 - rec->acodec = g_strndup(value, strlen(value));
1.167 - else
1.168 - ret = -1;
1.169 - }
1.170 - else
1.171 - ret = -1;
1.172 + if (value != NULL) {
1.173 + if (g_ascii_strcasecmp(member, "name") == 0)
1.174 + rec->name = g_strndup(value, strlen(value));
1.175 + else if (g_ascii_strcasecmp(member, "group") == 0)
1.176 + rec->group = g_strndup(value, strlen(value));
1.177 + else if (g_ascii_strcasecmp(member, "vcodec") == 0)
1.178 + rec->vcodec = g_strndup(value, strlen(value));
1.179 + else if (g_ascii_strcasecmp(member, "acodec") == 0)
1.180 + rec->acodec = g_strndup(value, strlen(value));
1.181 + else
1.182 + ret = -1;
1.183 + } else
1.184 + ret = -1;
1.185
1.186 - return ret;
1.187 + return ret;
1.188 }
1.189
1.190 /**
1.191 @@ -216,7 +215,7 @@
1.192 gint
1.193 gmyth_recprofile_set_name(GMythRecProfile * rec, gchar * name)
1.194 {
1.195 - return gmyth_recprofile_set(rec, "name", name);
1.196 + return gmyth_recprofile_set(rec, "name", name);
1.197 }
1.198
1.199 /**
1.200 @@ -231,7 +230,7 @@
1.201 gint
1.202 gmyth_recprofile_set_group(GMythRecProfile * rec, gchar * group)
1.203 {
1.204 - return gmyth_recprofile_set(rec, "group", group);
1.205 + return gmyth_recprofile_set(rec, "group", group);
1.206 }
1.207
1.208 /**
1.209 @@ -246,7 +245,7 @@
1.210 gint
1.211 gmyth_recprofile_set_vcodec(GMythRecProfile * rec, gchar * vcodec)
1.212 {
1.213 - return gmyth_recprofile_set(rec, "vcodec", vcodec);
1.214 + return gmyth_recprofile_set(rec, "vcodec", vcodec);
1.215 }
1.216
1.217 /**
1.218 @@ -261,5 +260,5 @@
1.219 gint
1.220 gmyth_recprofile_set_acodec(GMythRecProfile * rec, gchar * acodec)
1.221 {
1.222 - return gmyth_recprofile_set(rec, "acodec", acodec);
1.223 + return gmyth_recprofile_set(rec, "acodec", acodec);
1.224 }