[libdmapsharing] Small changes to fix warnings from g-ir-scanner
- From: W. Michael Petullo <wmpetullo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libdmapsharing] Small changes to fix warnings from g-ir-scanner
- Date: Sun, 4 Feb 2018 02:01:11 +0000 (UTC)
commit 234d65ac1b21375d9e11ffed5bc327618fc405d5
Author: W. Michael Petullo <mike flyn org>
Date: Sat Feb 3 21:00:57 2018 -0500
Small changes to fix warnings from g-ir-scanner
Signed-off-by: W. Michael Petullo <mike flyn org>
doc/libdmapsharing-4.0-docs.xml | 43 ++++++++++++++++++-----------
libdmapsharing/Makefile.am | 3 +-
libdmapsharing/dmap-av-record.h | 2 +-
libdmapsharing/dmap-av-share.c | 2 +-
libdmapsharing/dmap-connection-private.h | 5 +++
libdmapsharing/dmap-connection.c | 2 +-
libdmapsharing/dmap-connection.h | 36 ++++++++++++++----------
libdmapsharing/dmap-control-player.c | 8 +++---
libdmapsharing/dmap-control-player.h | 26 +++++++++--------
libdmapsharing/dmap-control-share.c | 5 ++-
libdmapsharing/dmap-db.h | 7 +++++
libdmapsharing/dmap-gst-input-stream.c | 22 ---------------
libdmapsharing/dmap-gst-input-stream.h | 4 +--
libdmapsharing/dmap-image-record.h | 2 +-
libdmapsharing/dmap-image-share.c | 2 +-
libdmapsharing/dmap-mdns-browser.h | 6 ++++
libdmapsharing/dmap-record.h | 8 ++---
libdmapsharing/dmap-share.c | 26 +++++++++---------
libdmapsharing/dmap-share.h | 18 +++++++++---
19 files changed, 124 insertions(+), 103 deletions(-)
---
diff --git a/doc/libdmapsharing-4.0-docs.xml b/doc/libdmapsharing-4.0-docs.xml
index 3005483..a4c88f7 100644
--- a/doc/libdmapsharing-4.0-docs.xml
+++ b/doc/libdmapsharing-4.0-docs.xml
@@ -3,45 +3,57 @@
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"
[
<!ENTITY % local.common.attrib "xmlns:xi CDATA #FIXED 'http://www.w3.org/2003/XInclude'">
+ <!ENTITY % gtkdocentities SYSTEM "xml/gtkdocentities.ent">
+ %gtkdocentities;
]>
<book id="index">
<bookinfo>
- <title>libdmapsharing-4.0 Reference Manual</title>
+ <title>&package_name; Reference Manual</title>
<releaseinfo>
- for libdmapsharing 3.9.0.
- The latest version of this documentation can be found online at
- <ulink role="online-location"
url="https://www.flyn.org/projects/libdmapsharing/doc/">https://www.flyn.org/projects/libdmapsharing/doc/</ulink>.
+ for &package_string;.
+ The latest version of this documentation can be found on-line at
+ <ulink role="online-location"
url="http://[SERVER]/&package_name;/index.html">http://[SERVER]/&package_name;/</ulink>.
</releaseinfo>
</bookinfo>
<chapter>
- <title>Libdmapsharing overview</title>
- <xi:include href="xml/daap-connection.xml"/>
- <xi:include href="xml/daap-record.xml"/>
- <xi:include href="xml/daap-share.xml"/>
- <xi:include href="xml/dacp-connection.xml"/>
- <xi:include href="xml/dacp-player.xml"/>
- <xi:include href="xml/dacp-share.xml"/>
+ <title>[Insert title here]</title>
+ <xi:include href="xml/dmap-av-connection.xml"/>
+ <xi:include href="xml/dmap-av-record.xml"/>
+ <xi:include href="xml/dmap-av-share.xml"/>
<xi:include href="xml/dmap-connection.xml"/>
<xi:include href="xml/dmap-container-db.xml"/>
<xi:include href="xml/dmap-container-record.xml"/>
+ <xi:include href="xml/dmap-control-connection.xml"/>
+ <xi:include href="xml/dmap-control-player.xml"/>
+ <xi:include href="xml/dmap-control-share.xml"/>
<xi:include href="xml/dmap-db.xml"/>
<xi:include href="xml/dmap-enums.xml"/>
<xi:include href="xml/dmap-gst-input-stream.xml"/>
<xi:include href="xml/dmap-gst-mp3-input-stream.xml"/>
+ <xi:include href="xml/dmap-gst-qt-input-stream.xml"/>
<xi:include href="xml/dmap-gst-wav-input-stream.xml"/>
+ <xi:include href="xml/dmap-image-connection.xml"/>
+ <xi:include href="xml/dmap-image-record.xml"/>
+ <xi:include href="xml/dmap-image-share.xml"/>
<xi:include href="xml/dmap-mdns-browser.xml"/>
+ <xi:include href="xml/dmap-mdns-service.xml"/>
+ <xi:include href="xml/dmap-private-utils.xml"/>
<xi:include href="xml/dmap-record.xml"/>
<xi:include href="xml/dmap-record-factory.xml"/>
<xi:include href="xml/dmap-share.xml"/>
- <xi:include href="xml/dpap-connection.xml"/>
- <xi:include href="xml/dpap-record.xml"/>
- <xi:include href="xml/dpap-share.xml"/>
+ <xi:include href="xml/test-dmap-av-record.xml"/>
+ <xi:include href="xml/test-dmap-av-record-factory.xml"/>
+ <xi:include href="xml/test-dmap-container-db.xml"/>
+ <xi:include href="xml/test-dmap-container-record.xml"/>
+ <xi:include href="xml/test-dmap-db.xml"/>
+ <xi:include href="xml/test-dmap-image-record.xml"/>
+ <xi:include href="xml/test-dmap-image-record-factory.xml"/>
</chapter>
<chapter id="object-tree">
<title>Object Hierarchy</title>
- <xi:include href="xml/tree_index.sgml"/>
+ <xi:include href="xml/tree_index.sgml"/>
</chapter>
<index id="api-index-full">
<title>API Index</title>
@@ -51,6 +63,5 @@
<title>Index of deprecated API</title>
<xi:include href="xml/api-index-deprecated.xml"><xi:fallback /></xi:include>
</index>
-
<xi:include href="xml/annotation-glossary.xml"><xi:fallback /></xi:include>
</book>
diff --git a/libdmapsharing/Makefile.am b/libdmapsharing/Makefile.am
index efd6f90..7e2bb3e 100644
--- a/libdmapsharing/Makefile.am
+++ b/libdmapsharing/Makefile.am
@@ -105,7 +105,6 @@ libdmapsharinginclude_HEADERS = \
dmap-record.h \
dmap-record-factory.h \
dmap-share.h \
- dmap-structure.h \
dmap-utils.h \
dmap-image-connection.h \
dmap-image-record.h \
@@ -113,12 +112,14 @@ libdmapsharinginclude_HEADERS = \
noinst_HEADERS = \
dmap-config.h \
+ dmap-connection-private.h \
dmap-gst-mp3-input-stream.h \
dmap-gst-qt-input-stream.h \
dmap-gst-wav-input-stream.h \
dmap-marshal.h \
dmap-mdns-avahi.h \
dmap-private-utils.h \
+ dmap-structure.h \
gst-util.h \
test-dmap-av-record-factory.h \
test-dmap-av-record.h \
diff --git a/libdmapsharing/dmap-av-record.h b/libdmapsharing/dmap-av-record.h
index 596e8c9..44c8ea1 100644
--- a/libdmapsharing/dmap-av-record.h
+++ b/libdmapsharing/dmap-av-record.h
@@ -88,7 +88,7 @@ gboolean dmap_av_record_itunes_compat (DmapAvRecord * record);
* @record: a DmapAvRecord.
* @err: a GError.
*
- * Returns: A GInputStream that provides read-only access to the data stream
+ * Returns: (transfer full): A GInputStream that provides read-only access to the data stream
* associated with record.
*/
GInputStream *dmap_av_record_read (DmapAvRecord * record, GError ** err);
diff --git a/libdmapsharing/dmap-av-share.c b/libdmapsharing/dmap-av-share.c
index bfbf3cf..0d1737c 100644
--- a/libdmapsharing/dmap-av-share.c
+++ b/libdmapsharing/dmap-av-share.c
@@ -482,7 +482,7 @@ add_entry_to_mlcl (guint id, DmapRecord * record, gpointer _mb)
{
GNode *mlit;
gboolean has_video = 0;
- struct MLCL_Bits *mb = (struct MLCL_Bits *) _mb;
+ struct DmapMlclBits *mb = (struct DmapMlclBits *) _mb;
mlit = dmap_structure_add (mb->mlcl, DMAP_CC_MLIT);
g_object_get (record, "has-video", &has_video, NULL);
diff --git a/libdmapsharing/dmap-connection-private.h b/libdmapsharing/dmap-connection-private.h
new file mode 100644
index 0000000..e5e3f0d
--- /dev/null
+++ b/libdmapsharing/dmap-connection-private.h
@@ -0,0 +1,5 @@
+gboolean dmap_connection_get (DmapConnection * self,
+ const gchar * path,
+ gboolean need_hash,
+ DmapResponseHandler handler,
+ gpointer user_data);
diff --git a/libdmapsharing/dmap-connection.c b/libdmapsharing/dmap-connection.c
index c0dfa6d..b936cf5 100644
--- a/libdmapsharing/dmap-connection.c
+++ b/libdmapsharing/dmap-connection.c
@@ -510,7 +510,7 @@ connection_operation_done (DmapConnection * connection)
// FIXME: GDK_THREADS_LEAVE ();
}
-SoupMessage *
+static SoupMessage *
dmap_connection_build_message (DmapConnection * connection,
const char *path,
gboolean need_hash,
diff --git a/libdmapsharing/dmap-connection.h b/libdmapsharing/dmap-connection.h
index 1475091..9df7bd2 100644
--- a/libdmapsharing/dmap-connection.h
+++ b/libdmapsharing/dmap-connection.h
@@ -29,7 +29,9 @@
#include <libdmapsharing/dmap-db.h>
#include <libdmapsharing/dmap-record-factory.h>
-G_BEGIN_DECLS typedef struct
+G_BEGIN_DECLS
+
+typedef struct
{
char *name;
int id;
@@ -160,6 +162,15 @@ void dmap_connection_setup (DmapConnection * connection);
void dmap_connection_start (DmapConnection * connection,
DmapConnectionFunc callback,
gpointer user_data);
+
+/**
+ * dmap_connection_disconnect:
+ * @connection: The connection.
+ * @callback: (scope async): The function to call once the connection is complete.
+ * @user_data: The data to pass to the callback.
+ *
+ * Disconnect from the remote DMAP share.
+ */
void dmap_connection_disconnect (DmapConnection * connection,
DmapConnectionFunc callback,
gpointer user_data);
@@ -167,14 +178,16 @@ void dmap_connection_disconnect (DmapConnection * connection,
SoupMessageHeaders *dmap_connection_get_headers (DmapConnection * connection,
const char *uri);
+/**
+ * dmap_connection_get_playlists:
+ * @connection: A #DmapConnection
+ *
+ * Get the playlists associated with a #DmapConnection instance.
+ *
+ * Returns: (element-type DmapPlaylist) (transfer none): pointer to a list of playlists.
+ */
GSList *dmap_connection_get_playlists (DmapConnection * connection);
-SoupMessage *dmap_connection_build_message (DmapConnection * connection,
- const gchar * path,
- gboolean need_hash,
- gdouble version,
- gint req_id, gboolean send_close);
-
/**
* dmap_connection_authenticate_message:
* @connection: A #DmapConnection
@@ -182,7 +195,7 @@ SoupMessage *dmap_connection_build_message (DmapConnection * connection,
* @message: A #SoupMessage
* @auth: A #SoupAuth
* @password: A password
- *
+ *
* Attach an authentication credential to a request. This
* method should be called by a function that is connected to the
* #DmapConnection::authenticate signal. The signal will provide the
@@ -195,12 +208,5 @@ void dmap_connection_authenticate_message (DmapConnection *connection,
SoupAuth *auth,
const char *password);
-
-gboolean dmap_connection_get (DmapConnection * self,
- const gchar * path,
- gboolean need_hash,
- DmapResponseHandler handler,
- gpointer user_data);
-
G_END_DECLS
#endif /* __DMAP_CONNECTION_H */
diff --git a/libdmapsharing/dmap-control-player.c b/libdmapsharing/dmap-control-player.c
index 8fd37f1..255968b 100644
--- a/libdmapsharing/dmap-control-player.c
+++ b/libdmapsharing/dmap-control-player.c
@@ -47,8 +47,8 @@ dmap_control_player_default_init (DmapControlPlayerInterface * iface)
("repeat-state",
"Repeat state",
"Repeat state",
- DMAP_TYPE_DACP_REPEAT_STATE,
- DACP_REPEAT_NONE,
+ DMAP_TYPE_DMAP_CONTROL_REPEAT_STATE,
+ CONTROL_REPEAT_NONE,
G_PARAM_READWRITE));
g_object_interface_install_property (iface,
@@ -56,8 +56,8 @@ dmap_control_player_default_init (DmapControlPlayerInterface * iface)
("play-state",
"Play state",
"Play state",
- DMAP_TYPE_DACP_PLAY_STATE,
- DACP_PLAY_STOPPED,
+ DMAP_TYPE_DMAP_CONTROL_PLAY_STATE,
+ CONTROL_PLAY_STOPPED,
G_PARAM_READWRITE));
g_object_interface_install_property (iface,
diff --git a/libdmapsharing/dmap-control-player.h b/libdmapsharing/dmap-control-player.h
index 45da5cf..d7e0418 100644
--- a/libdmapsharing/dmap-control-player.h
+++ b/libdmapsharing/dmap-control-player.h
@@ -24,7 +24,7 @@
G_BEGIN_DECLS
/**
- * DACP_TYPE_PLAYER:
+ * DMAP_TYPE_CONTROL_PLAYER:
*
* The type for #DmapControlPlayer.
*/
@@ -40,9 +40,9 @@ G_BEGIN_DECLS
#define DMAP_CONTROL_PLAYER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), DMAP_TYPE_CONTROL_PLAYER,
DmapControlPlayer))
/**
* IS_DMAP_CONTROL_PLAYER:
- * @o: Instance to check for being a %DACP_TYPE_PLAYER.
+ * @o: Instance to check for being a %DMAP_TYPE_CONTROL_PLAYER.
*
- * Checks whether a valid #GTypeInstance pointer is of type %DACP_TYPE_PLAYER.
+ * Checks whether a valid #GTypeInstance pointer is of type %DMAP_TYPE_CONTROL_PLAYER.
*/
#define IS_DMAP_CONTROL_PLAYER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), DMAP_TYPE_CONTROL_PLAYER))
/**
@@ -60,17 +60,17 @@ typedef struct _DmapControlPlayer DmapControlPlayer;
typedef enum
{
- DACP_REPEAT_NONE = 0,
- DACP_REPEAT_SINGLE = 1,
- DACP_REPEAT_ALL = 2
-} DACPRepeatState;
+ CONTROL_REPEAT_NONE = 0,
+ CONTROL_REPEAT_SINGLE = 1,
+ CONTROL_REPEAT_ALL = 2
+} DmapControlRepeatState;
typedef enum
{
- DACP_PLAY_STOPPED = 2,
- DACP_PLAY_PAUSED = 3,
- DACP_PLAY_PLAYING = 4
-} DACPPlayState;
+ CONTROL_PLAY_STOPPED = 2,
+ CONTROL_PLAY_PAUSED = 3,
+ CONTROL_PLAY_PLAYING = 4
+} DmapControlPlayState;
struct _DmapControlPlayerInterface
{
@@ -93,6 +93,8 @@ GType dmap_control_player_get_type (void);
/**
* dmap_control_player_now_playing_record:
* @player: a player
+ *
+ * Returns: (transfer none): the currently playing record.
*/
DmapAvRecord *dmap_control_player_now_playing_record (DmapControlPlayer * player);
@@ -138,7 +140,7 @@ void dmap_control_player_cue_clear (DmapControlPlayer * player);
/**
* dmap_control_player_cue_play:
* @player: a player
- * @records : a list of records
+ * @records: (element-type DmapRecord): a list of records
* @index: an index
*/
void dmap_control_player_cue_play (DmapControlPlayer * player, GList * records, guint index);
diff --git a/libdmapsharing/dmap-control-share.c b/libdmapsharing/dmap-control-share.c
index 93f7414..eb31737 100644
--- a/libdmapsharing/dmap-control-share.c
+++ b/libdmapsharing/dmap-control-share.c
@@ -42,6 +42,7 @@
#include <libdmapsharing/dmap-structure.h>
#include <libdmapsharing/dmap-share.h>
+#include <libdmapsharing/dmap-connection-private.h>
#include <libdmapsharing/dmap-control-share.h>
#include <libdmapsharing/dmap-control-connection.h>
#include <libdmapsharing/dmap-control-player.h>
@@ -523,8 +524,8 @@ dmap_control_share_fill_playstatusupdate (DmapControlShare * share, SoupMessage
{
GNode *cmst;
DmapAvRecord *record;
- DACPPlayState play_state;
- DACPRepeatState repeat_state;
+ DmapControlPlayState play_state;
+ DmapControlRepeatState repeat_state;
gboolean shuffle_state;
guint playing_time;
diff --git a/libdmapsharing/dmap-db.h b/libdmapsharing/dmap-db.h
index dfc1d94..ff5be8b 100644
--- a/libdmapsharing/dmap-db.h
+++ b/libdmapsharing/dmap-db.h
@@ -190,6 +190,13 @@ gulong dmap_db_count (const DmapDb * db);
gchar **_dmap_db_strsplit_using_quotes (const gchar * str);
+/**
+ * dmap_db_apply_filter:
+ * @db: A media database.
+ * @filter_def: (element-type DmapDbFilterDefinition): A series of filter definitions.
+ *
+ * Returns: (element-type guint DmapRecord) (transfer full): the records which satisfy a record in
@filter_def.
+ */
GHashTable *dmap_db_apply_filter (DmapDb * db, GSList * filter_def);
#endif /* __DMAP_DB_H */
diff --git a/libdmapsharing/dmap-gst-input-stream.c b/libdmapsharing/dmap-gst-input-stream.c
index 72ddc17..627ec37 100644
--- a/libdmapsharing/dmap-gst-input-stream.c
+++ b/libdmapsharing/dmap-gst-input-stream.c
@@ -35,22 +35,6 @@
#define QUEUE_PUSH_WAIT_SECONDS 10
#define QUEUE_POP_WAIT_SECONDS 1
-struct dmap_gst_format
-{
- gchar *id; /* E.g., used as command line arguments. */
- gchar *extension; /* E.g., iTunes uses URI extension to
- * determine stream format.
- */
-};
-
-/* NOTE: Roku clients require lower case extension. */
-static const struct dmap_gst_format dmap_gst_formats[] = {
- {"raw", "raw"},
- {"wav16", "wav"},
- {"mp3", "mp3"},
- {NULL, NULL}
-};
-
struct DmapGstInputStreamPrivate
{
GQueue *buffer;
@@ -285,12 +269,6 @@ dmap_gst_input_stream_new (const gchar * transcode_mimetype,
return stream;
}
-gchar *
-dmapd_input_stream_strdup_format_extension (const gint format_code)
-{
- return g_strdup (dmap_gst_formats[format_code].extension);
-}
-
static gssize
min (gssize a, gssize b)
{
diff --git a/libdmapsharing/dmap-gst-input-stream.h b/libdmapsharing/dmap-gst-input-stream.h
index 90723a3..581ffcf 100644
--- a/libdmapsharing/dmap-gst-input-stream.h
+++ b/libdmapsharing/dmap-gst-input-stream.h
@@ -53,7 +53,7 @@ typedef struct
{
GInputStreamClass parent;
- void (*kill_pipeline) (DmapGstInputStream *);
+ void (*kill_pipeline) (DmapGstInputStream *stream);
} DmapGstInputStreamClass;
GType dmap_gst_input_stream_get_type (void);
@@ -75,7 +75,5 @@ void dmap_gst_input_stream_new_buffer_cb (GstElement *element,
DmapGstInputStream *stream);
*/
-gchar *dmapd_input_stream_strdup_format_extension (const gint format_code);
-
G_END_DECLS
#endif /* __DMAP_GST_INPUT_STREAM */
diff --git a/libdmapsharing/dmap-image-record.h b/libdmapsharing/dmap-image-record.h
index 1b994c3..63909ee 100644
--- a/libdmapsharing/dmap-image-record.h
+++ b/libdmapsharing/dmap-image-record.h
@@ -78,7 +78,7 @@ GType dmap_image_record_get_type (void);
* @record: a DmapImageRecord.
* @err: a GError.
*
- * Returns: A GInputStream that provides read-only access to the data stream
+ * Returns: (transfer full): a GInputStream that provides read-only access to the data stream
* associated with record.
*/
GInputStream *dmap_image_record_read (DmapImageRecord * record, GError ** err);
diff --git a/libdmapsharing/dmap-image-share.c b/libdmapsharing/dmap-image-share.c
index 60b382f..44bfa49 100644
--- a/libdmapsharing/dmap-image-share.c
+++ b/libdmapsharing/dmap-image-share.c
@@ -346,7 +346,7 @@ static void
add_entry_to_mlcl (guint id, DmapRecord * record, gpointer _mb)
{
GNode *mlit;
- struct MLCL_Bits *mb = (struct MLCL_Bits *) _mb;
+ struct DmapMlclBits *mb = (struct DmapMlclBits *) _mb;
mlit = dmap_structure_add (mb->mlcl, DMAP_CC_MLIT);
diff --git a/libdmapsharing/dmap-mdns-browser.h b/libdmapsharing/dmap-mdns-browser.h
index 13bb9e3..d2d7c11 100644
--- a/libdmapsharing/dmap-mdns-browser.h
+++ b/libdmapsharing/dmap-mdns-browser.h
@@ -139,6 +139,12 @@ gboolean dmap_mdns_browser_start (DmapMdnsBrowser * browser, GError ** error);
*/
gboolean dmap_mdns_browser_stop (DmapMdnsBrowser * browser, GError ** error);
+/**
+ * dmap_mdns_browser_get_services:
+ * @browser: A DmapMdnsBrowser.
+ *
+ * Returns: (element-type DmapMdnsService) (transfer none): services available to @browser.
+ */
G_CONST_RETURN GSList *dmap_mdns_browser_get_services (DmapMdnsBrowser *
browser);
DmapMdnsServiceType dmap_mdns_browser_get_service_type (DmapMdnsBrowser
diff --git a/libdmapsharing/dmap-record.h b/libdmapsharing/dmap-record.h
index 7f862b0..1f85f9c 100644
--- a/libdmapsharing/dmap-record.h
+++ b/libdmapsharing/dmap-record.h
@@ -69,8 +69,6 @@ struct _DmapRecordInterface
gboolean (*set_from_blob) (DmapRecord * record, GArray * blob);
};
-typedef unsigned long long bitwise;
-
typedef enum
{
DMAP_MEDIA_KIND_MUSIC = 1,
@@ -85,14 +83,14 @@ GType dmap_record_get_type (void);
* dmap_record_to_blob:
* @record: A DmapRecord.
*
- * Returns: A byte array representation of the record.
+ * Returns: (element-type guint8) (transfer container): A byte array representation of the record.
*/
GArray *dmap_record_to_blob (DmapRecord * record);
/**
- * dmap_record_from_blob:
+ * dmap_record_set_from_blob:
* @record: The record to set.
- * @blob: A byte array representation of a record.
+ * @blob: (element-type guint8): A byte array representation of a record.
*
* Returns: True on success, else false.
*/
diff --git a/libdmapsharing/dmap-share.c b/libdmapsharing/dmap-share.c
index 3002505..b029202 100644
--- a/libdmapsharing/dmap-share.c
+++ b/libdmapsharing/dmap-share.c
@@ -92,7 +92,7 @@ typedef DmapRecord *(*ShareBitwiseLookupByIdFunc) (void *db, guint id);
struct share_bitwise_t
{
DmapShare *share;
- struct MLCL_Bits mb;
+ struct DmapMlclBits mb;
GSList *id_list;
guint32 size;
@@ -899,9 +899,9 @@ _dmap_share_message_set_from_dmap_structure (DmapShare * share,
}
gboolean
-_dmap_share_client_requested (bitwise bits, gint field)
+_dmap_share_client_requested (DmapBits bits, gint field)
{
- return 0 != (bits & (((bitwise) 1) << field));
+ return 0 != (bits & (((DmapBits) 1) << field));
}
gboolean
@@ -1100,11 +1100,11 @@ _dmap_share_update (DmapShare * share,
}
}
-bitwise
+DmapBits
_dmap_share_parse_meta_str (const char *attrs, struct DmapMetaDataMap *mdm)
{
guint i;
- bitwise bits = 0;
+ DmapBits bits = 0;
/* iTunes 8 uses meta=all for /databases/1/items query: */
if (strcmp (attrs, "all") == 0) {
@@ -1120,7 +1120,7 @@ _dmap_share_parse_meta_str (const char *attrs, struct DmapMetaDataMap *mdm)
for (j = 0; mdm[j].tag; j++) {
if (strcmp (mdm[j].tag, attrsv[i]) == 0) {
- bits |= (((bitwise) 1) << mdm[j].md);
+ bits |= (((DmapBits) 1) << mdm[j].md);
found = TRUE;
}
}
@@ -1135,7 +1135,7 @@ _dmap_share_parse_meta_str (const char *attrs, struct DmapMetaDataMap *mdm)
return bits;
}
-bitwise
+DmapBits
_dmap_share_parse_meta (GHashTable * query, struct DmapMetaDataMap * mdm)
{
const gchar *attrs;
@@ -1160,7 +1160,7 @@ _dmap_share_add_playlist_to_mlcl (gpointer id, DmapContainerRecord * record,
GNode *mlit;
guint num_songs;
gchar *name;
- struct MLCL_Bits *mb = (struct MLCL_Bits *) _mb;
+ struct DmapMlclBits *mb = (struct DmapMlclBits *) _mb;
num_songs = dmap_container_record_get_entry_count (record);
g_object_get (record, "name", &name, NULL);
@@ -1491,7 +1491,7 @@ accumulate_mlcl_size_and_ids (guint id,
share_bitwise->id_list = g_slist_append (share_bitwise->id_list, GUINT_TO_POINTER (id));
/* Make copy and set mlcl to NULL so real MLCL does not get changed */
- struct MLCL_Bits mb_copy = share_bitwise->mb;
+ struct DmapMlclBits mb_copy = share_bitwise->mb;
mb_copy.mlcl = dmap_structure_add (NULL, DMAP_CC_MLCL);;
@@ -1530,7 +1530,7 @@ write_next_mlit (SoupMessage * message, struct share_bitwise_t *share_bitwise)
gchar *data = NULL;
guint length;
DmapRecord *record;
- struct MLCL_Bits mb = { NULL, 0, NULL };
+ struct DmapMlclBits mb = { NULL, 0, NULL };
record = share_bitwise->lookup_by_id (share_bitwise->db,
GPOINTER_TO_UINT
@@ -1751,7 +1751,7 @@ _dmap_share_databases (DmapShare * share,
GHashTable *records = NULL;
struct DmapMetaDataMap *map;
gint32 num_songs;
- struct MLCL_Bits mb = { NULL, 0, NULL };
+ struct DmapMlclBits mb = { NULL, 0, NULL };
struct share_bitwise_t *share_bitwise;
record_query = g_hash_table_lookup (query, "query");
@@ -1873,7 +1873,7 @@ _dmap_share_databases (DmapShare * share,
GNode *aply;
GNode *mlit;
struct DmapMetaDataMap *map;
- struct MLCL_Bits mb = { NULL, 0, NULL };
+ struct DmapMlclBits mb = { NULL, 0, NULL };
map = DMAP_SHARE_GET_CLASS (share)->get_meta_data_map (share);
mb.bits = _dmap_share_parse_meta (query, map);
@@ -1936,7 +1936,7 @@ _dmap_share_databases (DmapShare * share,
*/
GNode *apso;
struct DmapMetaDataMap *map;
- struct MLCL_Bits mb = { NULL, 0, NULL };
+ struct DmapMlclBits mb = { NULL, 0, NULL };
guint pl_id;
gchar *record_query;
GSList *filter_def;
diff --git a/libdmapsharing/dmap-share.h b/libdmapsharing/dmap-share.h
index eb95617..f960da8 100644
--- a/libdmapsharing/dmap-share.h
+++ b/libdmapsharing/dmap-share.h
@@ -176,14 +176,16 @@ struct DmapMetaDataMap
guint md;
};
+typedef guint64 DmapBits;
+
/* FIXME: this is passed as user_data to various functions;
* need to rename. Also, get rid of initializations elsewhere: { NULL, 0, NULL };
* instead define a function to do this.
*/
-struct MLCL_Bits
+struct DmapMlclBits
{
GNode *mlcl;
- bitwise bits;
+ DmapBits bits;
DmapShare *share;
};
@@ -208,7 +210,7 @@ guint32 _dmap_share_session_id_create (DmapShare * share,
void _dmap_share_session_id_remove (DmapShare * share,
SoupClientContext * ctx, guint32 id);
-gboolean _dmap_share_client_requested (bitwise bits, gint field);
+gboolean _dmap_share_client_requested (DmapBits bits, gint field);
gboolean _dmap_share_uri_is_local (const char *text_uri);
@@ -223,10 +225,10 @@ void _dmap_share_message_set_from_dmap_structure (DmapShare * share,
SoupMessage * message,
GNode * structure);
-bitwise _dmap_share_parse_meta (GHashTable * query,
+DmapBits _dmap_share_parse_meta (GHashTable * query,
struct DmapMetaDataMap *mdm);
-bitwise _dmap_share_parse_meta_str (const char *attrs,
+DmapBits _dmap_share_parse_meta_str (const char *attrs,
struct DmapMetaDataMap *mdm);
void _dmap_share_add_playlist_to_mlcl (gpointer id,
@@ -235,6 +237,12 @@ void _dmap_share_add_playlist_to_mlcl (gpointer id,
GSList *_dmap_share_build_filter (gchar * filterstr);
+/**
+ * dmap_share_free_filter:
+ * @filter: (element-type GSList): The filter list to free.
+ *
+ * Free the given filter list.
+ */
void dmap_share_free_filter (GSList * filter);
/* Virtual methods (libsoup callbacks with default implementation): */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]