[libdmapsharing] Work through rest of pedansee warnings
- From: W. Michael Petullo <wmpetullo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libdmapsharing] Work through rest of pedansee warnings
- Date: Thu, 22 Mar 2018 00:23:59 +0000 (UTC)
commit 1c964bcbea32e0ceea49eaae2732dc44d50d0999
Author: W. Michael Petullo <mike flyn org>
Date: Wed Mar 21 20:23:46 2018 -0400
Work through rest of pedansee warnings
Signed-off-by: W. Michael Petullo <mike flyn org>
libdmapsharing/Makefile.am | 21 ++++
libdmapsharing/dmap-cc.h | 6 +-
libdmapsharing/dmap-connection-private.h | 4 +
libdmapsharing/dmap-gst-input-stream.c | 143 ++++++++++++-----------
libdmapsharing/dmap-gst-input-stream.h | 17 ++--
libdmapsharing/dmap-gst-mp3-input-stream.c | 18 +--
libdmapsharing/dmap-gst-mp3-input-stream.h | 6 +-
libdmapsharing/dmap-gst-qt-input-stream.c | 18 +--
libdmapsharing/dmap-gst-qt-input-stream.h | 6 +-
libdmapsharing/dmap-gst-wav-input-stream.c | 18 +--
libdmapsharing/dmap-gst-wav-input-stream.h | 6 +-
libdmapsharing/dmap-md5.h | 4 +-
libdmapsharing/dmap-mdns-browser-avahi.c | 9 +-
libdmapsharing/dmap-mdns-browser-dnssd.c | 138 +++++++++++-----------
libdmapsharing/dmap-mdns-publisher-dnssd.c | 55 +++++-----
libdmapsharing/dmap-mdns-service.h | 2 +-
libdmapsharing/dmap-private-utils.h | 4 +-
libdmapsharing/dmap-structure.h | 9 +-
libdmapsharing/gst-util.c | 2 +-
libdmapsharing/gst-util.h | 8 +-
libdmapsharing/test-dmap-av-record-factory.h | 8 +-
libdmapsharing/test-dmap-av-record.h | 8 +-
libdmapsharing/test-dmap-container-db.h | 8 +-
libdmapsharing/test-dmap-container-record.h | 8 +-
libdmapsharing/test-dmap-db.h | 9 +-
libdmapsharing/test-dmap-image-record-factory.h | 8 +-
libdmapsharing/test-dmap-image-record.h | 8 +-
27 files changed, 283 insertions(+), 268 deletions(-)
---
diff --git a/libdmapsharing/Makefile.am b/libdmapsharing/Makefile.am
index 9f37c1f..0cd63d2 100644
--- a/libdmapsharing/Makefile.am
+++ b/libdmapsharing/Makefile.am
@@ -208,6 +208,18 @@ if HAVE_PEDANSEE
echo "[ignore-entirely]" >> pedansee.conf
echo " # Ignore CPP-generated GObject code." >> pedansee.conf
echo -n " name = " >> pedansee.conf
+ echo -n "dmap_mdns_browser_new;" >> pedansee.conf
+ echo -n "dmap_mdns_browser_start;" >> pedansee.conf
+ echo -n "dmap_mdns_browser_stop;" >> pedansee.conf
+ echo -n "dmap_mdns_browser_error_quark;" >> pedansee.conf
+ echo -n "dmap_mdns_browser_get_services;" >> pedansee.conf
+ echo -n "dmap_mdns_browser_get_service_type;" >> pedansee.conf
+ echo -n "dmap_mdns_publisher_new;" >> pedansee.conf
+ echo -n "dmap_mdns_publisher_error_quark;" >> pedansee.conf
+ echo -n "dmap_mdns_publisher_rename_at_port;" >> pedansee.conf
+ echo -n "dmap_mdns_publisher_publish;" >> pedansee.conf
+ echo -n "dmap_mdns_publisher_withdraw;" >> pedansee.conf
+ echo -n "dmap_connection_get;" >> pedansee.conf
for i in $$(grep G_DEFINE_INTERFACE *.c | sed 's/[^,]*, \([^,]*\),.*/\1/g'); do \
echo -n $${i}_default_init\;; \
echo -n $${i}_get_type\;; \
@@ -241,6 +253,15 @@ if HAVE_PEDANSEE
done
set -e; for i in $(libdmapsharinginclude_HEADERS) \
$(noinst_HEADERS); do \
+ if [ $$i = dmap-enums.h ]; then # Skip this generated code. \
+ continue; \
+ fi; \
+ if [ $$i = dmap-marshal.h ]; then # Skip this generated code. \
+ continue; \
+ fi; \
+ if [ $$i = dmap-share-private.h ]; then # Skip this generated code. \
+ continue; \
+ fi; \
$(PEDANSEE) -c pedansee.conf $$i -- -x c $(DEFS) $(libdmapsharing_4_0_la_CFLAGS); \
done
endif
diff --git a/libdmapsharing/dmap-cc.h b/libdmapsharing/dmap-cc.h
index 19fb927..b9665b9 100644
--- a/libdmapsharing/dmap-cc.h
+++ b/libdmapsharing/dmap-cc.h
@@ -1,7 +1,11 @@
#ifndef _DMAP_CC_H
#define _DMAP_CC_H
-G_BEGIN_DECLS typedef enum
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+typedef enum
{
DMAP_CC_INVALID = 0,
DMAP_RAW, /* The RAW type does not use a content code.
diff --git a/libdmapsharing/dmap-connection-private.h b/libdmapsharing/dmap-connection-private.h
index 58d24b4..6862b06 100644
--- a/libdmapsharing/dmap-connection-private.h
+++ b/libdmapsharing/dmap-connection-private.h
@@ -18,6 +18,10 @@
*
*/
+#include <glib-object.h>
+
+#include <libdmapsharing/dmap-connection.h>
+
#ifndef _DMAP_CONNECTION_PRIVATE_H
#define _DMAP_CONNECTION_PRIVATE_H
diff --git a/libdmapsharing/dmap-gst-input-stream.c b/libdmapsharing/dmap-gst-input-stream.c
index 627ec37..187b73f 100644
--- a/libdmapsharing/dmap-gst-input-stream.c
+++ b/libdmapsharing/dmap-gst-input-stream.c
@@ -52,7 +52,7 @@ struct DmapGstInputStreamPrivate
DmapGstInputStreamPrivate))
static goffset
-dmap_gst_input_stream_tell (GSeekable * seekable)
+_tell (GSeekable * seekable)
{
/* FIXME: implement return current position in stream. */
g_error ("Not implemented");
@@ -60,17 +60,18 @@ dmap_gst_input_stream_tell (GSeekable * seekable)
}
static gboolean
-dmap_gst_input_stream_can_seek (GSeekable * seekable)
+_can_seek (GSeekable * seekable)
{
return TRUE;
}
static gboolean
-dmap_gst_input_stream_seek (GSeekable * seekable,
- goffset offset,
- GSeekType type,
- GCancellable * cacellable, GError ** error)
+_seek (GSeekable * seekable,
+ goffset offset,
+ GSeekType type,
+ GCancellable * cacellable, GError ** error)
{
+ gboolean ok = FALSE;
// FIXME: implement: DmapGstInputStream *stream;
// FIXME: implement: goffset absolute;
@@ -96,8 +97,7 @@ dmap_gst_input_stream_seek (GSeekable * seekable,
G_IO_ERROR,
G_IO_ERROR_INVALID_ARGUMENT,
"Invalid GSeekType supplied");
-
- return FALSE;
+ goto done;
}
/* FIXME: implement:
@@ -106,7 +106,7 @@ dmap_gst_input_stream_seek (GSeekable * seekable,
* G_IO_ERROR,
* G_IO_ERROR_INVALID_ARGUMENT,
* _("Invalid seek request"));
- * return FALSE;
+ * goto done;
* }
*/
@@ -119,23 +119,26 @@ dmap_gst_input_stream_seek (GSeekable * seekable,
* G_IO_ERROR,
* G_IO_ERROR_FAILED,
* "Seek failed");
- * return FALSE;
+ * goto done;
* }
*/
- return TRUE;
+ ok = TRUE;
+
+done:
+ return ok;
}
static gboolean
-dmap_gst_input_stream_can_truncate (GSeekable * seekable)
+_can_truncate (GSeekable * seekable)
{
return FALSE;
}
static gboolean
-dmap_gst_input_stream_truncate (GSeekable * seekable,
- goffset offset,
- GCancellable * cancellable, GError ** error)
+_truncate (GSeekable * seekable,
+ goffset offset,
+ GCancellable * cancellable, GError ** error)
{
g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
"Cannot truncate DmapGstInputStream");
@@ -143,13 +146,13 @@ dmap_gst_input_stream_truncate (GSeekable * seekable,
}
static void
-dmap_gst_input_stream_seekable_iface_init (GSeekableIface * iface)
+_seekable_iface_init (GSeekableIface * iface)
{
- iface->tell = dmap_gst_input_stream_tell;
- iface->can_seek = dmap_gst_input_stream_can_seek;
- iface->seek = dmap_gst_input_stream_seek;
- iface->can_truncate = dmap_gst_input_stream_can_truncate;
- iface->truncate_fn = dmap_gst_input_stream_truncate;
+ iface->tell = _tell;
+ iface->can_seek = _can_seek;
+ iface->seek = _seek;
+ iface->can_truncate = _can_truncate;
+ iface->truncate_fn = _truncate;
}
void
@@ -270,16 +273,16 @@ dmap_gst_input_stream_new (const gchar * transcode_mimetype,
}
static gssize
-min (gssize a, gssize b)
+_min (gssize a, gssize b)
{
return a < b ? a : b;
}
static gssize
-dmap_gst_input_stream_read (GInputStream * stream,
- void *buffer,
- gsize count,
- GCancellable * cancellable, GError ** error)
+_read (GInputStream * stream,
+ void *buffer,
+ gsize count,
+ GCancellable * cancellable, GError ** error)
{
int i;
DmapGstInputStream *gst_stream = DMAP_GST_INPUT_STREAM (stream);
@@ -301,7 +304,7 @@ dmap_gst_input_stream_read (GInputStream * stream,
/* Depending on timing, more data may have been written
* since check: do not pull more than count:
*/
- count = min (count, g_queue_get_length (gst_stream->priv->buffer));
+ count = _min (count, g_queue_get_length (gst_stream->priv->buffer));
}
for (i = 0; i < count; i++) {
@@ -309,10 +312,11 @@ dmap_gst_input_stream_read (GInputStream * stream,
GPOINTER_TO_INT (g_queue_pop_head (gst_stream->priv->buffer));
}
- if (gst_stream->priv->write_request > count)
+ if (gst_stream->priv->write_request > count) {
gst_stream->priv->write_request -= count;
- else
+ } else {
gst_stream->priv->write_request = 0;
+ }
if (gst_stream->priv->write_request <= 0) {
g_cond_signal (&gst_stream->priv->buffer_write_ready);
@@ -324,27 +328,26 @@ dmap_gst_input_stream_read (GInputStream * stream,
}
static gssize
-dmap_gst_input_stream_skip (GInputStream * stream,
- gsize count,
- GCancellable * cancellable, GError ** error)
+_skip (GInputStream * stream, gsize count, GCancellable * cancellable,
+ GError ** error)
{
g_error ("Not implemented");
return 0;
}
static void
-dmap_gst_input_stream_kill_pipeline (DmapGstInputStream * stream)
+_kill_pipeline (DmapGstInputStream * stream)
{
DMAP_GST_INPUT_STREAM_GET_CLASS (stream)->kill_pipeline (stream);
}
static gboolean
-dmap_gst_input_stream_close (GInputStream * stream,
- GCancellable * cancellable, GError ** error)
+_close (GInputStream * stream,
+ GCancellable * cancellable, GError ** error)
{
DmapGstInputStream *gst_stream = DMAP_GST_INPUT_STREAM (stream);
- dmap_gst_input_stream_kill_pipeline (gst_stream);
+ _kill_pipeline (gst_stream);
g_mutex_lock (&gst_stream->priv->buffer_mutex);
@@ -357,54 +360,54 @@ dmap_gst_input_stream_close (GInputStream * stream,
}
static gssize
-dmap_gst_input_stream_read_finish (GInputStream * stream,
- GAsyncResult * result, GError ** error)
+_read_finish (GInputStream * stream,
+ GAsyncResult * result, GError ** error)
{
g_error ("Not implemented");
return 0;
}
static gssize
-dmap_gst_input_stream_skip_finish (GInputStream * stream,
- GAsyncResult * result, GError ** error)
+_skip_finish (GInputStream * stream,
+ GAsyncResult * result, GError ** error)
{
g_error ("Not implemented");
return 0;
}
static void
-dmap_gst_input_stream_close_async (GInputStream * stream,
- int io_priority,
- GCancellable * cancellabl,
- GAsyncReadyCallback callback,
- gpointer data)
+_close_async (GInputStream * stream,
+ int io_priority,
+ GCancellable * cancellabl,
+ GAsyncReadyCallback callback,
+ gpointer data)
{
}
static void
-dmap_gst_input_stream_read_async (GInputStream * stream,
- void *buffer,
- gsize count,
- int io_priority,
- GCancellable * cancellable,
- GAsyncReadyCallback callback,
- gpointer user_data)
+_read_async (GInputStream * stream,
+ void *buffer,
+ gsize count,
+ int io_priority,
+ GCancellable * cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
}
static void
-dmap_gst_input_stream_skip_async (GInputStream * stream,
- gsize count,
- int io_priority,
- GCancellable * cancellabl,
- GAsyncReadyCallback callback,
- gpointer datae)
+_skip_async (GInputStream * stream,
+ gsize count,
+ int io_priority,
+ GCancellable * cancellabl,
+ GAsyncReadyCallback callback,
+ gpointer datae)
{
}
static gboolean
-dmap_gst_input_stream_close_finish (GInputStream * stream,
- GAsyncResult * result, GError ** error)
+_close_finish (GInputStream * stream,
+ GAsyncResult * result, GError ** error)
{
g_error ("Not implemented");
return FALSE;
@@ -418,15 +421,15 @@ dmap_gst_input_stream_class_init (DmapGstInputStreamClass * klass)
g_type_class_add_private (klass, sizeof (DmapGstInputStreamPrivate));
istream_class = G_INPUT_STREAM_CLASS (klass);
- istream_class->read_fn = dmap_gst_input_stream_read;
- istream_class->skip = dmap_gst_input_stream_skip;
- istream_class->close_fn = dmap_gst_input_stream_close;
- istream_class->read_async = dmap_gst_input_stream_read_async;
- istream_class->read_finish = dmap_gst_input_stream_read_finish;
- istream_class->skip_async = dmap_gst_input_stream_skip_async;
- istream_class->skip_finish = dmap_gst_input_stream_skip_finish;
- istream_class->close_async = dmap_gst_input_stream_close_async;
- istream_class->close_finish = dmap_gst_input_stream_close_finish;
+ istream_class->read_fn = _read;
+ istream_class->skip = _skip;
+ istream_class->close_fn = _close;
+ istream_class->read_async = _read_async;
+ istream_class->read_finish = _read_finish;
+ istream_class->skip_async = _skip_async;
+ istream_class->skip_finish = _skip_finish;
+ istream_class->close_async = _close_async;
+ istream_class->close_finish = _close_finish;
}
static void
@@ -450,4 +453,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));
+ _seekable_iface_init));
diff --git a/libdmapsharing/dmap-gst-input-stream.h b/libdmapsharing/dmap-gst-input-stream.h
index 18a21d4..95b2231 100644
--- a/libdmapsharing/dmap-gst-input-stream.h
+++ b/libdmapsharing/dmap-gst-input-stream.h
@@ -20,11 +20,14 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifndef _DMAP_GST_INPUT_STREAM
-#define _DMAP_GST_INPUT_STREAM
+#ifndef _DMAP_GST_INPUT_STREAM_H
+#define _DMAP_GST_INPUT_STREAM_H
-#include <glib-object.h>
#include <gio/gio.h>
+#include <glib-object.h>
+#include <gst/app/gstappsink.h>
+#include <gst/gst.h>
+
G_BEGIN_DECLS
#define DMAP_TYPE_GST_INPUT_STREAM (dmap_gst_input_stream_get_type ())
@@ -70,10 +73,8 @@ enum
GInputStream *dmap_gst_input_stream_new (const gchar * transcode_mimetype,
GInputStream * src_stream);
-/* FIXME: this prototype was moved to the specific implementations in order to make this header file work
without GStreamer installed:
-void dmap_gst_input_stream_new_buffer_cb (GstElement *element,
- DmapGstInputStream *stream);
- */
+void dmap_gst_input_stream_new_buffer_cb(GstElement *element,
+ DmapGstInputStream *stream);
G_END_DECLS
-#endif /* _DMAP_GST_INPUT_STREAM */
+#endif /* _DMAP_GST_INPUT_STREAM_H */
diff --git a/libdmapsharing/dmap-gst-mp3-input-stream.c b/libdmapsharing/dmap-gst-mp3-input-stream.c
index d6f2b2a..86e3897 100644
--- a/libdmapsharing/dmap-gst-mp3-input-stream.c
+++ b/libdmapsharing/dmap-gst-mp3-input-stream.c
@@ -38,14 +38,10 @@ struct DmapGstMP3InputStreamPrivate
GstElement *sink;
};
-/* FIXME: See note in dmap-gst-input-stream.h */
-void dmap_gst_input_stream_new_buffer_cb (GstElement * element,
- DmapGstInputStream * stream);
-
static void
-pad_added_cb (GstElement * element,
- GstPad * pad,
- GstElement *convert)
+_pad_added_cb (GstElement * element,
+ GstPad * pad,
+ GstElement *convert)
{
/* Link remaining pad after decodebin2 does its magic. */
GstPad *conv_pad;
@@ -53,7 +49,7 @@ pad_added_cb (GstElement * element,
conv_pad = gst_element_get_static_pad (convert, "sink");
g_assert (conv_pad != NULL);
- if (pads_compatible (pad, conv_pad)) {
+ if (gst_util_pads_compatible (pad, conv_pad)) {
g_assert (!GST_PAD_IS_LINKED
(gst_element_get_static_pad
(convert, "sink")));
@@ -140,7 +136,7 @@ dmap_gst_mp3_input_stream_new (GInputStream * src_stream)
gst_app_sink_set_max_buffers (GST_APP_SINK (sink), GST_APP_MAX_BUFFERS);
gst_app_sink_set_drop (GST_APP_SINK (sink), FALSE);
- g_signal_connect (decode, "pad-added", G_CALLBACK (pad_added_cb), convert);
+ g_signal_connect (decode, "pad-added", G_CALLBACK (_pad_added_cb), convert);
/* FIXME: this technique is shared with dmapd-dmap-av-share.c */
sret = gst_element_set_state (pipeline, GST_STATE_PLAYING);
@@ -199,7 +195,7 @@ done:
}
static void
-dmap_gst_mp3_input_stream_kill_pipeline (DmapGstInputStream * stream)
+_kill_pipeline (DmapGstInputStream * stream)
{
DmapGstMP3InputStream *mp3_stream =
DMAP_GST_MP3_INPUT_STREAM (stream);
@@ -220,7 +216,7 @@ dmap_gst_mp3_input_stream_class_init (DmapGstMP3InputStreamClass * klass)
g_type_class_add_private (klass,
sizeof (DmapGstMP3InputStreamPrivate));
- parent_class->kill_pipeline = dmap_gst_mp3_input_stream_kill_pipeline;
+ parent_class->kill_pipeline = _kill_pipeline;
}
static void
diff --git a/libdmapsharing/dmap-gst-mp3-input-stream.h b/libdmapsharing/dmap-gst-mp3-input-stream.h
index 7222785..cb4c592 100644
--- a/libdmapsharing/dmap-gst-mp3-input-stream.h
+++ b/libdmapsharing/dmap-gst-mp3-input-stream.h
@@ -20,8 +20,8 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifndef _DMAP_GST_MP3_INPUT_STREAM
-#define _DMAP_GST_MP3_INPUT_STREAM
+#ifndef _DMAP_GST_MP3_INPUT_STREAM_H
+#define _DMAP_GST_MP3_INPUT_STREAM_H
#include <gio/gio.h>
@@ -63,4 +63,4 @@ GType dmap_gst_mp3_input_stream_get_type (void);
GInputStream *dmap_gst_mp3_input_stream_new (GInputStream * stream);
G_END_DECLS
-#endif /* _DMAP_GST_MP3_INPUT_STREAM */
+#endif
diff --git a/libdmapsharing/dmap-gst-qt-input-stream.c b/libdmapsharing/dmap-gst-qt-input-stream.c
index 809ec8b..f5950c2 100644
--- a/libdmapsharing/dmap-gst-qt-input-stream.c
+++ b/libdmapsharing/dmap-gst-qt-input-stream.c
@@ -39,14 +39,10 @@ struct DmapGstQtInputStreamPrivate
GstElement *sink;
};
-/* FIXME: See note in dmap-gst-input-stream.h */
-void dmap_gst_input_stream_new_buffer_cb (GstElement * element,
- DmapGstInputStream * stream);
-
static void
-pad_added_cb (GstElement * element,
- GstPad * pad,
- GstElement *convert)
+_pad_added_cb (GstElement * element,
+ GstPad * pad,
+ GstElement *convert)
{
/* Link remaining pad after decodebin2 does its magic. */
GstPad *conv_pad;
@@ -54,7 +50,7 @@ pad_added_cb (GstElement * element,
conv_pad = gst_element_get_static_pad (convert, "sink");
g_assert (conv_pad != NULL);
- if (pads_compatible (pad, conv_pad)) {
+ if (gst_util_pads_compatible (pad, conv_pad)) {
g_assert (!GST_PAD_IS_LINKED
(gst_element_get_static_pad
(convert, "sink")));
@@ -142,7 +138,7 @@ dmap_gst_qt_input_stream_new (GInputStream * src_stream)
gst_app_sink_set_max_buffers (GST_APP_SINK (sink), GST_APP_MAX_BUFFERS);
gst_app_sink_set_drop (GST_APP_SINK (sink), FALSE);
- g_signal_connect (decode, "pad-added", G_CALLBACK (pad_added_cb), convert);
+ g_signal_connect (decode, "pad-added", G_CALLBACK (_pad_added_cb), convert);
/* FIXME: this technique is shared with dmapd-dmap-av-share.c */
sret = gst_element_set_state (pipeline, GST_STATE_PLAYING);
@@ -206,7 +202,7 @@ done:
}
static void
-dmap_gst_qt_input_stream_kill_pipeline (DmapGstInputStream * stream)
+_kill_pipeline (DmapGstInputStream * stream)
{
DmapGstQtInputStream *qt_stream =
DMAP_GST_QT_INPUT_STREAM (stream);
@@ -231,7 +227,7 @@ dmap_gst_qt_input_stream_class_init (DmapGstQtInputStreamClass * klass)
g_type_class_add_private (klass,
sizeof (DmapGstQtInputStreamPrivate));
- parent_class->kill_pipeline = dmap_gst_qt_input_stream_kill_pipeline;
+ parent_class->kill_pipeline = _kill_pipeline;
}
static void
diff --git a/libdmapsharing/dmap-gst-qt-input-stream.h b/libdmapsharing/dmap-gst-qt-input-stream.h
index 6bde664..287ac1b 100644
--- a/libdmapsharing/dmap-gst-qt-input-stream.h
+++ b/libdmapsharing/dmap-gst-qt-input-stream.h
@@ -20,8 +20,8 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifndef _DMAP_GST_QT_INPUT_STREAM
-#define _DMAP_GST_QT_INPUT_STREAM
+#ifndef _DMAP_GST_QT_INPUT_STREAM_H
+#define _DMAP_GST_QT_INPUT_STREAM_H
#include <gio/gio.h>
@@ -63,4 +63,4 @@ GType dmap_gst_qt_input_stream_get_type (void);
GInputStream *dmap_gst_qt_input_stream_new (GInputStream * stream);
G_END_DECLS
-#endif /* _DMAP_GST_QT_INPUT_STREAM */
+#endif
diff --git a/libdmapsharing/dmap-gst-wav-input-stream.c b/libdmapsharing/dmap-gst-wav-input-stream.c
index 52e5566..930f466 100644
--- a/libdmapsharing/dmap-gst-wav-input-stream.c
+++ b/libdmapsharing/dmap-gst-wav-input-stream.c
@@ -39,14 +39,10 @@ struct DmapGstWavInputStreamPrivate
GstElement *sink;
};
-/* FIXME: See note in dmap-gst-input-stream.h */
-void dmap_gst_input_stream_new_buffer_cb (GstElement * element,
- DmapGstInputStream * stream);
-
static void
-pad_added_cb (GstElement * element,
- GstPad * pad,
- GstElement *convert)
+_pad_added_cb (GstElement * element,
+ GstPad * pad,
+ GstElement *convert)
{
/* Link remaining pad after decodebin2 does its magic. */
GstPad *conv_pad;
@@ -54,7 +50,7 @@ pad_added_cb (GstElement * element,
conv_pad = gst_element_get_static_pad (convert, "sink");
g_assert (conv_pad != NULL);
- if (pads_compatible (pad, conv_pad)) {
+ if (gst_util_pads_compatible (pad, conv_pad)) {
g_assert (!GST_PAD_IS_LINKED
(gst_element_get_static_pad
(convert, "sink")));
@@ -151,7 +147,7 @@ dmap_gst_wav_input_stream_new (GInputStream * src_stream)
gst_app_sink_set_max_buffers (GST_APP_SINK (sink), GST_APP_MAX_BUFFERS);
gst_app_sink_set_drop (GST_APP_SINK (sink), FALSE);
- g_signal_connect (decode, "pad-added", G_CALLBACK (pad_added_cb), convert);
+ g_signal_connect (decode, "pad-added", G_CALLBACK (_pad_added_cb), convert);
/* FIXME: this technique is shared with dmapd-dmap-av-share.c */
sret = gst_element_set_state (pipeline, GST_STATE_PLAYING);
@@ -215,7 +211,7 @@ done:
}
static void
-dmap_gst_wav_input_stream_kill_pipeline (DmapGstInputStream * stream)
+_kill_pipeline (DmapGstInputStream * stream)
{
DmapGstWavInputStream *wav_stream =
DMAP_GST_WAV_INPUT_STREAM (stream);
@@ -237,7 +233,7 @@ G_DEFINE_TYPE (DmapGstWavInputStream, dmap_gst_wav_input_stream,
g_type_class_add_private (klass,
sizeof (DmapGstWavInputStreamPrivate));
- parent_class->kill_pipeline = dmap_gst_wav_input_stream_kill_pipeline;
+ parent_class->kill_pipeline = _kill_pipeline;
}
static void
diff --git a/libdmapsharing/dmap-gst-wav-input-stream.h b/libdmapsharing/dmap-gst-wav-input-stream.h
index ab50f1b..9025f7e 100644
--- a/libdmapsharing/dmap-gst-wav-input-stream.h
+++ b/libdmapsharing/dmap-gst-wav-input-stream.h
@@ -20,8 +20,8 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifndef _DMAP_GST_WAV_INPUT_STREAM
-#define _DMAP_GST_WAV_INPUT_STREAM
+#ifndef _DMAP_GST_WAV_INPUT_STREAM_H
+#define _DMAP_GST_WAV_INPUT_STREAM_H
#include <gio/gio.h>
@@ -63,4 +63,4 @@ GType dmap_gst_wav_input_stream_get_type (void);
GInputStream *dmap_gst_wav_input_stream_new (GInputStream * stream);
G_END_DECLS
-#endif /* _DMAP_GST_WAV_INPUT_STREAM */
+#endif
diff --git a/libdmapsharing/dmap-md5.h b/libdmapsharing/dmap-md5.h
index ed8b346..5aacdb5 100644
--- a/libdmapsharing/dmap-md5.h
+++ b/libdmapsharing/dmap-md5.h
@@ -18,8 +18,8 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA*
*/
-#ifndef __DMAP_MD5_H__
-#define __DMAP_MD5_H__
+#ifndef _DMAP_MD5_H__
+#define _DMAP_MD5_H__
#include <glib.h>
diff --git a/libdmapsharing/dmap-mdns-browser-avahi.c b/libdmapsharing/dmap-mdns-browser-avahi.c
index d9b8b34..055f78b 100644
--- a/libdmapsharing/dmap-mdns-browser-avahi.c
+++ b/libdmapsharing/dmap-mdns-browser-avahi.c
@@ -233,8 +233,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,
@@ -465,9 +465,8 @@ dmap_mdns_browser_resolve (DmapMdnsBrowser * browser,
AVAHI_IF_UNSPEC,
AVAHI_PROTO_INET,
name,
- service_type_name
- [browser->
- priv->service_type],
+ _service_type_name
+ [browser->priv->service_type],
domain,
AVAHI_PROTO_UNSPEC,
#ifdef HAVE_AVAHI_0_6
diff --git a/libdmapsharing/dmap-mdns-browser-dnssd.c b/libdmapsharing/dmap-mdns-browser-dnssd.c
index bef8185..b56a9c5 100644
--- a/libdmapsharing/dmap-mdns-browser-dnssd.c
+++ b/libdmapsharing/dmap-mdns-browser-dnssd.c
@@ -58,7 +58,7 @@ enum
#define DMAP_MDNS_BROWSER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), DMAP_TYPE_MDNS_BROWSER,
DmapMdnsBrowserPrivate))
-static guint dmap_mdns_browser_signals[LAST_SIGNAL] = { 0, };
+static guint _signals[LAST_SIGNAL] = { 0, };
G_DEFINE_TYPE (DmapMdnsBrowser, dmap_mdns_browser, G_TYPE_OBJECT);
@@ -71,7 +71,7 @@ dmap_mdns_browser_init (DmapMdnsBrowser * browser)
}
static void
-service_context_free (ServiceContext *ctx)
+_service_context_free (ServiceContext *ctx)
{
g_assert (NULL != ctx);
g_assert (NULL != ctx->browser);
@@ -84,7 +84,7 @@ service_context_free (ServiceContext *ctx)
}
static gboolean
-signal_service_added (ServiceContext *context)
+_signal_service_added (ServiceContext *context)
{
g_assert (NULL != context);
@@ -129,13 +129,13 @@ signal_service_added (ServiceContext *context)
// notify all listeners
g_signal_emit (context->browser,
- dmap_mdns_browser_signals[SERVICE_ADDED], 0, service);
+ _signals[SERVICE_ADDED], 0, service);
return TRUE;
}
static char *
-extract_name (const char *dns_name)
+_extract_name (const char *dns_name)
{
/* Turns "Children's\032Music._daap._tcp.local
* into "Children's Music"
@@ -169,13 +169,13 @@ done:
}
static void
-dns_service_browse_reply (DNSServiceRef sd_ref,
- DNSServiceFlags flags,
- uint32_t interface_index,
- DNSServiceErrorType error_code,
- const char *service_name,
- const char *regtype,
- const char *domain, void *udata)
+_dns_service_browse_reply (DNSServiceRef sd_ref,
+ DNSServiceFlags flags,
+ uint32_t interface_index,
+ DNSServiceErrorType error_code,
+ const char *service_name,
+ const char *regtype,
+ const char *domain, void *udata)
{
if (error_code != kDNSServiceErr_NoError) {
g_warning ("dnsServiceBrowserReply (): fail");
@@ -203,19 +203,19 @@ done:
}
static void
-dns_host_resolve_reply (DNSServiceRef sd_ref,
- DNSServiceFlags flags,
- uint32_t interface_index,
- DNSServiceErrorType error_code,
- const char *hostname,
- const struct sockaddr *address,
- uint32_t ttl,
- void *udata)
+_dns_host_resolve_reply (DNSServiceRef sd_ref,
+ DNSServiceFlags flags,
+ uint32_t interface_index,
+ DNSServiceErrorType error_code,
+ const char *hostname,
+ const struct sockaddr *address,
+ uint32_t ttl,
+ void *udata)
{
ServiceContext *ctx = (ServiceContext *) udata;
if (error_code != kDNSServiceErr_NoError) {
- g_warning ("dns_host_resolve_reply (): fail");
+ g_warning ("_dns_host_resolve_reply (): fail");
return;
}
@@ -241,7 +241,7 @@ dns_host_resolve_reply (DNSServiceRef sd_ref,
}
static gboolean
-lookup_result_available_cb (GIOChannel * gio, GIOCondition condition,
+_lookup_result_available_cb (GIOChannel * gio, GIOCondition condition,
ServiceContext *context)
{
gboolean fnval = FALSE;
@@ -251,27 +251,27 @@ lookup_result_available_cb (GIOChannel * gio, GIOCondition condition,
goto done;
}
- /* Obtain IP address (dns_host_resolve_reply) */
+ /* Obtain IP address (_dns_host_resolve_reply) */
DNSServiceErrorType err = DNSServiceProcessResult (context->host_lookup_ref);
if (err != kDNSServiceErr_NoError) {
g_warning ("Error processing DNS-SD service result");
goto done;
}
- signal_service_added (context);
+ _signal_service_added (context);
done:
DNSServiceRefDeallocate (context->host_lookup_ref);
if (NULL != context) {
- service_context_free (context);
+ _service_context_free (context);
}
return fnval;
}
static gboolean
-add_host_lookup_to_event_loop (ServiceContext *context)
+_add_host_lookup_to_event_loop (ServiceContext *context)
{
int dns_sd_fd = DNSServiceRefSockFD (context->host_lookup_ref);
@@ -279,7 +279,7 @@ add_host_lookup_to_event_loop (ServiceContext *context)
if (!g_io_add_watch (dns_sd_chan,
G_IO_IN | G_IO_HUP | G_IO_ERR,
- (GIOFunc) lookup_result_available_cb, context)) {
+ (GIOFunc) _lookup_result_available_cb, context)) {
g_warning ("Error adding host lookup to event loop");
}
@@ -289,22 +289,22 @@ add_host_lookup_to_event_loop (ServiceContext *context)
}
static void
-dns_service_resolve_reply (DNSServiceRef sd_ref,
- DNSServiceFlags flags,
- uint32_t interface_index,
- DNSServiceErrorType error_code,
- const char *name,
- const char *host,
- uint16_t port,
- uint16_t txt_len,
- const char *txt_record,
- void *udata)
+_dns_service_resolve_reply (DNSServiceRef sd_ref,
+ DNSServiceFlags flags,
+ uint32_t interface_index,
+ DNSServiceErrorType error_code,
+ const char *name,
+ const char *host,
+ uint16_t port,
+ uint16_t txt_len,
+ const char *txt_record,
+ void *udata)
{
DNSServiceRef ref;
ServiceContext *ctx = (ServiceContext *) udata;
if (error_code != kDNSServiceErr_NoError) {
- g_warning ("dns_service_resolve_reply (): fail");
+ g_warning ("_dns_service_resolve_reply (): fail");
return;
}
@@ -312,7 +312,7 @@ dns_service_resolve_reply (DNSServiceRef sd_ref,
ctx->interface_index = interface_index;
g_object_set(ctx->service,
"port", htons(port),
- "name", extract_name (name),
+ "name", _extract_name (name),
"pair", NULL,
"password-protected", FALSE,
NULL);
@@ -324,22 +324,22 @@ dns_service_resolve_reply (DNSServiceRef sd_ref,
ctx->interface_index,
kDNSServiceProtocol_IPv4,
host,
- (DNSServiceGetAddrInfoReply) dns_host_resolve_reply,
+ (DNSServiceGetAddrInfoReply) _dns_host_resolve_reply,
(void *) ctx);
if (err != kDNSServiceErr_NoError) {
g_warning ("Error setting up DNS-SD address info handler");
- service_context_free (ctx);
+ _service_context_free (ctx);
}
*/
ctx->host_lookup_ref = ref;
- add_host_lookup_to_event_loop (ctx);
+ _add_host_lookup_to_event_loop (ctx);
}
static gboolean
-service_result_available_cb (GIOChannel * gio, GIOCondition condition,
- ServiceContext *context)
+_service_result_available_cb (GIOChannel * gio, GIOCondition condition,
+ ServiceContext *context)
{
gboolean fnval = FALSE;
@@ -348,7 +348,7 @@ service_result_available_cb (GIOChannel * gio, GIOCondition condition,
goto done;
}
- /* Obtain service description (dns_service_resolve_reply) */
+ /* Obtain service description (_dns_service_resolve_reply) */
DNSServiceErrorType err = DNSServiceProcessResult (context->service_discovery_ref);
if (err != kDNSServiceErr_NoError) {
g_warning ("Error processing DNS-SD service result");
@@ -362,7 +362,7 @@ done:
}
static gboolean
-add_service_discovery_to_event_loop (ServiceContext *context)
+_add_service_discovery_to_event_loop (ServiceContext *context)
{
int dns_sd_fd = DNSServiceRefSockFD (context->service_discovery_ref);
@@ -370,7 +370,7 @@ add_service_discovery_to_event_loop (ServiceContext *context)
if (!g_io_add_watch (dns_sd_chan,
G_IO_IN | G_IO_HUP | G_IO_ERR,
- (GIOFunc) service_result_available_cb, context)) {
+ (GIOFunc) _service_result_available_cb, context)) {
g_warning ("Error adding SD to event loop");
}
@@ -380,8 +380,8 @@ add_service_discovery_to_event_loop (ServiceContext *context)
}
static gboolean
-browse_result_available_cb (GIOChannel * gio,
- GIOCondition condition, DmapMdnsBrowser * browser)
+_browse_result_available_cb (GIOChannel * gio,
+ GIOCondition condition, DmapMdnsBrowser * browser)
{
gboolean fnval = FALSE;
@@ -407,21 +407,21 @@ browse_result_available_cb (GIOChannel * gio,
ctx->flags,
ctx->interface_index,
service_name,
- service_type_name[browser->priv->service_type],
+ _service_type_name[browser->priv->service_type],
ctx->domain,
(DNSServiceResolveReply)
- dns_service_resolve_reply,
+ _dns_service_resolve_reply,
(void *) ctx);
if (err != kDNSServiceErr_NoError) {
g_warning ("Error setting up DNS-SD resolve handler");
- service_context_free (ctx);
+ _service_context_free (ctx);
continue;
}
ctx->service_discovery_ref = ref;
- add_service_discovery_to_event_loop (ctx);
+ _add_service_discovery_to_event_loop (ctx);
browser->priv->backlog = g_slist_delete_link (browser->priv->backlog, browser->priv->backlog);
@@ -433,7 +433,7 @@ done:
}
static gboolean
-add_browse_to_event_loop (DmapMdnsBrowser *browser)
+_add_browse_to_event_loop (DmapMdnsBrowser *browser)
{
gboolean fnval = FALSE;
@@ -443,7 +443,7 @@ add_browse_to_event_loop (DmapMdnsBrowser *browser)
if (!g_io_add_watch (dns_sd_chan,
G_IO_IN | G_IO_HUP | G_IO_ERR,
- (GIOFunc) browse_result_available_cb, browser)) {
+ (GIOFunc) _browse_result_available_cb, browser)) {
g_warning ("Error adding SD to event loop");
goto done;
}
@@ -457,7 +457,7 @@ done:
}
static void
-dmap_mdns_browser_dispose (GObject * object)
+_dispose (GObject * object)
{
DmapMdnsBrowser *browser = DMAP_MDNS_BROWSER (object);
GSList *walk;
@@ -474,7 +474,7 @@ dmap_mdns_browser_dispose (GObject * object)
}
static void
-dmap_mdns_browser_finalize (GObject * object)
+_finalize (GObject * object)
{
g_signal_handlers_destroy (object);
G_OBJECT_CLASS (dmap_mdns_browser_parent_class)->finalize (object);
@@ -487,13 +487,13 @@ dmap_mdns_browser_class_init (DmapMdnsBrowserClass * klass)
dmap_mdns_browser_parent_class = g_type_class_peek_parent (klass);
- object_class->dispose = dmap_mdns_browser_dispose;
- object_class->finalize = dmap_mdns_browser_finalize;
+ object_class->dispose = _dispose;
+ object_class->finalize = _finalize;
g_type_class_add_private (klass, sizeof (DmapMdnsBrowserPrivate));
// Signal makeup
- dmap_mdns_browser_signals[SERVICE_ADDED] =
+ _signals[SERVICE_ADDED] =
g_signal_new ("service-added",
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST,
@@ -502,7 +502,7 @@ dmap_mdns_browser_class_init (DmapMdnsBrowserClass * klass)
g_cclosure_marshal_VOID__POINTER, G_TYPE_NONE,
1, DMAP_TYPE_MDNS_SERVICE);
- dmap_mdns_browser_signals[SERVICE_REMOVED] =
+ _signals[SERVICE_REMOVED] =
g_signal_new ("service-removed",
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST,
@@ -517,9 +517,8 @@ dmap_mdns_browser_new (DmapMdnsServiceType type)
{
DmapMdnsBrowser *browser_object = 0;
- g_return_val_if_fail (type >= DMAP_MDNS_SERVICE_TYPE_INVALID
- && type <= DMAP_MDNS_SERVICE_TYPE_LAST,
- NULL);
+ g_assert(type > DMAP_MDNS_SERVICE_TYPE_INVALID);
+ g_assert(type <= DMAP_MDNS_SERVICE_TYPE_LAST);
browser_object = DMAP_MDNS_BROWSER (g_object_new
(DMAP_TYPE_MDNS_BROWSER,
@@ -540,14 +539,14 @@ dmap_mdns_browser_start (DmapMdnsBrowser * browser, GError ** error)
browse_err = DNSServiceBrowse (&(browser->priv->sd_browse_ref),
0,
kDNSServiceInterfaceIndexAny,
- service_type_name[browser->priv->service_type],
+ _service_type_name[browser->priv->service_type],
"",
- (DNSServiceBrowseReply) dns_service_browse_reply,
+ (DNSServiceBrowseReply) _dns_service_browse_reply,
(void *) browser);
if (kDNSServiceErr_NoError == browse_err) {
fnval = TRUE;
- add_browse_to_event_loop (browser);
+ _add_browse_to_event_loop (browser);
} else {
g_warning ("Error starting mDNS discovery using DNS-SD");
g_set_error (error,
@@ -586,7 +585,7 @@ dmap_mdns_browser_error_quark (void)
G_CONST_RETURN GSList *
dmap_mdns_browser_get_services (DmapMdnsBrowser * browser)
{
- g_return_val_if_fail (browser != NULL, NULL);
+ g_assert(NULL != browser);
return browser->priv->services;
}
@@ -594,8 +593,7 @@ dmap_mdns_browser_get_services (DmapMdnsBrowser * browser)
DmapMdnsServiceType
dmap_mdns_browser_get_service_type (DmapMdnsBrowser * browser)
{
- g_return_val_if_fail (browser != NULL,
- DMAP_MDNS_SERVICE_TYPE_INVALID);
+ g_assert(NULL != browser);
return browser->priv->service_type;
}
diff --git a/libdmapsharing/dmap-mdns-publisher-dnssd.c b/libdmapsharing/dmap-mdns-publisher-dnssd.c
index 0577837..27ab366 100644
--- a/libdmapsharing/dmap-mdns-publisher-dnssd.c
+++ b/libdmapsharing/dmap-mdns-publisher-dnssd.c
@@ -40,17 +40,18 @@ enum {
LAST_SIGNAL
};
-static guint signals [LAST_SIGNAL] = { 0, };
+static guint _signals[LAST_SIGNAL] = { 0, };
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)
{ static GQuark quark = 0;
- if (!quark)
+ if (!quark) {
quark = g_quark_from_static_string ("dmap_mdns_publisher_error");
+ }
return quark;
}
@@ -145,13 +146,13 @@ dmap_mdns_publisher_publish (DmapMdnsPublisher *publisher,
"%s: %d",
"Error publishing via DNSSD", dns_err);
if (dns_err == kDNSServiceErr_NameConflict) {
- g_signal_emit (publisher, signals[NAME_COLLISION], 0, publisher->priv->name);
+ g_signal_emit (publisher, _signals[NAME_COLLISION], 0, publisher->priv->name);
}
fnval = FALSE;
goto done;
}
- g_signal_emit (publisher, signals[PUBLISHED], 0, publisher->priv->name);
+ g_signal_emit (publisher, _signals[PUBLISHED], 0, publisher->priv->name);
done:
g_free(txt_record);
@@ -170,10 +171,10 @@ dmap_mdns_publisher_withdraw (DmapMdnsPublisher *publisher,
}
static void
-dmap_mdns_publisher_set_property (GObject *object,
- guint prop_id,
- const GValue *value,
- GParamSpec *pspec)
+_set_property (GObject *object,
+ guint prop_id,
+ const GValue *value,
+ GParamSpec *pspec)
{
switch (prop_id) {
default:
@@ -183,10 +184,10 @@ dmap_mdns_publisher_set_property (GObject *object,
}
static void
-dmap_mdns_publisher_get_property (GObject *object,
- guint prop_id,
- GValue *value,
- GParamSpec *pspec)
+_get_property (GObject *object,
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec)
{
switch (prop_id) {
default:
@@ -196,12 +197,12 @@ dmap_mdns_publisher_get_property (GObject *object,
}
static void
-dmap_mdns_publisher_finalize (GObject *object)
+_finalize (GObject *object)
{
DmapMdnsPublisher *publisher;
- g_return_if_fail (object != NULL);
- g_return_if_fail (IS_DMAP_MDNS_PUBLISHER (object));
+ g_assert(NULL != object);
+ g_assert(IS_DMAP_MDNS_PUBLISHER(object));
publisher = DMAP_MDNS_PUBLISHER (object);
@@ -217,11 +218,11 @@ dmap_mdns_publisher_class_init (DmapMdnsPublisherClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- object_class->finalize = dmap_mdns_publisher_finalize;
- object_class->get_property = dmap_mdns_publisher_get_property;
- object_class->set_property = dmap_mdns_publisher_set_property;
+ object_class->finalize = _finalize;
+ object_class->get_property = _get_property;
+ object_class->set_property = _set_property;
- signals [PUBLISHED] =
+ _signals [PUBLISHED] =
g_signal_new ("published",
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST,
@@ -231,7 +232,7 @@ dmap_mdns_publisher_class_init (DmapMdnsPublisherClass *klass)
g_cclosure_marshal_VOID__STRING,
G_TYPE_NONE,
1, G_TYPE_STRING);
- signals [NAME_COLLISION] =
+ _signals [NAME_COLLISION] =
g_signal_new ("name-collision",
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST,
@@ -254,13 +255,13 @@ dmap_mdns_publisher_init (DmapMdnsPublisher *publisher)
DmapMdnsPublisher *
dmap_mdns_publisher_new (void)
{
- if (publisher_object) {
- g_object_ref (publisher_object);
+ if (_publisher_object) {
+ g_object_ref (_publisher_object);
} else {
- publisher_object = g_object_new (DMAP_TYPE_MDNS_PUBLISHER, NULL);
- g_object_add_weak_pointer (publisher_object,
- (gpointer *) &publisher_object);
+ _publisher_object = g_object_new (DMAP_TYPE_MDNS_PUBLISHER, NULL);
+ g_object_add_weak_pointer (_publisher_object,
+ (gpointer *) &_publisher_object);
}
- return DMAP_MDNS_PUBLISHER (publisher_object);
+ return DMAP_MDNS_PUBLISHER (_publisher_object);
}
diff --git a/libdmapsharing/dmap-mdns-service.h b/libdmapsharing/dmap-mdns-service.h
index 884ad93..a2c0da6 100644
--- a/libdmapsharing/dmap-mdns-service.h
+++ b/libdmapsharing/dmap-mdns-service.h
@@ -103,7 +103,7 @@ typedef enum
DMAP_MDNS_SERVICE_TRANSPORT_PROTOCOL_LAST = DMAP_MDNS_SERVICE_TRANSPORT_PROTOCOL_UDP
} DmapMdnsServiceTransportProtocol;
-static const char * const service_type_name[] = {
+static const char * const _service_type_name[] = {
NULL,
"_daap._tcp",
"_dpap._tcp",
diff --git a/libdmapsharing/dmap-private-utils.h b/libdmapsharing/dmap-private-utils.h
index 233877e..646e84e 100644
--- a/libdmapsharing/dmap-private-utils.h
+++ b/libdmapsharing/dmap-private-utils.h
@@ -17,8 +17,8 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA*
*/
-#ifndef __DMAP_PRIVATE_UTILS_H__
-#define __DMAP_PRIVATE_UTILS_H__
+#ifndef _DMAP_PRIVATE_UTILS_H
+#define _DMAP_PRIVATE_UTILS_H
#include <glib.h>
#include <libsoup/soup.h>
diff --git a/libdmapsharing/dmap-structure.h b/libdmapsharing/dmap-structure.h
index 87bb1ce..163dcd4 100644
--- a/libdmapsharing/dmap-structure.h
+++ b/libdmapsharing/dmap-structure.h
@@ -18,8 +18,8 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA*
*/
-#ifndef __DMAP_STRUCTURE_H__
-#define __DMAP_STRUCTURE_H__
+#ifndef _DMAP_STRUCTURE_H
+#define _DMAP_STRUCTURE_H
#include <glib.h>
#include <glib-object.h>
@@ -75,11 +75,6 @@ struct _DmapContentCodeDefinition
const DmapContentCodeDefinition * dmap_structure_content_codes (guint * number);
gint32 dmap_structure_cc_string_as_int32 (const gchar * str);
-const gchar *dmap_content_code_name (DmapContentCode code);
-DmapType dmap_content_code_dmap_type (DmapContentCode code);
-const gchar *dmap_content_code_string (DmapContentCode code);
-
-DmapContentCode dmap_content_code_read_from_buffer (const gchar * buf);
G_END_DECLS
#endif
diff --git a/libdmapsharing/gst-util.c b/libdmapsharing/gst-util.c
index a36be09..9cd911d 100644
--- a/libdmapsharing/gst-util.c
+++ b/libdmapsharing/gst-util.c
@@ -24,7 +24,7 @@
#include "dmap-gst-input-stream.h"
gboolean
-pads_compatible (GstPad * pad1, GstPad * pad2)
+gst_util_pads_compatible (GstPad * pad1, GstPad * pad2)
{
gboolean fnval;
GstCaps *res, *caps1, *caps2;
diff --git a/libdmapsharing/gst-util.h b/libdmapsharing/gst-util.h
index e11bc4b..1f2d26d 100644
--- a/libdmapsharing/gst-util.h
+++ b/libdmapsharing/gst-util.h
@@ -18,13 +18,13 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifndef _GST_UTIL
-#define _GST_UTIL
+#ifndef _GST_UTIL_H
+#define _GST_UTIL_H
#include <gst/gst.h>
-gboolean pads_compatible (GstPad * pad1, GstPad * pad2);
+gboolean gst_util_pads_compatible (GstPad * pad1, GstPad * pad2);
-#endif /* _GST_UTIL */
+#endif
G_END_DECLS
diff --git a/libdmapsharing/test-dmap-av-record-factory.h b/libdmapsharing/test-dmap-av-record-factory.h
index 1bb7796..62faa77 100644
--- a/libdmapsharing/test-dmap-av-record-factory.h
+++ b/libdmapsharing/test-dmap-av-record-factory.h
@@ -18,8 +18,8 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifndef _TEST_DMAP_AV_RECORD_FACTORY
-#define _TEST_DMAP_AV_RECORD_FACTORY
+#ifndef _TEST_DMAP_AV_RECORD_FACTORY_H
+#define _TEST_DMAP_AV_RECORD_FACTORY_H
#include <libdmapsharing/dmap.h>
@@ -53,6 +53,6 @@ TestDmapAvRecordFactory *test_dmap_av_record_factory_new (void);
DmapRecord *test_dmap_av_record_factory_create (DmapRecordFactory *factory, gpointer user_data);
-#endif /* _TEST_DMAP_AV_RECORD_FACTORY */
-
G_END_DECLS
+
+#endif
diff --git a/libdmapsharing/test-dmap-av-record.h b/libdmapsharing/test-dmap-av-record.h
index 0ec794b..093cf1b 100644
--- a/libdmapsharing/test-dmap-av-record.h
+++ b/libdmapsharing/test-dmap-av-record.h
@@ -18,8 +18,8 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifndef _TEST_DMAP_AV_RECORD
-#define _TEST_DMAP_AV_RECORD
+#ifndef _TEST_DMAP_AV_RECORD_H
+#define _TEST_DMAP_AV_RECORD_H
#include <libdmapsharing/dmap.h>
@@ -59,6 +59,6 @@ TestDmapAvRecord *test_dmap_av_record_new (void);
GInputStream *test_dmap_av_record_read (DmapAvRecord *record, GError **err);
-#endif /* _TEST_DMAP_AV_RECORD */
-
G_END_DECLS
+
+#endif
diff --git a/libdmapsharing/test-dmap-container-db.h b/libdmapsharing/test-dmap-container-db.h
index 1cce76c..82bfba1 100644
--- a/libdmapsharing/test-dmap-container-db.h
+++ b/libdmapsharing/test-dmap-container-db.h
@@ -18,8 +18,8 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifndef _TEST_DMAP_CONTAINER_DB
-#define _TEST_DMAP_CONTAINER_DB
+#ifndef _TEST_DMAP_CONTAINER_DB_H
+#define _TEST_DMAP_CONTAINER_DB_H
#include <libdmapsharing/dmap.h>
@@ -51,6 +51,6 @@ TestDmapContainerDb *test_dmap_container_db_new (DmapContainerRecord
GType test_dmap_container_db_get_type (void);
-#endif /* _TEST_DMAP_CONTAINER_DB */
-
G_END_DECLS
+
+#endif
diff --git a/libdmapsharing/test-dmap-container-record.h b/libdmapsharing/test-dmap-container-record.h
index 1f7fc7a..7f2cbb9 100644
--- a/libdmapsharing/test-dmap-container-record.h
+++ b/libdmapsharing/test-dmap-container-record.h
@@ -18,8 +18,8 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifndef _TEST_DMAP_CONTAINER_RECORD
-#define _TEST_DMAP_CONTAINER_RECORD
+#ifndef _TEST_DMAP_CONTAINER_RECORD_H
+#define _TEST_DMAP_CONTAINER_RECORD_H
#include <libdmapsharing/dmap.h>
#include <libdmapsharing/test-dmap-db.h>
@@ -56,6 +56,6 @@ TestDmapContainerRecord *test_dmap_container_record_new (void);
guint test_dmap_container_record_get_id (DmapContainerRecord *record);
-#endif /* _TEST_DMAP_CONTAINER_RECORD */
-
G_END_DECLS
+
+#endif
diff --git a/libdmapsharing/test-dmap-db.h b/libdmapsharing/test-dmap-db.h
index cbe944d..404bd29 100644
--- a/libdmapsharing/test-dmap-db.h
+++ b/libdmapsharing/test-dmap-db.h
@@ -18,8 +18,8 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifndef _TEST_DMAP_DB
-#define _TEST_DMAP_DB
+#ifndef _TEST_DMAP_DB_H
+#define _TEST_DMAP_DB_H
#include <libdmapsharing/dmap.h>
@@ -54,6 +54,7 @@ typedef struct {
TestDmapDb *test_dmap_db_new (void);
GType test_dmap_db_get_type (void);
-#endif /* _TEST_DMAP_DB */
-
G_END_DECLS
+
+#endif
+
diff --git a/libdmapsharing/test-dmap-image-record-factory.h b/libdmapsharing/test-dmap-image-record-factory.h
index 32303c3..98fb927 100644
--- a/libdmapsharing/test-dmap-image-record-factory.h
+++ b/libdmapsharing/test-dmap-image-record-factory.h
@@ -18,8 +18,8 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifndef _TEST_DMAP_IMAGE_RECORD_FACTORY
-#define _TEST_DMAP_IMAGE_RECORD_FACTORY
+#ifndef _TEST_DMAP_IMAGE_RECORD_FACTORY_H
+#define _TEST_DMAP_IMAGE_RECORD_FACTORY_H
#include <libdmapsharing/dmap.h>
@@ -53,6 +53,6 @@ TestDmapImageRecordFactory *test_dmap_image_record_factory_new (void);
DmapRecord *test_dmap_image_record_factory_create (DmapRecordFactory *factory, gpointer
user_data);
-#endif /* _TEST_DMAP_IMAGE_RECORD_FACTORY */
-
G_END_DECLS
+
+#endif
diff --git a/libdmapsharing/test-dmap-image-record.h b/libdmapsharing/test-dmap-image-record.h
index 3950bf2..b6a31dd 100644
--- a/libdmapsharing/test-dmap-image-record.h
+++ b/libdmapsharing/test-dmap-image-record.h
@@ -18,8 +18,8 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifndef _TEST_DMAP_IMAGE_RECORD
-#define _TEST_DMAP_IMAGE_RECORD
+#ifndef _TEST_DMAP_IMAGE_RECORD_H
+#define _TEST_DMAP_IMAGE_RECORD_H
#include <libdmapsharing/dmap.h>
@@ -60,6 +60,6 @@ TestDmapImageRecord *test_dmap_image_record_new (void);
GInputStream *test_dmap_image_record_read (DmapImageRecord *record,
GError **err);
-#endif /* _TEST_DMAP_IMAGE_RECORD */
-
G_END_DECLS
+
+#endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]