[libdmapsharing] Rerun indent after terminating use of G_DEFINE_TYPE() with ; Signed-off-by: W. Michael Petullo <mike
- From: W. Michael Petullo <wmpetullo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libdmapsharing] Rerun indent after terminating use of G_DEFINE_TYPE() with ; Signed-off-by: W. Michael Petullo <mike
- Date: Sat, 5 Mar 2011 18:07:58 +0000 (UTC)
commit fbbb4b0cfe9a46a0422877883c4b6296b08823d7
Author: W. Michael Petullo <mike flyn org>
Date: Fri Mar 4 16:57:19 2011 -0600
Rerun indent after terminating use of G_DEFINE_TYPE() with ;
Signed-off-by: W. Michael Petullo <mike flyn org>
TODO | 2 +-
libdmapsharing/daap-connection.c | 2 +-
libdmapsharing/daap-share.c | 10 +-
libdmapsharing/dacp-connection.c | 2 +-
libdmapsharing/dacp-share.c | 22 ++--
libdmapsharing/dmap-connection.c | 187 ++++++++++++++--------------
libdmapsharing/dmap-gst-input-stream.c | 2 +-
libdmapsharing/dmap-gst-mp3-input-stream.c | 7 +-
libdmapsharing/dmap-mdns-browser-avahi.c | 23 ++--
libdmapsharing/dmap-mdns-browser-howl.c | 11 +-
libdmapsharing/dmap-mdns-publisher-avahi.c | 19 ++--
libdmapsharing/dpap-connection.c | 2 +-
libdmapsharing/dpap-share.c | 5 +-
13 files changed, 149 insertions(+), 145 deletions(-)
---
diff --git a/TODO b/TODO
index 2e82bba..4a0d6cf 100644
--- a/TODO
+++ b/TODO
@@ -6,7 +6,7 @@ Noah: DNS-SD implementation
Documentation:
Improve content (Noah?)
- Fix bad characters (UTF-8 issue?)
+ Fix bad characters (UTF-8 issue?) -- test / see prepared email
Fix alignment of object description code
Fix "up" icon in second level pages
Add standard sidebar
diff --git a/libdmapsharing/daap-connection.c b/libdmapsharing/daap-connection.c
index af649d4..43771f1 100644
--- a/libdmapsharing/daap-connection.c
+++ b/libdmapsharing/daap-connection.c
@@ -194,4 +194,4 @@ daap_connection_init (DAAPConnection * connection)
*/
}
-G_DEFINE_TYPE (DAAPConnection, daap_connection, DMAP_TYPE_CONNECTION)
+G_DEFINE_TYPE (DAAPConnection, daap_connection, DMAP_TYPE_CONNECTION);
diff --git a/libdmapsharing/daap-share.c b/libdmapsharing/daap-share.c
index 0a0f1f7..6617fa7 100644
--- a/libdmapsharing/daap-share.c
+++ b/libdmapsharing/daap-share.c
@@ -89,9 +89,10 @@ enum
PROP_0,
};
-G_DEFINE_TYPE (DAAPShare, daap_share, DMAP_TYPE_SHARE)
+G_DEFINE_TYPE (DAAPShare, daap_share, DMAP_TYPE_SHARE);
- static void daap_share_class_init (DAAPShareClass * klass)
+static void
+daap_share_class_init (DAAPShareClass * klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
DMAPShareClass *parent_class = DMAP_SHARE_CLASS (object_class);
@@ -472,9 +473,8 @@ send_chunked_file (SoupServer * server, SoupMessage * message,
SOUP_ENCODING_CONTENT_LENGTH);
g_debug ("Content length is %" G_GUINT64_FORMAT ".",
filesize);
- soup_message_headers_set_content_length (message->
- response_headers,
- filesize);
+ soup_message_headers_set_content_length
+ (message->response_headers, filesize);
} else if (soup_message_get_http_version (message) == SOUP_HTTP_1_0) {
/* NOTE: Roku clients support only HTTP 1.0. */
#ifdef HAVE_ENCODING_EOF
diff --git a/libdmapsharing/dacp-connection.c b/libdmapsharing/dacp-connection.c
index 92f0c99..9b5e64b 100644
--- a/libdmapsharing/dacp-connection.c
+++ b/libdmapsharing/dacp-connection.c
@@ -95,4 +95,4 @@ dacp_connection_init (DACPConnection * connection)
*/
}
-G_DEFINE_TYPE (DACPConnection, dacp_connection, DMAP_TYPE_CONNECTION)
+G_DEFINE_TYPE (DACPConnection, dacp_connection, DMAP_TYPE_CONNECTION);
diff --git a/libdmapsharing/dacp-share.c b/libdmapsharing/dacp-share.c
index 7c945e9..3897ae2 100644
--- a/libdmapsharing/dacp-share.c
+++ b/libdmapsharing/dacp-share.c
@@ -122,9 +122,10 @@ enum
static guint signals[LAST_SIGNAL] = { 0, };
-G_DEFINE_TYPE (DACPShare, dacp_share, DAAP_TYPE_SHARE)
+G_DEFINE_TYPE (DACPShare, dacp_share, DAAP_TYPE_SHARE);
- static void dacp_share_class_init (DACPShareClass * klass)
+static void
+dacp_share_class_init (DACPShareClass * klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
DMAPShareClass *dmap_class = DMAP_SHARE_CLASS (object_class);
@@ -537,8 +538,8 @@ dacp_share_send_playstatusupdate (DACPShare * share)
(SoupMessage *)
list->data);
soup_server_unpause_message (server,
- (SoupMessage *) list->
- data);
+ (SoupMessage *)
+ list->data);
}
}
@@ -553,8 +554,8 @@ dacp_share_send_playstatusupdate (DACPShare * share)
(SoupMessage *)
list->data);
soup_server_unpause_message (server,
- (SoupMessage *) list->
- data);
+ (SoupMessage *)
+ list->data);
}
}
@@ -824,8 +825,8 @@ dacp_share_ctrl_int (DMAPShare * share,
if (revision_number >= dacp_share->priv->current_revision) {
g_object_ref (message);
dacp_share->priv->update_queue =
- g_slist_prepend (dacp_share->priv->
- update_queue, message);
+ g_slist_prepend (dacp_share->
+ priv->update_queue, message);
g_signal_connect_object (message, "finished",
G_CALLBACK
(status_update_message_finished),
@@ -860,8 +861,8 @@ dacp_share_ctrl_int (DMAPShare * share,
if (g_hash_table_lookup (query, "mh"))
height = atoi (g_hash_table_lookup (query, "mh"));
artwork_filename =
- dacp_player_now_playing_artwork (dacp_share->priv->
- player, width,
+ dacp_player_now_playing_artwork (dacp_share->
+ priv->player, width,
height);
if (!artwork_filename) {
g_debug ("No artwork for currently playing song");
@@ -874,6 +875,7 @@ dacp_share_ctrl_int (DMAPShare * share,
gdk_pixbuf_new_from_file_at_scale (artwork_filename,
width, height,
TRUE, NULL);
+
if (!artwork) {
g_debug ("Error loading image file");
g_free (artwork_filename);
diff --git a/libdmapsharing/dmap-connection.c b/libdmapsharing/dmap-connection.c
index e9ebbeb..1f5228a 100644
--- a/libdmapsharing/dmap-connection.c
+++ b/libdmapsharing/dmap-connection.c
@@ -54,77 +54,78 @@ static void dmap_connection_state_done (DMAPConnection * connection,
static gboolean emit_progress_idle (DMAPConnection * connection);
-G_DEFINE_TYPE (DMAPConnection, dmap_connection, G_TYPE_OBJECT)
+G_DEFINE_TYPE (DMAPConnection, dmap_connection, G_TYPE_OBJECT);
#define DMAP_CONNECTION_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), DMAP_TYPE_CONNECTION, DMAPConnectionPrivate))
- struct DMAPConnectionPrivate
- {
- char *name;
- gboolean password_protected;
- char *username;
- char *password;
- char *host;
- guint port;
-
- gboolean is_connected;
- gboolean is_connecting;
-
- SoupSession *session;
- SoupURI *base_uri;
- gchar *daap_base_uri;
-
- gdouble dmap_version;
- guint32 session_id;
- gint revision_number;
-
- gint request_id;
- gint database_id;
-
- guint reading_playlist;
- GSList *playlists;
- GHashTable *item_id_to_uri;
-
- DMAPDb *db;
- DMAPRecordFactory *record_factory;
-
- DMAPConnectionState state;
- gboolean use_response_handler_thread;
- float progress;
-
- guint emit_progress_id;
- guint do_something_id;
-
- gboolean result;
- char *last_error_message;
- };
-
- enum
- {
- PROP_0,
- PROP_DB,
- PROP_FACTORY,
- PROP_NAME,
- PROP_ENTRY_TYPE,
- PROP_PASSWORD_PROTECTED,
- PROP_HOST,
- PROP_PORT,
- PROP_BASE_URI,
- PROP_DATABASE_ID,
- PROP_SESSION_ID,
- PROP_DMAP_VERSION,
- PROP_REVISION_NUMBER,
- };
-
- enum
- {
- AUTHENTICATE,
- CONNECTING,
- CONNECTED,
- DISCONNECTED,
- OPERATION_DONE,
- LAST_SIGNAL
- };
-
- static guint signals[LAST_SIGNAL] = { 0, };
+
+struct DMAPConnectionPrivate
+{
+ char *name;
+ gboolean password_protected;
+ char *username;
+ char *password;
+ char *host;
+ guint port;
+
+ gboolean is_connected;
+ gboolean is_connecting;
+
+ SoupSession *session;
+ SoupURI *base_uri;
+ gchar *daap_base_uri;
+
+ gdouble dmap_version;
+ guint32 session_id;
+ gint revision_number;
+
+ gint request_id;
+ gint database_id;
+
+ guint reading_playlist;
+ GSList *playlists;
+ GHashTable *item_id_to_uri;
+
+ DMAPDb *db;
+ DMAPRecordFactory *record_factory;
+
+ DMAPConnectionState state;
+ gboolean use_response_handler_thread;
+ float progress;
+
+ guint emit_progress_id;
+ guint do_something_id;
+
+ gboolean result;
+ char *last_error_message;
+};
+
+enum
+{
+ PROP_0,
+ PROP_DB,
+ PROP_FACTORY,
+ PROP_NAME,
+ PROP_ENTRY_TYPE,
+ PROP_PASSWORD_PROTECTED,
+ PROP_HOST,
+ PROP_PORT,
+ PROP_BASE_URI,
+ PROP_DATABASE_ID,
+ PROP_SESSION_ID,
+ PROP_DMAP_VERSION,
+ PROP_REVISION_NUMBER,
+};
+
+enum
+{
+ AUTHENTICATE,
+ CONNECTING,
+ CONNECTED,
+ DISCONNECTED,
+ OPERATION_DONE,
+ LAST_SIGNAL
+};
+
+static guint signals[LAST_SIGNAL] = { 0, };
static void
dmap_connection_finalize (GObject * object)
@@ -458,12 +459,12 @@ actual_http_response_handler (DAAPResponseData * data)
const char *server;
encoding_header =
- soup_message_headers_get (data->message->
- response_headers,
+ soup_message_headers_get (data->
+ message->response_headers,
"Content-Encoding");
- server = soup_message_headers_get (data->message->
- response_headers,
+ server = soup_message_headers_get (data->
+ message->response_headers,
"DAAP-Server");
if (server != NULL
&& strstr (server, ITUNES_7_SERVER) != NULL) {
@@ -737,8 +738,7 @@ handle_server_info (DMAPConnection * connection,
/* get the daap version number */
item = dmap_structure_find_item (structure,
DMAP_CONNECTION_GET_CLASS
- (connection)->
- get_protocol_version_cc
+ (connection)->get_protocol_version_cc
(connection));
if (item == NULL) {
dmap_connection_state_done (connection, FALSE);
@@ -763,9 +763,9 @@ handle_login (DMAPConnection * connection,
if (priv->do_something_id != 0) {
g_source_remove (priv->do_something_id);
}
- priv->do_something_id =
- g_idle_add ((GSourceFunc)
- dmap_connection_do_something, connection);
+ priv->do_something_id = g_idle_add ((GSourceFunc)
+ dmap_connection_do_something,
+ connection);
return;
}
@@ -931,9 +931,10 @@ handle_song_listing (DMAPConnection * connection,
for (i = 0, n = listing_node->children; n; i++, n = n->next) {
gint item_id = 0;
DMAPRecord *record =
- DMAP_CONNECTION_GET_CLASS (connection)->
- handle_mlcl (connection, priv->record_factory, n,
- &item_id);
+ DMAP_CONNECTION_GET_CLASS (connection)->handle_mlcl
+ (connection, priv->record_factory, n,
+ &item_id);
+
if (record) {
gchar *uri = NULL;
gchar *format = NULL;
@@ -975,8 +976,8 @@ handle_song_listing (DMAPConnection * connection,
if (i % commit_batch == 0) {
priv->progress = ((float) i / (float) returned_count);
if (priv->emit_progress_id != 0) {
- g_source_remove (connection->priv->
- emit_progress_id);
+ g_source_remove (connection->
+ priv->emit_progress_id);
}
priv->emit_progress_id =
g_idle_add ((GSourceFunc) emit_progress_idle,
@@ -1327,9 +1328,9 @@ dmap_connection_disconnect (DMAPConnection * connection,
} else {
priv->state = DMAP_LOGOUT;
- priv->do_something_id =
- g_idle_add ((GSourceFunc)
- dmap_connection_do_something, connection);
+ priv->do_something_id = g_idle_add ((GSourceFunc)
+ dmap_connection_do_something,
+ connection);
}
}
@@ -1486,8 +1487,8 @@ dmap_connection_do_something (DMAPConnection * connection)
case DMAP_GET_SONGS:
g_debug ("Getting DAAP song listing");
- meta = DMAP_CONNECTION_GET_CLASS (connection)->
- get_query_metadata (connection);
+ meta = DMAP_CONNECTION_GET_CLASS
+ (connection)->get_query_metadata (connection);
path = g_strdup_printf
("/databases/%i/items?session-id=%u&revision-number=%i"
"&meta=%s", priv->database_id, priv->session_id,
@@ -1520,10 +1521,10 @@ dmap_connection_do_something (DMAPConnection * connection)
case DMAP_GET_PLAYLIST_ENTRIES:
{
DMAPPlaylist *playlist =
- (DMAPPlaylist *) g_slist_nth_data (priv->
- playlists,
- priv->
- reading_playlist);
+ (DMAPPlaylist *)
+ g_slist_nth_data (priv->playlists,
+ priv->reading_playlist);
+
g_assert (playlist);
g_debug ("Reading DAAP playlist %d entries",
priv->reading_playlist);
diff --git a/libdmapsharing/dmap-gst-input-stream.c b/libdmapsharing/dmap-gst-input-stream.c
index e18f0b1..96a9bc7 100644
--- a/libdmapsharing/dmap-gst-input-stream.c
+++ b/libdmapsharing/dmap-gst-input-stream.c
@@ -445,4 +445,4 @@ dmap_gst_input_stream_init (DMAPGstInputStream * stream)
G_DEFINE_TYPE_WITH_CODE (DMAPGstInputStream, dmap_gst_input_stream,
G_TYPE_INPUT_STREAM,
G_IMPLEMENT_INTERFACE (G_TYPE_SEEKABLE,
- dmap_gst_input_stream_seekable_iface_init))
+ dmap_gst_input_stream_seekable_iface_init));
diff --git a/libdmapsharing/dmap-gst-mp3-input-stream.c b/libdmapsharing/dmap-gst-mp3-input-stream.c
index d543641..49ffb5f 100644
--- a/libdmapsharing/dmap-gst-mp3-input-stream.c
+++ b/libdmapsharing/dmap-gst-mp3-input-stream.c
@@ -162,11 +162,10 @@ dmap_gst_mp3_input_stream_kill_pipeline (DMAPGstInputStream * stream)
}
G_DEFINE_TYPE (DMAPGstMP3InputStream, dmap_gst_mp3_input_stream,
- DMAP_TYPE_GST_INPUT_STREAM)
+ DMAP_TYPE_GST_INPUT_STREAM);
- static void
- dmap_gst_mp3_input_stream_class_init (DMAPGstMP3InputStreamClass
- * klass)
+static void
+dmap_gst_mp3_input_stream_class_init (DMAPGstMP3InputStreamClass * klass)
{
DMAPGstInputStreamClass *parent_class =
DMAP_GST_INPUT_STREAM_CLASS (klass);
diff --git a/libdmapsharing/dmap-mdns-browser-avahi.c b/libdmapsharing/dmap-mdns-browser-avahi.c
index 6b59534..9d27fe0 100644
--- a/libdmapsharing/dmap-mdns-browser-avahi.c
+++ b/libdmapsharing/dmap-mdns-browser-avahi.c
@@ -106,14 +106,14 @@ static void free_service (DMAPMdnsBrowserService * service);
static guint dmap_mdns_browser_signals[LAST_SIGNAL] = { 0, };
-G_DEFINE_TYPE (DMAPMdnsBrowser, dmap_mdns_browser, G_TYPE_OBJECT)
+G_DEFINE_TYPE (DMAPMdnsBrowser, dmap_mdns_browser, G_TYPE_OBJECT);
- static gchar *service_type_name[] = {
- NULL,
- "_daap._tcp",
- "_dpap._tcp",
- "_touch-remote._tcp"
- };
+static gchar *service_type_name[] = {
+ NULL,
+ "_daap._tcp",
+ "_dpap._tcp",
+ "_touch-remote._tcp"
+};
GQuark
dmap_mdns_browser_error_quark (void)
@@ -241,8 +241,8 @@ dmap_mdns_browser_start (DMAPMdnsBrowser * browser, GError ** error)
avahi_service_browser_new (browser->priv->client,
AVAHI_IF_UNSPEC,
AVAHI_PROTO_UNSPEC,
- service_type_name[browser->priv->
- service_type],
+ service_type_name[browser->
+ priv->service_type],
NULL,
#ifdef HAVE_AVAHI_0_6
0,
@@ -466,8 +466,9 @@ dmap_mdns_browser_resolve (DMAPMdnsBrowser * browser,
AVAHI_PROTO_INET,
name,
service_type_name
- [browser->priv->
- service_type], domain,
+ [browser->
+ priv->service_type],
+ domain,
AVAHI_PROTO_UNSPEC,
#ifdef HAVE_AVAHI_0_6
0,
diff --git a/libdmapsharing/dmap-mdns-browser-howl.c b/libdmapsharing/dmap-mdns-browser-howl.c
index dc9c6c7..d4cd03d 100644
--- a/libdmapsharing/dmap-mdns-browser-howl.c
+++ b/libdmapsharing/dmap-mdns-browser-howl.c
@@ -83,9 +83,9 @@ static void free_service (DMAPMdnsBrowserService * service);
static guint signals[LAST_SIGNAL] = { 0, };
-G_DEFINE_TYPE (DMAPMdnsBrowser, dmap_mdns_browser, G_TYPE_OBJECT)
+G_DEFINE_TYPE (DMAPMdnsBrowser, dmap_mdns_browser, G_TYPE_OBJECT);
- GQuark
+GQuark
dmap_mdns_browser_error_quark (void)
{
static GQuark quark = 0;
@@ -295,8 +295,7 @@ dmap_mdns_browser_resolve (DMAPMdnsBrowser * browser, const char *name)
0,
name,
"_dmap._tcp",
- "local",
- (sw_discovery_resolve_reply)
+ "local", (sw_discovery_resolve_reply)
resolve_cb, (sw_opaque) browser,
(sw_discovery_oid *) & oid);
@@ -378,8 +377,8 @@ dmap_mdns_browser_start (DMAPMdnsBrowser * browser, GError ** error)
"local",
(sw_discovery_browse_reply) browse_cb,
(sw_opaque) browser,
- (sw_discovery_oid *) browser->priv->
- oid);
+ (sw_discovery_oid *) browser->
+ priv->oid);
if (result != SW_OKAY) {
g_debug ("Error starting mDNS discovery using Howl");
diff --git a/libdmapsharing/dmap-mdns-publisher-avahi.c b/libdmapsharing/dmap-mdns-publisher-avahi.c
index 5be28f7..e03fe8d 100644
--- a/libdmapsharing/dmap-mdns-publisher-avahi.c
+++ b/libdmapsharing/dmap-mdns-publisher-avahi.c
@@ -74,9 +74,9 @@ enum
static guint signals[LAST_SIGNAL] = { 0, };
-G_DEFINE_TYPE (DMAPMdnsPublisher, dmap_mdns_publisher, G_TYPE_OBJECT)
+G_DEFINE_TYPE (DMAPMdnsPublisher, dmap_mdns_publisher, G_TYPE_OBJECT);
- static gpointer publisher_object = NULL;
+static gpointer publisher_object = NULL;
GQuark
dmap_mdns_publisher_error_quark (void)
@@ -142,8 +142,8 @@ create_service (struct DMAPMdnsPublisherService *service,
}
}
- ret = avahi_entry_group_add_service_strlst (publisher->priv->
- entry_group,
+ ret = avahi_entry_group_add_service_strlst (publisher->
+ priv->entry_group,
AVAHI_IF_UNSPEC,
AVAHI_PROTO_UNSPEC, 0,
service->name,
@@ -177,8 +177,8 @@ create_services (DMAPMdnsPublisher * publisher, GError ** error)
avahi_entry_group_new (publisher->priv->client,
(AvahiEntryGroupCallback)
entry_group_cb, publisher);
- dmap_mdns_avahi_set_entry_group (publisher->priv->
- entry_group);
+ dmap_mdns_avahi_set_entry_group (publisher->
+ priv->entry_group);
} else {
avahi_entry_group_reset (publisher->priv->entry_group);
}
@@ -379,9 +379,10 @@ dmap_mdns_publisher_constructor (GType type,
static GObject *self = NULL;
if (self == NULL) {
- self = G_OBJECT_CLASS (dmap_mdns_publisher_parent_class)->
- constructor (type, n_construct_params,
- construct_params);
+ self = G_OBJECT_CLASS
+ (dmap_mdns_publisher_parent_class)->constructor (type,
+ n_construct_params,
+ construct_params);
g_object_add_weak_pointer (self, (gpointer) & self);
return self;
}
diff --git a/libdmapsharing/dpap-connection.c b/libdmapsharing/dpap-connection.c
index 30cc758..08cb367 100644
--- a/libdmapsharing/dpap-connection.c
+++ b/libdmapsharing/dpap-connection.c
@@ -184,4 +184,4 @@ dpap_connection_init (DPAPConnection * connection)
*/
}
-G_DEFINE_TYPE (DPAPConnection, dpap_connection, DMAP_TYPE_CONNECTION)
+G_DEFINE_TYPE (DPAPConnection, dpap_connection, DMAP_TYPE_CONNECTION);
diff --git a/libdmapsharing/dpap-share.c b/libdmapsharing/dpap-share.c
index 89e7296..304bc25 100644
--- a/libdmapsharing/dpap-share.c
+++ b/libdmapsharing/dpap-share.c
@@ -97,9 +97,10 @@ enum
PROP_0,
};
-G_DEFINE_TYPE (DPAPShare, dpap_share, DMAP_TYPE_SHARE)
+G_DEFINE_TYPE (DPAPShare, dpap_share, DMAP_TYPE_SHARE);
- static void dpap_share_class_init (DPAPShareClass * klass)
+static void
+dpap_share_class_init (DPAPShareClass * klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
DMAPShareClass *parent_class = DMAP_SHARE_CLASS (object_class);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]