You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1250 lines
52 KiB

  1. diff --git a/src/dmap/grl-common.c b/src/dmap/grl-common.c
  2. index fa92df9..6a1da5e 100644
  3. --- a/src/dmap/grl-common.c
  4. +++ b/src/dmap/grl-common.c
  5. @@ -39,7 +39,7 @@ gchar *
  6. grl_dmap_build_url (DMAPMdnsBrowserService *service)
  7. {
  8. return g_strdup_printf ("%s://%s:%u",
  9. - service->service_name,
  10. - service->host,
  11. - service->port);
  12. + service->service_name,
  13. + service->host,
  14. + service->port);
  15. }
  16. diff --git a/src/dmap/grl-daap-db.c b/src/dmap/grl-daap-db.c
  17. index 6621094..c931d91 100644
  18. --- a/src/dmap/grl-daap-db.c
  19. +++ b/src/dmap/grl-daap-db.c
  20. @@ -112,8 +112,8 @@ grl_daap_db_lookup_by_id (const DMAPDb *db, guint id)
  21. static void
  22. grl_daap_db_foreach (const DMAPDb *db,
  23. - GHFunc func,
  24. - gpointer data)
  25. + GHFunc func,
  26. + gpointer data)
  27. {
  28. g_error ("Not implemented");
  29. }
  30. @@ -135,7 +135,7 @@ set_insert (GHashTable *category, const char *category_name, char *set_name, Grl
  31. id = g_strdup_printf ("%s-%s", category_name, set_name);
  32. container = grl_media_container_new ();
  33. - grl_media_set_id (container, id);
  34. + grl_media_set_id (container, id);
  35. grl_media_set_title (container, set_name);
  36. set = g_hash_table_lookup (category, container);
  37. @@ -173,26 +173,16 @@ grl_daap_db_add (DMAPDb *_db, DMAPRecord *_record)
  38. GrlMedia *media;
  39. g_object_get (record,
  40. - "songalbum",
  41. - &album,
  42. - "songartist",
  43. - &artist,
  44. - "bitrate",
  45. - &bitrate,
  46. - "duration",
  47. - &duration,
  48. - "songgenre",
  49. - &genre,
  50. - "title",
  51. - &title,
  52. - "track",
  53. - &track,
  54. - "disc",
  55. - &disc,
  56. - "location",
  57. - &url,
  58. - "has-video",
  59. - &has_video,
  60. + "songalbum", &album,
  61. + "songartist", &artist,
  62. + "bitrate", &bitrate,
  63. + "duration", &duration,
  64. + "songgenre", &genre,
  65. + "title", &title,
  66. + "track", &track,
  67. + "disc", &disc,
  68. + "location", &url,
  69. + "has-video", &has_video,
  70. NULL);
  71. id_s = g_strdup_printf ("%u", nextid);
  72. @@ -203,8 +193,8 @@ grl_daap_db_add (DMAPDb *_db, DMAPRecord *_record)
  73. media = grl_media_audio_new ();
  74. }
  75. - grl_media_set_id (media, id_s);
  76. - grl_media_set_duration (media, duration);
  77. + grl_media_set_id (media, id_s);
  78. + grl_media_set_duration (media, duration);
  79. if (title) {
  80. grl_media_set_title (media, title);
  81. @@ -217,7 +207,7 @@ grl_daap_db_add (DMAPDb *_db, DMAPRecord *_record)
  82. }
  83. if (has_video == FALSE) {
  84. - grl_media_set_bitrate (media, bitrate);
  85. + grl_media_set_bitrate (media, bitrate);
  86. grl_media_set_track_number (media, track);
  87. if (disc != 0) {
  88. @@ -249,7 +239,7 @@ grl_daap_db_add (DMAPDb *_db, DMAPRecord *_record)
  89. static gboolean
  90. same_media (GrlMedia *a, GrlMedia *b)
  91. {
  92. - return (strcmp (grl_media_get_id (a), grl_media_get_id (b)) == 0);
  93. + return strcmp (grl_media_get_id (a), grl_media_get_id (b)) == 0;
  94. }
  95. void
  96. @@ -334,7 +324,7 @@ grl_daap_db_search (GrlDAAPDb *db,
  97. results = g_hash_table_new (g_str_hash, g_str_equal);
  98. /* For albums and artists... */
  99. - for (i = 0; i < G_N_ELEMENTS(hash_tables); i++) {
  100. + for (i = 0; i < G_N_ELEMENTS (hash_tables); i++) {
  101. g_hash_table_iter_init (&iter1, hash_tables[i]);
  102. /* For each album or artist in above... */
  103. for (j = 0; g_hash_table_iter_next (&iter1, &key1, &val1); j++) {
  104. @@ -396,10 +386,10 @@ grl_daap_db_init (GrlDAAPDb *db)
  105. db->priv->albums_container = grl_media_container_new ();
  106. db->priv->artists_container = grl_media_container_new ();
  107. - grl_media_set_id (GRL_MEDIA (db->priv->albums_container), ALBUMS_ID);
  108. + grl_media_set_id (GRL_MEDIA (db->priv->albums_container), ALBUMS_ID);
  109. grl_media_set_title (GRL_MEDIA (db->priv->albums_container), ALBUMS_NAME);
  110. - grl_media_set_id (GRL_MEDIA (db->priv->artists_container), ARTISTS_ID);
  111. + grl_media_set_id (GRL_MEDIA (db->priv->artists_container), ARTISTS_ID);
  112. grl_media_set_title (GRL_MEDIA (db->priv->artists_container), ARTISTS_NAME);
  113. db->priv->root = g_hash_table_new_full (container_hash, container_equal, g_object_unref, (GDestroyNotify) g_hash_table_destroy);
  114. @@ -426,9 +416,9 @@ grl_daap_db_finalize (GObject *object)
  115. static void
  116. grl_daap_db_set_property (GObject *object,
  117. - guint prop_id,
  118. - const GValue *value,
  119. - GParamSpec *pspec)
  120. + guint prop_id,
  121. + const GValue *value,
  122. + GParamSpec *pspec)
  123. {
  124. switch (prop_id) {
  125. default:
  126. @@ -439,9 +429,9 @@ grl_daap_db_set_property (GObject *object,
  127. static void
  128. grl_daap_db_get_property (GObject *object,
  129. - guint prop_id,
  130. - GValue *value,
  131. - GParamSpec *pspec)
  132. + guint prop_id,
  133. + GValue *value,
  134. + GParamSpec *pspec)
  135. {
  136. switch (prop_id) {
  137. default:
  138. diff --git a/src/dmap/grl-daap-db.h b/src/dmap/grl-daap-db.h
  139. index f52a9b5..2548c50 100644
  140. --- a/src/dmap/grl-daap-db.h
  141. +++ b/src/dmap/grl-daap-db.h
  142. @@ -26,34 +26,34 @@
  143. G_BEGIN_DECLS
  144. -#define TYPE_GRL_DAAP_DB \
  145. - (grl_daap_db_get_type ())
  146. -
  147. -#define GRL_DAAP_DB(o) \
  148. - (G_TYPE_CHECK_INSTANCE_CAST ((o), \
  149. - TYPE_GRL_DAAP_DB, \
  150. - GrlDAAPDb))
  151. -
  152. -#define GRL_DAAP_DB_CLASS(k) \
  153. - (G_TYPE_CHECK_CLASS_CAST((k), \
  154. - TYPE_GRL_DAAP_DB, \
  155. - GrlDAAPDbClass))
  156. -#define IS_GRL_DAAP_DB(o) \
  157. - (G_TYPE_CHECK_INSTANCE_TYPE((o), \
  158. - TYPE_GRL_DAAP_DB))
  159. -#define IS_GRL_DAAP_DB_CLASS(k) \
  160. - (G_TYPE_CHECK_CLASS_TYPE((k), \
  161. - TYPE_GRL_DAAP_DB_CLASS))
  162. -
  163. -#define GRL_DAAP_DB_GET_CLASS(o) \
  164. - (G_TYPE_INSTANCE_GET_CLASS((o), \
  165. - TYPE_GRL_DAAP_DB, \
  166. - GrlDAAPDbClass))
  167. +#define TYPE_GRL_DAAP_DB (grl_daap_db_get_type ())
  168. +
  169. +#define GRL_DAAP_DB(o) \
  170. + (G_TYPE_CHECK_INSTANCE_CAST ((o), \
  171. + TYPE_GRL_DAAP_DB, \
  172. + GrlDAAPDb))
  173. -#define GRL_DAAP_DB_GET_PRIVATE(o) \
  174. - (G_TYPE_INSTANCE_GET_PRIVATE((o), \
  175. - TYPE_GRL_DAAP_DB, \
  176. - GrlDAAPDbPrivate))
  177. +#define GRL_DAAP_DB_CLASS(k) \
  178. + (G_TYPE_CHECK_CLASS_CAST ((k), \
  179. + TYPE_GRL_DAAP_DB, \
  180. + GrlDAAPDbClass))
  181. +#define IS_GRL_DAAP_DB(o) \
  182. + (G_TYPE_CHECK_INSTANCE_TYPE ((o), \
  183. + TYPE_GRL_DAAP_DB))
  184. +
  185. +#define IS_GRL_DAAP_DB_CLASS(k) \
  186. + (G_TYPE_CHECK_CLASS_TYPE ((k), \
  187. + TYPE_GRL_DAAP_DB_CLASS))
  188. +
  189. +#define GRL_DAAP_DB_GET_CLASS(o) \
  190. + (G_TYPE_INSTANCE_GET_CLASS ((o), \
  191. + TYPE_GRL_DAAP_DB, \
  192. + GrlDAAPDbClass))
  193. +
  194. +#define GRL_DAAP_DB_GET_PRIVATE(o) \
  195. + (G_TYPE_INSTANCE_GET_PRIVATE ((o), \
  196. + TYPE_GRL_DAAP_DB, \
  197. + GrlDAAPDbPrivate))
  198. typedef struct GrlDAAPDbPrivate GrlDAAPDbPrivate;
  199. diff --git a/src/dmap/grl-daap-record-factory.c b/src/dmap/grl-daap-record-factory.c
  200. index e986394..648fd85 100644
  201. --- a/src/dmap/grl-daap-record-factory.c
  202. +++ b/src/dmap/grl-daap-record-factory.c
  203. @@ -22,9 +22,9 @@
  204. #include "grl-daap-record.h"
  205. DMAPRecord *
  206. -grl_daap_record_factory_create (DMAPRecordFactory *factory, gpointer user_data)
  207. +grl_daap_record_factory_create (DMAPRecordFactory *factory, gpointer user_data)
  208. {
  209. - return DMAP_RECORD (grl_daap_record_new ());
  210. + return DMAP_RECORD (grl_daap_record_new ());
  211. }
  212. static void
  213. @@ -40,19 +40,19 @@ grl_daap_record_factory_class_init (GrlDAAPRecordFactoryClass *klass)
  214. static void
  215. grl_daap_record_factory_interface_init (gpointer iface, gpointer data)
  216. {
  217. - DMAPRecordFactoryIface *factory = iface;
  218. + DMAPRecordFactoryIface *factory = iface;
  219. - g_assert (G_TYPE_FROM_INTERFACE (factory) == DMAP_TYPE_RECORD_FACTORY);
  220. + g_assert (G_TYPE_FROM_INTERFACE (factory) == DMAP_TYPE_RECORD_FACTORY);
  221. - factory->create = grl_daap_record_factory_create;
  222. + factory->create = grl_daap_record_factory_create;
  223. }
  224. G_DEFINE_TYPE_WITH_CODE (GrlDAAPRecordFactory, grl_daap_record_factory, G_TYPE_OBJECT,
  225. - G_IMPLEMENT_INTERFACE (DMAP_TYPE_RECORD_FACTORY,
  226. - grl_daap_record_factory_interface_init))
  227. + G_IMPLEMENT_INTERFACE (DMAP_TYPE_RECORD_FACTORY,
  228. + grl_daap_record_factory_interface_init))
  229. GrlDAAPRecordFactory *
  230. grl_daap_record_factory_new (void)
  231. {
  232. - return SIMPLE_DAAP_RECORD_FACTORY (g_object_new (TYPE_SIMPLE_DAAP_RECORD_FACTORY, NULL));
  233. + return SIMPLE_DAAP_RECORD_FACTORY (g_object_new (TYPE_SIMPLE_DAAP_RECORD_FACTORY, NULL));
  234. }
  235. diff --git a/src/dmap/grl-daap-record-factory.h b/src/dmap/grl-daap-record-factory.h
  236. index 514713a..45aa69a 100644
  237. --- a/src/dmap/grl-daap-record-factory.h
  238. +++ b/src/dmap/grl-daap-record-factory.h
  239. @@ -25,32 +25,31 @@
  240. G_BEGIN_DECLS
  241. -#define TYPE_SIMPLE_DAAP_RECORD_FACTORY \
  242. - (grl_daap_record_factory_get_type ())
  243. -
  244. -#define SIMPLE_DAAP_RECORD_FACTORY(o) \
  245. - (G_TYPE_CHECK_INSTANCE_CAST((o), \
  246. - TYPE_SIMPLE_DAAP_RECORD_FACTORY, \
  247. - GrlDAAPRecordFactory))
  248. -
  249. -#define SIMPLE_DAAP_RECORD_FACTORY_CLASS(k) \
  250. - (G_TYPE_CHECK_CLASS_CAST((k), \
  251. - TYPE_SIMPLE_DAAP_RECORD_FACTORY, \
  252. - GrlDAAPRecordFactoryClass))
  253. -
  254. -#define IS_SIMPLE_DAAP_RECORD_FACTORY(o) \
  255. - (G_TYPE_CHECK_INSTANCE_TYPE((o), \
  256. - TYPE_SIMPLE_DAAP_RECORD_FACTORY))
  257. -
  258. -#define IS_SIMPLE_DAAP_RECORD_FACTORY_CLASS(k) \
  259. - (G_TYPE_CHECK_CLASS_TYPE((k), \
  260. - TYPE_SIMPLE_DAAP_RECORD_FACTORY_CLASS))
  261. -
  262. -#define SIMPLE_DAAP_RECORD_FACTORY_GET_CLASS(o) \
  263. - (G_TYPE_INSTANCE_GET_CLASS((o), \
  264. - TYPE_SIMPLE_DAAP_RECORD_FACTORY, \
  265. +#define TYPE_SIMPLE_DAAP_RECORD_FACTORY (grl_daap_record_factory_get_type ())
  266. +
  267. +#define SIMPLE_DAAP_RECORD_FACTORY(o) \
  268. + (G_TYPE_CHECK_INSTANCE_CAST ((o), \
  269. + TYPE_SIMPLE_DAAP_RECORD_FACTORY, \
  270. + GrlDAAPRecordFactory))
  271. +
  272. +#define SIMPLE_DAAP_RECORD_FACTORY_CLASS(k) \
  273. + (G_TYPE_CHECK_CLASS_CAST ((k), \
  274. + TYPE_SIMPLE_DAAP_RECORD_FACTORY, \
  275. GrlDAAPRecordFactoryClass))
  276. +#define IS_SIMPLE_DAAP_RECORD_FACTORY(o) \
  277. + (G_TYPE_CHECK_INSTANCE_TYPE ((o), \
  278. + TYPE_SIMPLE_DAAP_RECORD_FACTORY))
  279. +
  280. +#define IS_SIMPLE_DAAP_RECORD_FACTORY_CLASS(k) \
  281. + (G_TYPE_CHECK_CLASS_TYPE ((k), \
  282. + TYPE_SIMPLE_DAAP_RECORD_FACTORY_CLASS))
  283. +
  284. +#define SIMPLE_DAAP_RECORD_FACTORY_GET_CLASS(o) \
  285. + (G_TYPE_INSTANCE_GET_CLASS ((o), \
  286. + TYPE_SIMPLE_DAAP_RECORD_FACTORY, \
  287. + GrlDAAPRecordFactoryClass))
  288. +
  289. typedef struct GrlDAAPRecordFactoryPrivate GrlDAAPRecordFactoryPrivate;
  290. typedef struct {
  291. @@ -61,11 +60,11 @@ typedef struct {
  292. GObjectClass parent;
  293. } GrlDAAPRecordFactoryClass;
  294. -GType grl_daap_record_factory_get_type (void);
  295. +GType grl_daap_record_factory_get_type (void);
  296. -GrlDAAPRecordFactory *grl_daap_record_factory_new (void);
  297. +GrlDAAPRecordFactory *grl_daap_record_factory_new (void);
  298. -DMAPRecord *grl_daap_record_factory_create (DMAPRecordFactory *factory, gpointer user_data);
  299. +DMAPRecord *grl_daap_record_factory_create (DMAPRecordFactory *factory, gpointer user_data);
  300. #endif /* __SIMPLE_DAAP_RECORD_FACTORY */
  301. diff --git a/src/dmap/grl-daap-record.c b/src/dmap/grl-daap-record.c
  302. index d1721d2..82bf2f9 100644
  303. --- a/src/dmap/grl-daap-record.c
  304. +++ b/src/dmap/grl-daap-record.c
  305. @@ -69,9 +69,9 @@ enum {
  306. static void
  307. grl_daap_record_set_property (GObject *object,
  308. - guint prop_id,
  309. - const GValue *value,
  310. - GParamSpec *pspec)
  311. + guint prop_id,
  312. + const GValue *value,
  313. + GParamSpec *pspec)
  314. {
  315. GrlDAAPRecord *record = SIMPLE_DAAP_RECORD (object);
  316. @@ -86,27 +86,27 @@ grl_daap_record_set_property (GObject *object,
  317. break;
  318. case PROP_ALBUM:
  319. g_free (record->priv->album);
  320. - record->priv->album = g_value_dup_string(value);
  321. + record->priv->album = g_value_dup_string (value);
  322. break;
  323. case PROP_SORT_ALBUM:
  324. g_free (record->priv->sort_album);
  325. - record->priv->sort_album = g_value_dup_string(value);
  326. + record->priv->sort_album = g_value_dup_string (value);
  327. break;
  328. case PROP_ARTIST:
  329. g_free (record->priv->artist);
  330. - record->priv->artist = g_value_dup_string(value);
  331. + record->priv->artist = g_value_dup_string (value);
  332. break;
  333. case PROP_SORT_ARTIST:
  334. g_free (record->priv->sort_artist);
  335. - record->priv->sort_artist = g_value_dup_string(value);
  336. + record->priv->sort_artist = g_value_dup_string (value);
  337. break;
  338. case PROP_GENRE:
  339. g_free (record->priv->genre);
  340. - record->priv->genre = g_value_dup_string(value);
  341. + record->priv->genre = g_value_dup_string (value);
  342. break;
  343. case PROP_FORMAT:
  344. g_free (record->priv->format);
  345. - record->priv->format = g_value_dup_string(value);
  346. + record->priv->format = g_value_dup_string (value);
  347. break;
  348. case PROP_MEDIAKIND:
  349. record->priv->mediakind = g_value_get_enum (value);
  350. @@ -142,18 +142,16 @@ grl_daap_record_set_property (GObject *object,
  351. record->priv->has_video = g_value_get_boolean (value);
  352. break;
  353. default:
  354. - G_OBJECT_WARN_INVALID_PROPERTY_ID (object,
  355. - prop_id,
  356. - pspec);
  357. + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
  358. break;
  359. }
  360. }
  361. static void
  362. grl_daap_record_get_property (GObject *object,
  363. - guint prop_id,
  364. - GValue *value,
  365. - GParamSpec *pspec)
  366. + guint prop_id,
  367. + GValue *value,
  368. + GParamSpec *pspec)
  369. {
  370. GrlDAAPRecord *record = SIMPLE_DAAP_RECORD (object);
  371. @@ -216,9 +214,7 @@ grl_daap_record_get_property (GObject *object,
  372. g_value_set_boolean (value, record->priv->has_video);
  373. break;
  374. default:
  375. - G_OBJECT_WARN_INVALID_PROPERTY_ID (object,
  376. - prop_id,
  377. - pspec);
  378. + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
  379. break;
  380. }
  381. }
  382. diff --git a/src/dmap/grl-daap-record.h b/src/dmap/grl-daap-record.h
  383. index 59558c4..7aae82d 100644
  384. --- a/src/dmap/grl-daap-record.h
  385. +++ b/src/dmap/grl-daap-record.h
  386. @@ -25,36 +25,35 @@
  387. G_BEGIN_DECLS
  388. -#define TYPE_SIMPLE_DAAP_RECORD \
  389. - (grl_daap_record_get_type ())
  390. -
  391. -#define SIMPLE_DAAP_RECORD(o) \
  392. - (G_TYPE_CHECK_INSTANCE_CAST((o), \
  393. - TYPE_SIMPLE_DAAP_RECORD, \
  394. - GrlDAAPRecord))
  395. -
  396. -#define SIMPLE_DAAP_RECORD_CLASS(k) \
  397. - (G_TYPE_CHECK_CLASS_CAST((k), \
  398. - TYPE_SIMPLE_DAAP_RECORD, \
  399. - GrlDAAPRecordClass))
  400. -
  401. -#define IS_SIMPLE_DAAP_RECORD(o) \
  402. - (G_TYPE_CHECK_INSTANCE_TYPE((o), \
  403. - TYPE_SIMPLE_DAAP_RECORD))
  404. -
  405. -#define IS_SIMPLE_DAAP_RECORD_CLASS(k) \
  406. - (G_TYPE_CHECK_CLASS_TYPE((k), \
  407. - TYPE_SIMPLE_DAAP_RECORD_CLASS))
  408. -
  409. -#define SIMPLE_DAAP_RECORD_GET_CLASS(o) \
  410. - (G_TYPE_INSTANCE_GET_CLASS((o), \
  411. - TYPE_SIMPLE_DAAP_RECORD, \
  412. +#define TYPE_SIMPLE_DAAP_RECORD (grl_daap_record_get_type ())
  413. +
  414. +#define SIMPLE_DAAP_RECORD(o) \
  415. + (G_TYPE_CHECK_INSTANCE_CAST ((o), \
  416. + TYPE_SIMPLE_DAAP_RECORD, \
  417. + GrlDAAPRecord))
  418. +
  419. +#define SIMPLE_DAAP_RECORD_CLASS(k) \
  420. + (G_TYPE_CHECK_CLASS_CAST ((k), \
  421. + TYPE_SIMPLE_DAAP_RECORD, \
  422. GrlDAAPRecordClass))
  423. -#define SIMPLE_DAAP_RECORD_GET_PRIVATE(o) \
  424. - (G_TYPE_INSTANCE_GET_PRIVATE((o), \
  425. - TYPE_SIMPLE_DAAP_RECORD, \
  426. - GrlDAAPRecordPrivate))
  427. +#define IS_SIMPLE_DAAP_RECORD(o) \
  428. + (G_TYPE_CHECK_INSTANCE_TYPE ((o), \
  429. + TYPE_SIMPLE_DAAP_RECORD))
  430. +
  431. +#define IS_SIMPLE_DAAP_RECORD_CLASS(k) \
  432. + (G_TYPE_CHECK_CLASS_TYPE ((k), \
  433. + TYPE_SIMPLE_DAAP_RECORD_CLASS))
  434. +
  435. +#define SIMPLE_DAAP_RECORD_GET_CLASS(o) \
  436. + (G_TYPE_INSTANCE_GET_CLASS ((o), \
  437. + TYPE_SIMPLE_DAAP_RECORD, \
  438. + GrlDAAPRecordClass))
  439. +
  440. +#define SIMPLE_DAAP_RECORD_GET_PRIVATE(o) \
  441. + (G_TYPE_INSTANCE_GET_PRIVATE ((o), \
  442. + TYPE_SIMPLE_DAAP_RECORD, \
  443. + GrlDAAPRecordPrivate))
  444. typedef struct GrlDAAPRecordPrivate GrlDAAPRecordPrivate;
  445. @@ -69,9 +68,9 @@ typedef struct {
  446. GType grl_daap_record_get_type (void);
  447. -GrlDAAPRecord *grl_daap_record_new (void);
  448. -GInputStream *grl_daap_record_read (DAAPRecord *record, GError **error);
  449. -gint grl_daap_record_get_id (DAAPRecord *record);
  450. +GrlDAAPRecord *grl_daap_record_new (void);
  451. +GInputStream *grl_daap_record_read (DAAPRecord *record, GError **error);
  452. +gint grl_daap_record_get_id (DAAPRecord *record);
  453. #endif /* __SIMPLE_DAAP_RECORD */
  454. diff --git a/src/dmap/grl-daap.c b/src/dmap/grl-daap.c
  455. index 13cc7e3..f3c4115 100644
  456. --- a/src/dmap/grl-daap.c
  457. +++ b/src/dmap/grl-daap.c
  458. @@ -42,7 +42,7 @@
  459. /* --------- Logging -------- */
  460. #define GRL_LOG_DOMAIN_DEFAULT daap_log_domain
  461. -GRL_LOG_DOMAIN_STATIC(daap_log_domain);
  462. +GRL_LOG_DOMAIN_STATIC (daap_log_domain);
  463. /* --- Plugin information --- */
  464. @@ -111,19 +111,19 @@ grl_daap_plugin_init (GrlRegistry *registry,
  465. sources = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_object_unref);
  466. g_signal_connect (G_OBJECT (browser),
  467. - "service-added",
  468. + "service-added",
  469. G_CALLBACK (grl_daap_service_added_cb),
  470. (gpointer) plugin);
  471. g_signal_connect (G_OBJECT (browser),
  472. - "service-removed",
  473. + "service-removed",
  474. G_CALLBACK (grl_daap_service_removed_cb),
  475. (gpointer) plugin);
  476. if (!dmap_mdns_browser_start (browser, &error)) {
  477. GRL_DEBUG ("error starting browser. code: %d message: %s",
  478. - error->code,
  479. - error->message);
  480. + error->code,
  481. + error->message);
  482. g_error_free (error);
  483. g_hash_table_unref (connections);
  484. @@ -138,12 +138,12 @@ grl_daap_plugin_init (GrlRegistry *registry,
  485. GRL_PLUGIN_DEFINE (GRL_MAJOR,
  486. GRL_MINOR,
  487. DAAP_PLUGIN_ID,
  488. - "DAAP",
  489. - "A plugin for browsing DAAP servers",
  490. - "W. Michael Petullo",
  491. + "DAAP",
  492. + "A plugin for browsing DAAP servers",
  493. + "W. Michael Petullo",
  494. VERSION,
  495. - "LGPL",
  496. - "http://www.flyn.org",
  497. + "LGPL",
  498. + "http://www.flyn.org",
  499. grl_daap_plugin_init,
  500. NULL,
  501. NULL);
  502. @@ -166,10 +166,10 @@ grl_daap_source_new (DMAPMdnsBrowserService *service)
  503. source_id = g_strdup_printf (SOURCE_ID_TEMPLATE, service->name);
  504. source = g_object_new (GRL_DAAP_SOURCE_TYPE,
  505. - "source-id", source_id,
  506. - "source-name", service->name,
  507. - "source-desc", source_desc,
  508. - "supported-media", GRL_SUPPORTED_MEDIA_AUDIO,
  509. + "source-id", source_id,
  510. + "source-name", service->name,
  511. + "source-desc", source_desc,
  512. + "supported-media", GRL_SUPPORTED_MEDIA_AUDIO,
  513. NULL);
  514. source->priv->service = service;
  515. @@ -209,14 +209,14 @@ grl_daap_source_finalize (GObject *object)
  516. static void
  517. grl_daap_do_browse (ResultCbAndArgsAndDb *cb_and_db)
  518. {
  519. - grl_daap_db_browse(GRL_DAAP_DB(cb_and_db->db),
  520. - cb_and_db->cb.container,
  521. - cb_and_db->cb.source,
  522. - cb_and_db->cb.op_id,
  523. - cb_and_db->cb.skip,
  524. - cb_and_db->cb.count,
  525. - cb_and_db->cb.callback,
  526. - cb_and_db->cb.user_data);
  527. + grl_daap_db_browse (GRL_DAAP_DB(cb_and_db->db),
  528. + cb_and_db->cb.container,
  529. + cb_and_db->cb.source,
  530. + cb_and_db->cb.op_id,
  531. + cb_and_db->cb.skip,
  532. + cb_and_db->cb.count,
  533. + cb_and_db->cb.callback,
  534. + cb_and_db->cb.user_data);
  535. g_free (cb_and_db);
  536. }
  537. @@ -224,13 +224,13 @@ grl_daap_do_browse (ResultCbAndArgsAndDb *cb_and_db)
  538. static void
  539. grl_daap_do_search (ResultCbAndArgsAndDb *cb_and_db)
  540. {
  541. - grl_daap_db_search(GRL_DAAP_DB(cb_and_db->db),
  542. - cb_and_db->cb.source,
  543. - cb_and_db->cb.op_id,
  544. - (GHRFunc) cb_and_db->cb.predicate,
  545. - cb_and_db->cb.predicate_data,
  546. - cb_and_db->cb.callback,
  547. - cb_and_db->cb.user_data);
  548. + grl_daap_db_search (GRL_DAAP_DB (cb_and_db->db),
  549. + cb_and_db->cb.source,
  550. + cb_and_db->cb.op_id,
  551. + (GHRFunc) cb_and_db->cb.predicate,
  552. + cb_and_db->cb.predicate_data,
  553. + cb_and_db->cb.callback,
  554. + cb_and_db->cb.user_data);
  555. g_free (cb_and_db);
  556. }
  557. diff --git a/src/dmap/grl-daap.h b/src/dmap/grl-daap.h
  558. index 4912b05..1119495 100644
  559. --- a/src/dmap/grl-daap.h
  560. +++ b/src/dmap/grl-daap.h
  561. @@ -26,31 +26,30 @@
  562. #include <grilo.h>
  563. -#define GRL_DAAP_SOURCE_TYPE \
  564. - (grl_daap_source_get_type ())
  565. -
  566. -#define GRL_DAAP_SOURCE(obj) \
  567. - (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
  568. - GRL_DAAP_SOURCE_TYPE, \
  569. - GrlDaapSource))
  570. -
  571. -#define GRL_IS_DAAP_SOURCE(obj) \
  572. - (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
  573. - GRL_DAAP_SOURCE_TYPE))
  574. -
  575. -#define GRL_DAAP_SOURCE_CLASS(klass) \
  576. - (G_TYPE_CHECK_CLASS_CAST((klass), \
  577. - GRL_DAAP_SOURCE_TYPE, \
  578. - GrlDaapSourceClass))
  579. -
  580. -#define GRL_IS_DAAP_SOURCE_CLASS(klass) \
  581. - (G_TYPE_CHECK_CLASS_TYPE((klass), \
  582. - GRL_DAAP_SOURCE_TYPE))
  583. -
  584. -#define GRL_DAAP_SOURCE_GET_CLASS(obj) \
  585. - (G_TYPE_INSTANCE_GET_CLASS ((obj), \
  586. - GRL_DAAP_SOURCE_TYPE, \
  587. - GrlDaapSourceClass))
  588. +#define GRL_DAAP_SOURCE_TYPE (grl_daap_source_get_type ())
  589. +
  590. +#define GRL_DAAP_SOURCE(obj) \
  591. + (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
  592. + GRL_DAAP_SOURCE_TYPE, \
  593. + GrlDaapSource))
  594. +
  595. +#define GRL_IS_DAAP_SOURCE(obj) \
  596. + (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
  597. + GRL_DAAP_SOURCE_TYPE))
  598. +
  599. +#define GRL_DAAP_SOURCE_CLASS(klass) \
  600. + (G_TYPE_CHECK_CLASS_CAST ((klass), \
  601. + GRL_DAAP_SOURCE_TYPE, \
  602. + GrlDaapSourceClass))
  603. +
  604. +#define GRL_IS_DAAP_SOURCE_CLASS(klass) \
  605. + (G_TYPE_CHECK_CLASS_TYPE ((klass), \
  606. + GRL_DAAP_SOURCE_TYPE))
  607. +
  608. +#define GRL_DAAP_SOURCE_GET_CLASS(obj) \
  609. + (G_TYPE_INSTANCE_GET_CLASS ((obj), \
  610. + GRL_DAAP_SOURCE_TYPE, \
  611. + GrlDaapSourceClass))
  612. typedef struct _GrlDaapSourcePrivate GrlDaapSourcePrivate;
  613. typedef struct _GrlDaapSource GrlDaapSource;
  614. diff --git a/src/dmap/grl-dpap-db.c b/src/dmap/grl-dpap-db.c
  615. index 1f2d5ca..02ffd3a 100644
  616. --- a/src/dmap/grl-dpap-db.c
  617. +++ b/src/dmap/grl-dpap-db.c
  618. @@ -80,8 +80,8 @@ grl_dpap_db_lookup_by_id (const DMAPDb *db, guint id)
  619. static void
  620. grl_dpap_db_foreach (const DMAPDb *db,
  621. - GHFunc func,
  622. - gpointer data)
  623. + GHFunc func,
  624. + gpointer data)
  625. {
  626. g_warning ("Not implemented");
  627. }
  628. @@ -103,7 +103,7 @@ set_insert (GHashTable *category, const char *category_name, char *set_name, Grl
  629. id = g_strdup_printf ("%s-%s", category_name, set_name);
  630. container = grl_media_container_new ();
  631. - grl_media_set_id (container, id);
  632. + grl_media_set_id (container, id);
  633. grl_media_set_title (container, set_name);
  634. set = g_hash_table_lookup (category, container);
  635. @@ -142,35 +142,24 @@ grl_dpap_db_add (DMAPDb *_db, DMAPRecord *_record)
  636. GrlMedia *media;
  637. g_object_get (record,
  638. - "large-filesize",
  639. - &largefilesize,
  640. - "creation-date",
  641. - &creationdate,
  642. - "rating",
  643. - &rating,
  644. - "filename",
  645. - &filename,
  646. - "aspect-ratio",
  647. - &aspectratio,
  648. - "pixel-height",
  649. - &height,
  650. - "pixel-width",
  651. - &width,
  652. - "format",
  653. - &format,
  654. - "comments",
  655. - &comments,
  656. - "thumbnail",
  657. - &thumbnail,
  658. - "location",
  659. - &url,
  660. + "large-filesize", &largefilesize,
  661. + "creation-date", &creationdate,
  662. + "rating", &rating,
  663. + "filename", &filename,
  664. + "aspect-ratio", &aspectratio,
  665. + "pixel-height", &height,
  666. + "pixel-width", &width,
  667. + "format", &format,
  668. + "comments", &comments,
  669. + "thumbnail", &thumbnail,
  670. + "location", &url,
  671. NULL);
  672. id_s = g_strdup_printf ("%u", nextid);
  673. media = grl_media_image_new ();
  674. - grl_media_set_id (media, id_s);
  675. + grl_media_set_id (media, id_s);
  676. if (filename)
  677. grl_media_set_title (media, filename);
  678. @@ -181,7 +170,7 @@ grl_dpap_db_add (DMAPDb *_db, DMAPRecord *_record)
  679. grl_media_set_url (media, url);
  680. }
  681. - grl_media_set_width (media, width);
  682. + grl_media_set_width (media, width);
  683. grl_media_set_height (media, height);
  684. set_insert (db->priv->photos, PHOTOS_ID, "Unknown", media);
  685. @@ -195,7 +184,7 @@ grl_dpap_db_add (DMAPDb *_db, DMAPRecord *_record)
  686. static gboolean
  687. same_media (GrlMedia *a, GrlMedia *b)
  688. {
  689. - return (strcmp (grl_media_get_id (a), grl_media_get_id (b)) == 0);
  690. + return strcmp (grl_media_get_id (a), grl_media_get_id (b)) == 0;
  691. }
  692. void
  693. @@ -230,7 +219,7 @@ grl_dpap_db_browse (GrlDPAPDb *db,
  694. if (hash_table == NULL) {
  695. GError *error = g_error_new (GRL_CORE_ERROR,
  696. GRL_CORE_ERROR_BROWSE_FAILED,
  697. - "Invalid container identifier %s",
  698. + "Invalid container identifier %s",
  699. container_id);
  700. func (source, op_id, NULL, 0, user_data, error);
  701. goto done;
  702. @@ -334,7 +323,7 @@ grl_dpap_db_init (GrlDPAPDb *db)
  703. db->priv->photos_container = grl_media_container_new ();
  704. - grl_media_set_id (GRL_MEDIA (db->priv->photos_container), PHOTOS_ID);
  705. + grl_media_set_id (GRL_MEDIA (db->priv->photos_container), PHOTOS_ID);
  706. grl_media_set_title (GRL_MEDIA (db->priv->photos_container), PHOTOS_NAME);
  707. db->priv->root = g_hash_table_new_full (container_hash, container_equal, g_object_unref, (GDestroyNotify) g_hash_table_destroy);
  708. diff --git a/src/dmap/grl-dpap-db.h b/src/dmap/grl-dpap-db.h
  709. index 4c17d1a..d3abcba 100644
  710. --- a/src/dmap/grl-dpap-db.h
  711. +++ b/src/dmap/grl-dpap-db.h
  712. @@ -26,34 +26,33 @@
  713. G_BEGIN_DECLS
  714. -#define TYPE_GRL_DPAP_DB \
  715. - (grl_dpap_db_get_type ())
  716. +#define TYPE_GRL_DPAP_DB (grl_dpap_db_get_type ())
  717. -#define GRL_DPAP_DB(o) \
  718. - (G_TYPE_CHECK_INSTANCE_CAST ((o), \
  719. - TYPE_GRL_DPAP_DB, \
  720. - GrlDPAPDb))
  721. +#define GRL_DPAP_DB(o) \
  722. + (G_TYPE_CHECK_INSTANCE_CAST ((o), \
  723. + TYPE_GRL_DPAP_DB, \
  724. + GrlDPAPDb))
  725. -#define GRL_DPAP_DB_CLASS(k) \
  726. - (G_TYPE_CHECK_CLASS_CAST((k), \
  727. - TYPE_GRL_DPAP_DB, \
  728. - GrlDPAPDbClass))
  729. -#define IS_GRL_DPAP_DB(o) \
  730. - (G_TYPE_CHECK_INSTANCE_TYPE((o), \
  731. - TYPE_GRL_DPAP_DB))
  732. -#define IS_GRL_DPAP_DB_CLASS(k) \
  733. - (G_TYPE_CHECK_CLASS_TYPE((k), \
  734. - TYPE_GRL_DPAP_DB_CLASS))
  735. -
  736. -#define GRL_DPAP_DB_GET_CLASS(o) \
  737. - (G_TYPE_INSTANCE_GET_CLASS((o), \
  738. - TYPE_GRL_DPAP_DB, \
  739. +#define GRL_DPAP_DB_CLASS(k) \
  740. + (G_TYPE_CHECK_CLASS_CAST ((k), \
  741. + TYPE_GRL_DPAP_DB, \
  742. GrlDPAPDbClass))
  743. +#define IS_GRL_DPAP_DB(o) \
  744. + (G_TYPE_CHECK_INSTANCE_TYPE ((o), \
  745. + TYPE_GRL_DPAP_DB))
  746. +#define IS_GRL_DPAP_DB_CLASS(k) \
  747. + (G_TYPE_CHECK_CLASS_TYPE ((k), \
  748. + TYPE_GRL_DPAP_DB_CLASS))
  749. +
  750. +#define GRL_DPAP_DB_GET_CLASS(o) \
  751. + (G_TYPE_INSTANCE_GET_CLASS ((o), \
  752. + TYPE_GRL_DPAP_DB, \
  753. + GrlDPAPDbClass))
  754. -#define GRL_DPAP_DB_GET_PRIVATE(o) \
  755. - (G_TYPE_INSTANCE_GET_PRIVATE((o), \
  756. - TYPE_GRL_DPAP_DB, \
  757. - GrlDPAPDbPrivate))
  758. +#define GRL_DPAP_DB_GET_PRIVATE(o) \
  759. + (G_TYPE_INSTANCE_GET_PRIVATE ((o), \
  760. + TYPE_GRL_DPAP_DB, \
  761. + GrlDPAPDbPrivate))
  762. typedef struct GrlDPAPDbPrivate GrlDPAPDbPrivate;
  763. diff --git a/src/dmap/grl-dpap-record-factory.c b/src/dmap/grl-dpap-record-factory.c
  764. index 8174338..3d0c87a 100644
  765. --- a/src/dmap/grl-dpap-record-factory.c
  766. +++ b/src/dmap/grl-dpap-record-factory.c
  767. @@ -22,9 +22,9 @@
  768. #include "grl-dpap-record.h"
  769. DMAPRecord *
  770. -grl_dpap_record_factory_create (DMAPRecordFactory *factory, gpointer user_data)
  771. +grl_dpap_record_factory_create (DMAPRecordFactory *factory, gpointer user_data)
  772. {
  773. - return DMAP_RECORD (grl_dpap_record_new ());
  774. + return DMAP_RECORD (grl_dpap_record_new ());
  775. }
  776. static void
  777. @@ -40,19 +40,19 @@ grl_dpap_record_factory_class_init (GrlDPAPRecordFactoryClass *klass)
  778. static void
  779. grl_dpap_record_factory_interface_init (gpointer iface, gpointer data)
  780. {
  781. - DMAPRecordFactoryIface *factory = iface;
  782. + DMAPRecordFactoryIface *factory = iface;
  783. - g_assert (G_TYPE_FROM_INTERFACE (factory) == DMAP_TYPE_RECORD_FACTORY);
  784. + g_assert (G_TYPE_FROM_INTERFACE (factory) == DMAP_TYPE_RECORD_FACTORY);
  785. - factory->create = grl_dpap_record_factory_create;
  786. + factory->create = grl_dpap_record_factory_create;
  787. }
  788. G_DEFINE_TYPE_WITH_CODE (GrlDPAPRecordFactory, grl_dpap_record_factory, G_TYPE_OBJECT,
  789. - G_IMPLEMENT_INTERFACE (DMAP_TYPE_RECORD_FACTORY,
  790. - grl_dpap_record_factory_interface_init))
  791. + G_IMPLEMENT_INTERFACE (DMAP_TYPE_RECORD_FACTORY,
  792. + grl_dpap_record_factory_interface_init))
  793. GrlDPAPRecordFactory *
  794. grl_dpap_record_factory_new (void)
  795. {
  796. - return SIMPLE_DPAP_RECORD_FACTORY (g_object_new (TYPE_SIMPLE_DPAP_RECORD_FACTORY, NULL));
  797. + return SIMPLE_DPAP_RECORD_FACTORY (g_object_new (TYPE_SIMPLE_DPAP_RECORD_FACTORY, NULL));
  798. }
  799. diff --git a/src/dmap/grl-dpap-record-factory.h b/src/dmap/grl-dpap-record-factory.h
  800. index c2106b1..3f4ca54 100644
  801. --- a/src/dmap/grl-dpap-record-factory.h
  802. +++ b/src/dmap/grl-dpap-record-factory.h
  803. @@ -25,30 +25,29 @@
  804. G_BEGIN_DECLS
  805. -#define TYPE_SIMPLE_DPAP_RECORD_FACTORY \
  806. - (grl_dpap_record_factory_get_type ())
  807. +#define TYPE_SIMPLE_DPAP_RECORD_FACTORY (grl_dpap_record_factory_get_type ())
  808. -#define SIMPLE_DPAP_RECORD_FACTORY(o) \
  809. - (G_TYPE_CHECK_INSTANCE_CAST((o), \
  810. - TYPE_SIMPLE_DPAP_RECORD_FACTORY, \
  811. - GrlDPAPRecordFactory))
  812. +#define SIMPLE_DPAP_RECORD_FACTORY(o) \
  813. + (G_TYPE_CHECK_INSTANCE_CAST ((o), \
  814. + TYPE_SIMPLE_DPAP_RECORD_FACTORY, \
  815. + GrlDPAPRecordFactory))
  816. -#define SIMPLE_DPAP_RECORD_FACTORY_CLASS(k) \
  817. - (G_TYPE_CHECK_CLASS_CAST((k), \
  818. - TYPE_SIMPLE_DPAP_RECORD_FACTORY, \
  819. - GrlDPAPRecordFactoryClass))
  820. +#define SIMPLE_DPAP_RECORD_FACTORY_CLASS(k) \
  821. + (G_TYPE_CHECK_CLASS_CAST ((k), \
  822. + TYPE_SIMPLE_DPAP_RECORD_FACTORY, \
  823. + GrlDPAPRecordFactoryClass))
  824. -#define IS_SIMPLE_DPAP_RECORD_FACTORY(o) \
  825. - (G_TYPE_CHECK_INSTANCE_TYPE((o), \
  826. +#define IS_SIMPLE_DPAP_RECORD_FACTORY(o) \
  827. + (G_TYPE_CHECK_INSTANCE_TYPE ((o), \
  828. TYPE_SIMPLE_DPAP_RECORD_FACTORY))
  829. -#define IS_SIMPLE_DPAP_RECORD_FACTORY_CLASS(k) \
  830. - (G_TYPE_CHECK_CLASS_TYPE((k), \
  831. - TYPE_SIMPLE_DPAP_RECORD_FACTORY_CLASS))
  832. +#define IS_SIMPLE_DPAP_RECORD_FACTORY_CLASS(k) \
  833. + (G_TYPE_CHECK_CLASS_TYPE ((k), \
  834. + TYPE_SIMPLE_DPAP_RECORD_FACTORY_CLASS))
  835. -#define SIMPLE_DPAP_RECORD_FACTORY_GET_CLASS(o) \
  836. - (G_TYPE_INSTANCE_GET_CLASS((o), \
  837. - TYPE_SIMPLE_DPAP_RECORD_FACTORY, \
  838. +#define SIMPLE_DPAP_RECORD_FACTORY_GET_CLASS(o) \
  839. + (G_TYPE_INSTANCE_GET_CLASS ((o), \
  840. + TYPE_SIMPLE_DPAP_RECORD_FACTORY, \
  841. GrlDPAPRecordFactoryClass))
  842. typedef struct GrlDPAPRecordFactoryPrivate GrlDPAPRecordFactoryPrivate;
  843. @@ -61,11 +60,11 @@ typedef struct {
  844. GObjectClass parent;
  845. } GrlDPAPRecordFactoryClass;
  846. -GType grl_dpap_record_factory_get_type (void);
  847. +GType grl_dpap_record_factory_get_type (void);
  848. -GrlDPAPRecordFactory *grl_dpap_record_factory_new (void);
  849. +GrlDPAPRecordFactory *grl_dpap_record_factory_new (void);
  850. -DMAPRecord *grl_dpap_record_factory_create (DMAPRecordFactory *factory, gpointer user_data);
  851. +DMAPRecord *grl_dpap_record_factory_create (DMAPRecordFactory *factory, gpointer user_data);
  852. #endif /* __SIMPLE_DPAP_RECORD_FACTORY */
  853. diff --git a/src/dmap/grl-dpap-record.c b/src/dmap/grl-dpap-record.c
  854. index 6281417..14eb1de 100644
  855. --- a/src/dmap/grl-dpap-record.c
  856. +++ b/src/dmap/grl-dpap-record.c
  857. @@ -61,9 +61,9 @@ G_DEFINE_TYPE_WITH_CODE (GrlDPAPRecord, grl_dpap_record, G_TYPE_OBJECT,
  858. static void
  859. grl_dpap_record_set_property (GObject *object,
  860. - guint prop_id,
  861. - const GValue *value,
  862. - GParamSpec *pspec)
  863. + guint prop_id,
  864. + const GValue *value,
  865. + GParamSpec *pspec)
  866. {
  867. GrlDPAPRecord *record = SIMPLE_DPAP_RECORD (object);
  868. @@ -116,9 +116,9 @@ grl_dpap_record_set_property (GObject *object,
  869. static void
  870. grl_dpap_record_get_property (GObject *object,
  871. - guint prop_id,
  872. - GValue *value,
  873. - GParamSpec *pspec)
  874. + guint prop_id,
  875. + GValue *value,
  876. + GParamSpec *pspec)
  877. {
  878. GrlDPAPRecord *record = SIMPLE_DPAP_RECORD (object);
  879. diff --git a/src/dmap/grl-dpap-record.h b/src/dmap/grl-dpap-record.h
  880. index 4441740..203e57e 100644
  881. --- a/src/dmap/grl-dpap-record.h
  882. +++ b/src/dmap/grl-dpap-record.h
  883. @@ -25,36 +25,35 @@
  884. G_BEGIN_DECLS
  885. -#define TYPE_SIMPLE_DPAP_RECORD \
  886. - (grl_dpap_record_get_type ())
  887. -
  888. -#define SIMPLE_DPAP_RECORD(o) \
  889. - (G_TYPE_CHECK_INSTANCE_CAST((o), \
  890. - TYPE_SIMPLE_DPAP_RECORD, \
  891. - GrlDPAPRecord))
  892. -
  893. -#define SIMPLE_DPAP_RECORD_CLASS(k) \
  894. - (G_TYPE_CHECK_CLASS_CAST((k), \
  895. - TYPE_SIMPLE_DPAP_RECORD, \
  896. - GrlDPAPRecordClass))
  897. -
  898. -#define IS_SIMPLE_DPAP_RECORD(o) \
  899. - (G_TYPE_CHECK_INSTANCE_TYPE((o), \
  900. - TYPE_SIMPLE_DPAP_RECORD))
  901. -
  902. -#define IS_SIMPLE_DPAP_RECORD_CLASS(k) \
  903. - (G_TYPE_CHECK_CLASS_TYPE((k), \
  904. - TYPE_SIMPLE_DPAP_RECORD_CLASS))
  905. -
  906. -#define SIMPLE_DPAP_RECORD_GET_CLASS(o) \
  907. - (G_TYPE_INSTANCE_GET_CLASS((o), \
  908. - TYPE_SIMPLE_DPAP_RECORD, \
  909. +#define TYPE_SIMPLE_DPAP_RECORD (grl_dpap_record_get_type ())
  910. +
  911. +#define SIMPLE_DPAP_RECORD(o) \
  912. + (G_TYPE_CHECK_INSTANCE_CAST ((o), \
  913. + TYPE_SIMPLE_DPAP_RECORD, \
  914. + GrlDPAPRecord))
  915. +
  916. +#define SIMPLE_DPAP_RECORD_CLASS(k) \
  917. + (G_TYPE_CHECK_CLASS_CAST ((k), \
  918. + TYPE_SIMPLE_DPAP_RECORD, \
  919. GrlDPAPRecordClass))
  920. -#define SIMPLE_DPAP_RECORD_GET_PRIVATE(o) \
  921. - (G_TYPE_INSTANCE_GET_PRIVATE((o), \
  922. - TYPE_SIMPLE_DPAP_RECORD, \
  923. - GrlDPAPRecordPrivate))
  924. +#define IS_SIMPLE_DPAP_RECORD(o) \
  925. + (G_TYPE_CHECK_INSTANCE_TYPE ((o), \
  926. + TYPE_SIMPLE_DPAP_RECORD))
  927. +
  928. +#define IS_SIMPLE_DPAP_RECORD_CLASS(k) \
  929. + (G_TYPE_CHECK_CLASS_TYPE ((k), \
  930. + TYPE_SIMPLE_DPAP_RECORD_CLASS))
  931. +
  932. +#define SIMPLE_DPAP_RECORD_GET_CLASS(o) \
  933. + (G_TYPE_INSTANCE_GET_CLASS ((o), \
  934. + TYPE_SIMPLE_DPAP_RECORD, \
  935. + GrlDPAPRecordClass))
  936. +
  937. +#define SIMPLE_DPAP_RECORD_GET_PRIVATE(o) \
  938. + (G_TYPE_INSTANCE_GET_PRIVATE ((o), \
  939. + TYPE_SIMPLE_DPAP_RECORD, \
  940. + GrlDPAPRecordPrivate))
  941. typedef struct GrlDPAPRecordPrivate GrlDPAPRecordPrivate;
  942. @@ -69,9 +68,9 @@ typedef struct {
  943. GType grl_dpap_record_get_type (void);
  944. -GrlDPAPRecord *grl_dpap_record_new (void);
  945. -GInputStream *grl_dpap_record_read (DPAPRecord *record, GError **error);
  946. -gint grl_dpap_record_get_id (DPAPRecord *record);
  947. +GrlDPAPRecord *grl_dpap_record_new (void);
  948. +GInputStream *grl_dpap_record_read (DPAPRecord *record, GError **error);
  949. +gint grl_dpap_record_get_id (DPAPRecord *record);
  950. #endif /* __SIMPLE_DPAP_RECORD */
  951. diff --git a/src/dmap/grl-dpap.c b/src/dmap/grl-dpap.c
  952. index 744de80..9829ec2 100644
  953. --- a/src/dmap/grl-dpap.c
  954. +++ b/src/dmap/grl-dpap.c
  955. @@ -42,7 +42,7 @@
  956. /* --------- Logging -------- */
  957. #define GRL_LOG_DOMAIN_DEFAULT dmap_log_domain
  958. -GRL_LOG_DOMAIN_STATIC(dmap_log_domain);
  959. +GRL_LOG_DOMAIN_STATIC (dmap_log_domain);
  960. /* --- Plugin information --- */
  961. @@ -51,10 +51,10 @@ GRL_LOG_DOMAIN_STATIC(dmap_log_domain);
  962. /* --- Grilo DPAP Private --- */
  963. -#define GRL_DPAP_SOURCE_GET_PRIVATE(object) \
  964. - (G_TYPE_INSTANCE_GET_PRIVATE((object), \
  965. - GRL_DPAP_SOURCE_TYPE, \
  966. - GrlDpapSourcePrivate))
  967. +#define GRL_DPAP_SOURCE_GET_PRIVATE(object) \
  968. + (G_TYPE_INSTANCE_GET_PRIVATE ((object), \
  969. + GRL_DPAP_SOURCE_TYPE, \
  970. + GrlDpapSourcePrivate))
  971. struct _GrlDpapSourcePrivate {
  972. DMAPMdnsBrowserService *service;
  973. @@ -116,19 +116,19 @@ grl_dpap_plugin_init (GrlRegistry *registry,
  974. sources = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_object_unref);
  975. g_signal_connect (G_OBJECT (browser),
  976. - "service-added",
  977. + "service-added",
  978. G_CALLBACK (grl_dpap_service_added_cb),
  979. (gpointer) plugin);
  980. g_signal_connect (G_OBJECT (browser),
  981. - "service-removed",
  982. + "service-removed",
  983. G_CALLBACK (grl_dpap_service_removed_cb),
  984. (gpointer) plugin);
  985. if (!dmap_mdns_browser_start (browser, &error)) {
  986. GRL_DEBUG ("error starting browser. code: %d message: %s",
  987. - error->code,
  988. - error->message);
  989. + error->code,
  990. + error->message);
  991. g_error_free (error);
  992. g_hash_table_unref (connections);
  993. @@ -143,12 +143,12 @@ grl_dpap_plugin_init (GrlRegistry *registry,
  994. GRL_PLUGIN_DEFINE (GRL_MAJOR,
  995. GRL_MINOR,
  996. DPAP_PLUGIN_ID,
  997. - "DPAP",
  998. - "A plugin for browsing DPAP servers",
  999. - "W. Michael Petullo",
  1000. + "DPAP",
  1001. + "A plugin for browsing DPAP servers",
  1002. + "W. Michael Petullo",
  1003. VERSION,
  1004. - "LGPL",
  1005. - "http://www.flyn.org",
  1006. + "LGPL",
  1007. + "http://www.flyn.org",
  1008. grl_dpap_plugin_init,
  1009. NULL,
  1010. NULL);
  1011. @@ -171,10 +171,10 @@ grl_dpap_source_new (DMAPMdnsBrowserService *service)
  1012. source_id = g_strdup_printf (SOURCE_ID_TEMPLATE, service->name);
  1013. source = g_object_new (GRL_DPAP_SOURCE_TYPE,
  1014. - "source-id", source_id,
  1015. - "source-name", service->name,
  1016. - "source-desc", source_desc,
  1017. - "supported-media", GRL_SUPPORTED_MEDIA_IMAGE,
  1018. + "source-id", source_id,
  1019. + "source-name", service->name,
  1020. + "source-desc", source_desc,
  1021. + "supported-media", GRL_SUPPORTED_MEDIA_IMAGE,
  1022. NULL);
  1023. source->priv->service = service;
  1024. @@ -214,14 +214,14 @@ grl_dpap_source_finalize (GObject *object)
  1025. static void
  1026. grl_dpap_do_browse (ResultCbAndArgsAndDb *cb_and_db)
  1027. {
  1028. - grl_dpap_db_browse(GRL_DPAP_DB(cb_and_db->db),
  1029. - cb_and_db->cb.container,
  1030. - cb_and_db->cb.source,
  1031. - cb_and_db->cb.op_id,
  1032. - cb_and_db->cb.skip,
  1033. - cb_and_db->cb.count,
  1034. - cb_and_db->cb.callback,
  1035. - cb_and_db->cb.user_data);
  1036. + grl_dpap_db_browse (GRL_DPAP_DB (cb_and_db->db),
  1037. + cb_and_db->cb.container,
  1038. + cb_and_db->cb.source,
  1039. + cb_and_db->cb.op_id,
  1040. + cb_and_db->cb.skip,
  1041. + cb_and_db->cb.count,
  1042. + cb_and_db->cb.callback,
  1043. + cb_and_db->cb.user_data);
  1044. g_free (cb_and_db);
  1045. }
  1046. @@ -229,13 +229,13 @@ grl_dpap_do_browse (ResultCbAndArgsAndDb *cb_and_db)
  1047. static void
  1048. grl_dpap_do_search (ResultCbAndArgsAndDb *cb_and_db)
  1049. {
  1050. - grl_dpap_db_search(GRL_DPAP_DB(cb_and_db->db),
  1051. - cb_and_db->cb.source,
  1052. - cb_and_db->cb.op_id,
  1053. - (GHRFunc) cb_and_db->cb.predicate,
  1054. - cb_and_db->cb.predicate_data,
  1055. - cb_and_db->cb.callback,
  1056. - cb_and_db->cb.user_data);
  1057. + grl_dpap_db_search (GRL_DPAP_DB (cb_and_db->db),
  1058. + cb_and_db->cb.source,
  1059. + cb_and_db->cb.op_id,
  1060. + (GHRFunc) cb_and_db->cb.predicate,
  1061. + cb_and_db->cb.predicate_data,
  1062. + cb_and_db->cb.callback,
  1063. + cb_and_db->cb.user_data);
  1064. g_free (cb_and_db);
  1065. }
  1066. diff --git a/src/dmap/grl-dpap.h b/src/dmap/grl-dpap.h
  1067. index 1f36cfc..ee596b5 100644
  1068. --- a/src/dmap/grl-dpap.h
  1069. +++ b/src/dmap/grl-dpap.h
  1070. @@ -26,31 +26,30 @@
  1071. #include <grilo.h>
  1072. -#define GRL_DPAP_SOURCE_TYPE \
  1073. - (grl_dpap_source_get_type ())
  1074. +#define GRL_DPAP_SOURCE_TYPE (grl_dpap_source_get_type ())
  1075. -#define GRL_DPAP_SOURCE(obj) \
  1076. - (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
  1077. - GRL_DPAP_SOURCE_TYPE, \
  1078. - GrlDpapSource))
  1079. +#define GRL_DPAP_SOURCE(obj) \
  1080. + (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
  1081. + GRL_DPAP_SOURCE_TYPE, \
  1082. + GrlDpapSource))
  1083. -#define GRL_IS_DPAP_SOURCE(obj) \
  1084. - (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
  1085. - GRL_DPAP_SOURCE_TYPE))
  1086. +#define GRL_IS_DPAP_SOURCE(obj) \
  1087. + (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
  1088. + GRL_DPAP_SOURCE_TYPE))
  1089. -#define GRL_DPAP_SOURCE_CLASS(klass) \
  1090. - (G_TYPE_CHECK_CLASS_CAST((klass), \
  1091. - GRL_DPAP_SOURCE_TYPE, \
  1092. - GrlDpapSourceClass))
  1093. +#define GRL_DPAP_SOURCE_CLASS(klass) \
  1094. + (G_TYPE_CHECK_CLASS_CAST ((klass), \
  1095. + GRL_DPAP_SOURCE_TYPE, \
  1096. + GrlDpapSourceClass))
  1097. -#define GRL_IS_DPAP_SOURCE_CLASS(klass) \
  1098. - (G_TYPE_CHECK_CLASS_TYPE((klass), \
  1099. - GRL_DPAP_SOURCE_TYPE))
  1100. +#define GRL_IS_DPAP_SOURCE_CLASS(klass) \
  1101. + (G_TYPE_CHECK_CLASS_TYPE ((klass), \
  1102. + GRL_DPAP_SOURCE_TYPE))
  1103. -#define GRL_DPAP_SOURCE_GET_CLASS(obj) \
  1104. - (G_TYPE_INSTANCE_GET_CLASS ((obj), \
  1105. - GRL_DPAP_SOURCE_TYPE, \
  1106. - GrlDpapSourceClass))
  1107. +#define GRL_DPAP_SOURCE_GET_CLASS(obj) \
  1108. + (G_TYPE_INSTANCE_GET_CLASS ((obj), \
  1109. + GRL_DPAP_SOURCE_TYPE, \
  1110. + GrlDpapSourceClass))
  1111. typedef struct _GrlDpapSourcePrivate GrlDpapSourcePrivate;
  1112. typedef struct _GrlDpapSource GrlDpapSource;