Commit b89ac615 authored by W. Michael Petullo's avatar W. Michael Petullo

Use pkg-config's uninstalled feature with vapigen

Signed-off-by: 's avatarW. Michael Petullo <mike@flyn.org>
parent dbfad825
......@@ -7,6 +7,7 @@ pcfiles = libdmapsharing-@API_VERSION@.pc
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = $(pcfiles)
EXTRA_DIST = \
autogen.sh \
EXTRA_DIST = \
autogen.sh \
libdmapsharing-@API_VERSION@-uninstalled.pc \
README-Memory
......@@ -368,8 +368,10 @@ fi
AM_CONDITIONAL(HAVE_CHECK, false)
if test "x$USE_MAINTAINER_MODE" = "xyes" ; then
PKG_CHECK_MODULES([CHECK], [check >= 0.9.4],have_check=yes,have_check=no)
AC_DEFINE(HAVE_CHECK, 1, [Define if check support is enabled])
AM_CONDITIONAL(HAVE_CHECK, test x"$have_check" = "xyes")
if test "x$have_check" = "xyes"; then
AC_DEFINE(HAVE_CHECK, 1, [Define if check support is enabled])
fi
fi
AC_CHECK_LIB(z, uncompress)
......@@ -388,6 +390,7 @@ AC_SUBST(DMAP_HAVE_UNALIGNED_ACCESS_DEFINE)
AC_OUTPUT([
Makefile
doc/Makefile
libdmapsharing-${API_VERSION}-uninstalled.pc
libdmapsharing-${API_VERSION}.pc
libdmapsharing/Makefile
libdmapsharing/dmap-config.h
......@@ -395,4 +398,8 @@ tests/Makefile
m4/Makefile
media/Makefile
vala/Makefile
vala/libdmapsharing-${API_VERSION}-daap/libdmapsharing-${API_VERSION}-uninstalled.files
vala/libdmapsharing-${API_VERSION}-dacp/libdmapsharing-${API_VERSION}-uninstalled.files
vala/libdmapsharing-${API_VERSION}-dmap/libdmapsharing-${API_VERSION}-uninstalled.files
vala/libdmapsharing-${API_VERSION}-dpap/libdmapsharing-${API_VERSION}-uninstalled.files
])
......@@ -96,6 +96,7 @@ GTKDOC_CFLAGS= \
GTKDOC_LIBS= \
$(top_builddir)/libdmapsharing/libdmapsharing-3.0.la \
$(CHECK_LIBS) \
$(GLIB_LIBS) \
$(GTHREAD_LIBS) \
$(GOBJECT_LIBS) \
......
prefix=
exec_prefix=
libdir=${pcfiledir}/libdmapsharing
includedir=${pcfiledir}
Name: libdmapsharing
Description: libdmapsharing
Version: @VERSION@
Requires: glib-2.0 libsoup-2.4 @GSTLIB@
Libs: -L${libdir} -ldmapsharing-@API_VERSION@
Cflags: -I${includedir}
......@@ -56,19 +56,19 @@ if MAINTAINER_MODE
BUILT_SOURCES = dacplisten.stamp dpapview.stamp dmapcopy.stamp dmapserve.stamp
dacplisten.stamp: $(dacplisten_VALASOURCES)
$(VALAC) --vapidir=../vala --pkg gee-1.0 --pkg gstreamer-0.10 --pkg libdmapsharing-3.0 --pkg libsoup-2.4 --pkg glib-2.0 $^ -C
$(VALAC) --vapidir=../vala --pkg gee-1.0 --pkg gstreamer-0.10 --pkg libdmapsharing-3.0 --pkg libsoup-2.4 --pkg glib-2.0 --pkg avahi-gobject $^ -C
touch $@
dpapview.stamp: $(dpapview_VALASOURCES)
$(VALAC) --vapidir=../vala --pkg gee-1.0 --pkg gtk+-2.0 --pkg gstreamer-0.10 --pkg libdmapsharing-3.0 --pkg libsoup-2.4 --pkg glib-2.0 $^ -C
$(VALAC) --vapidir=../vala --pkg gee-1.0 --pkg gtk+-2.0 --pkg gstreamer-0.10 --pkg libdmapsharing-3.0 --pkg libsoup-2.4 --pkg glib-2.0 --pkg avahi-gobject $^ -C
touch $@
dmapcopy.stamp: $(dmapcopy_VALASOURCES)
$(VALAC) --vapidir=../vala --pkg gee-1.0 --pkg gstreamer-0.10 --pkg libdmapsharing-3.0 --pkg libsoup-2.4 --pkg glib-2.0 $^ -C
$(VALAC) --vapidir=../vala --pkg gee-1.0 --pkg gstreamer-0.10 --pkg libdmapsharing-3.0 --pkg libsoup-2.4 --pkg glib-2.0 --pkg avahi-gobject $^ -C
touch $@
dmapserve.stamp: $(dmapserve_VALASOURCES)
$(VALAC) --vapidir=../vala --pkg gee-1.0 --pkg gstreamer-0.10 --pkg libdmapsharing-3.0 --pkg libsoup-2.4 --pkg glib-2.0 $^ -C
$(VALAC) --vapidir=../vala --pkg gee-1.0 --pkg gstreamer-0.10 --pkg libdmapsharing-3.0 --pkg libsoup-2.4 --pkg glib-2.0 --pkg avahi-gobject $^ -C
touch $@
endif
......@@ -129,6 +129,10 @@ dmapserve_LDADD = \
unit_test_SOURCES = \
unit-test.c
unit_test_LDADD = \
$(GLIB_LIBS) \
$(GOBJECT_LIBS)
AM_CPPFLAGS = \
-I$(top_srcdir) \
$(GLIB_CFLAGS) \
......
/* dacplisten.c generated by valac 0.12.0, the Vala compiler
/* dacplisten.c generated by valac 0.14.2, the Vala compiler
* generated from dacplisten.vala, do not modify */
/* FILE: dacplisten.vala -- Listen to DACP remotes
......@@ -132,10 +132,10 @@ GType vala_dmap_db_get_type (void) G_GNUC_CONST;
ValaDMAPContainerDb* vala_dmap_container_db_new (void);
ValaDMAPContainerDb* vala_dmap_container_db_construct (GType object_type);
GType vala_dmap_container_db_get_type (void) G_GNUC_CONST;
static void _lambda0_ (const gchar* service_name, const gchar* display_name, DACPListener* self);
static void __lambda0__dacp_share_remote_found (DACPShare* _sender, const gchar* service_name, const gchar* remote_name, gpointer self);
static void _lambda1_ (const gchar* guid, DACPListener* self);
static void __lambda1__dacp_share_add_guid (DACPShare* _sender, const gchar* guid, gpointer self);
static void __lambda0_ (DACPListener* self, const gchar* service_name, const gchar* display_name);
static void ___lambda0__dacp_share_remote_found (DACPShare* _sender, const gchar* service_name, const gchar* remote_name, gpointer self);
static void __lambda1_ (DACPListener* self, const gchar* guid);
static void ___lambda1__dacp_share_add_guid (DACPShare* _sender, const gchar* guid, gpointer self);
static void dacp_listener_finalize (GObject* obj);
gint _vala_main (gchar** args, int args_length1);
......@@ -143,8 +143,10 @@ gint _vala_main (gchar** args, int args_length1);
static DAAPRecord* vala_dacp_player_real_now_playing_record (DACPPlayer* base) {
ValaDACPPlayer * self;
DAAPRecord* result = NULL;
FILE* _tmp0_;
self = (ValaDACPPlayer*) base;
fprintf (stdout, "Now playing record request received\n");
_tmp0_ = stdout;
fprintf (_tmp0_, "Now playing record request received\n");
result = NULL;
return result;
}
......@@ -153,55 +155,73 @@ static DAAPRecord* vala_dacp_player_real_now_playing_record (DACPPlayer* base) {
static guchar* vala_dacp_player_real_now_playing_artwork (DACPPlayer* base, guint width, guint heigth, int* result_length1) {
ValaDACPPlayer * self;
guchar* result = NULL;
gpointer _tmp0_;
FILE* _tmp0_;
guchar* _tmp1_;
gint _tmp1__length1;
self = (ValaDACPPlayer*) base;
fprintf (stdout, "Now playing artwork request received\n");
_tmp0_ = NULL;
*result_length1 = 0;
result = _tmp0_;
_tmp0_ = stdout;
fprintf (_tmp0_, "Now playing artwork request received\n");
_tmp1_ = NULL;
_tmp1__length1 = 0;
if (result_length1) {
*result_length1 = _tmp1__length1;
}
result = _tmp1_;
return result;
}
static void vala_dacp_player_real_play_pause (DACPPlayer* base) {
ValaDACPPlayer * self;
FILE* _tmp0_;
self = (ValaDACPPlayer*) base;
fprintf (stdout, "Play/pause request received\n");
_tmp0_ = stdout;
fprintf (_tmp0_, "Play/pause request received\n");
}
static void vala_dacp_player_real_pause (DACPPlayer* base) {
ValaDACPPlayer * self;
FILE* _tmp0_;
self = (ValaDACPPlayer*) base;
fprintf (stdout, "Pause request received\n");
_tmp0_ = stdout;
fprintf (_tmp0_, "Pause request received\n");
}
static void vala_dacp_player_real_next_item (DACPPlayer* base) {
ValaDACPPlayer * self;
FILE* _tmp0_;
self = (ValaDACPPlayer*) base;
fprintf (stdout, "Next item request received\n");
_tmp0_ = stdout;
fprintf (_tmp0_, "Next item request received\n");
}
static void vala_dacp_player_real_prev_item (DACPPlayer* base) {
ValaDACPPlayer * self;
FILE* _tmp0_;
self = (ValaDACPPlayer*) base;
fprintf (stdout, "Previous item request received\n");
_tmp0_ = stdout;
fprintf (_tmp0_, "Previous item request received\n");
}
static void vala_dacp_player_real_cue_clear (DACPPlayer* base) {
ValaDACPPlayer * self;
FILE* _tmp0_;
self = (ValaDACPPlayer*) base;
fprintf (stdout, "Cue clear request received\n");
_tmp0_ = stdout;
fprintf (_tmp0_, "Cue clear request received\n");
}
static void vala_dacp_player_real_cue_play (DACPPlayer* base, GList* records, guint index) {
ValaDACPPlayer * self;
FILE* _tmp0_;
self = (ValaDACPPlayer*) base;
fprintf (stdout, "Cue play request received\n");
_tmp0_ = stdout;
fprintf (_tmp0_, "Cue play request received\n");
}
......@@ -225,13 +245,13 @@ static void vala_dacp_player_class_init (ValaDACPPlayerClass * klass) {
static void vala_dacp_player_dacp_player_interface_init (DACPPlayerIface * iface) {
vala_dacp_player_dacp_player_parent_iface = g_type_interface_peek_parent (iface);
iface->now_playing_record = (DAAPRecord* (*)(DACPPlayer*)) vala_dacp_player_real_now_playing_record;
iface->now_playing_artwork = (guchar* (*)(DACPPlayer* ,guint ,guint ,int*)) vala_dacp_player_real_now_playing_artwork;
iface->now_playing_artwork = (guchar* (*)(DACPPlayer*, guint, guint, int*)) vala_dacp_player_real_now_playing_artwork;
iface->play_pause = (void (*)(DACPPlayer*)) vala_dacp_player_real_play_pause;
iface->pause = (void (*)(DACPPlayer*)) vala_dacp_player_real_pause;
iface->next_item = (void (*)(DACPPlayer*)) vala_dacp_player_real_next_item;
iface->prev_item = (void (*)(DACPPlayer*)) vala_dacp_player_real_prev_item;
iface->cue_clear = (void (*)(DACPPlayer*)) vala_dacp_player_real_cue_clear;
iface->cue_play = (void (*)(DACPPlayer* ,GList* ,guint)) vala_dacp_player_real_cue_play;
iface->cue_play = (void (*)(DACPPlayer*, GList*, guint)) vala_dacp_player_real_cue_play;
}
......@@ -253,35 +273,49 @@ GType vala_dacp_player_get_type (void) {
}
static void _lambda0_ (const gchar* service_name, const gchar* display_name, DACPListener* self) {
static void __lambda0_ (DACPListener* self, const gchar* service_name, const gchar* display_name) {
FILE* _tmp0_;
const gchar* _tmp1_;
const gchar* _tmp2_;
g_return_if_fail (service_name != NULL);
g_return_if_fail (display_name != NULL);
fprintf (stdout, "Found remote: %s, %s\n", service_name, display_name);
_tmp0_ = stdout;
_tmp1_ = service_name;
_tmp2_ = display_name;
fprintf (_tmp0_, "Found remote: %s, %s\n", _tmp1_, _tmp2_);
}
static void __lambda0__dacp_share_remote_found (DACPShare* _sender, const gchar* service_name, const gchar* remote_name, gpointer self) {
_lambda0_ (service_name, remote_name, self);
static void ___lambda0__dacp_share_remote_found (DACPShare* _sender, const gchar* service_name, const gchar* remote_name, gpointer self) {
__lambda0_ (self, service_name, remote_name);
}
static void _lambda1_ (const gchar* guid, DACPListener* self) {
static void __lambda1_ (DACPListener* self, const gchar* guid) {
FILE* _tmp0_;
g_return_if_fail (guid != NULL);
fprintf (stdout, "Add GUID request received\n");
_tmp0_ = stdout;
fprintf (_tmp0_, "Add GUID request received\n");
}
static void __lambda1__dacp_share_add_guid (DACPShare* _sender, const gchar* guid, gpointer self) {
_lambda1_ (guid, self);
static void ___lambda1__dacp_share_add_guid (DACPShare* _sender, const gchar* guid, gpointer self) {
__lambda1_ (self, guid);
}
DACPListener* dacp_listener_construct (GType object_type) {
DACPListener * self = NULL;
ValaDMAPDb* _tmp0_ = NULL;
ValaDMAPContainerDb* _tmp1_ = NULL;
ValaDACPPlayer* _tmp2_ = NULL;
DACPShare* _tmp3_ = NULL;
ValaDMAPDb* _tmp0_;
ValaDMAPContainerDb* _tmp1_;
ValaDACPPlayer* _tmp2_;
DACPPlayer* _tmp3_;
DMAPDb* _tmp4_;
DMAPContainerDb* _tmp5_;
DACPShare* _tmp6_;
DACPShare* _tmp7_;
DACPShare* _tmp8_;
DACPShare* _tmp9_;
self = (DACPListener*) g_object_new (object_type, NULL);
_tmp0_ = vala_dmap_db_new ();
_g_object_unref0 (self->priv->db);
......@@ -292,12 +326,18 @@ DACPListener* dacp_listener_construct (GType object_type) {
_tmp2_ = vala_dacp_player_new ();
_g_object_unref0 (self->priv->player);
self->priv->player = (DACPPlayer*) _tmp2_;
_tmp3_ = dacp_share_new ("dacplisten", self->priv->player, self->priv->db, self->priv->container_db);
_tmp3_ = self->priv->player;
_tmp4_ = self->priv->db;
_tmp5_ = self->priv->container_db;
_tmp6_ = dacp_share_new ("dacplisten", _tmp3_, _tmp4_, _tmp5_);
_g_object_unref0 (self->priv->share);
self->priv->share = _tmp3_;
g_signal_connect_object (self->priv->share, "remote-found", (GCallback) __lambda0__dacp_share_remote_found, self, 0);
g_signal_connect_object (self->priv->share, "add-guid", (GCallback) __lambda1__dacp_share_add_guid, self, 0);
dacp_share_start_lookup (self->priv->share);
self->priv->share = _tmp6_;
_tmp7_ = self->priv->share;
g_signal_connect_object (_tmp7_, "remote-found", (GCallback) ___lambda0__dacp_share_remote_found, self, 0);
_tmp8_ = self->priv->share;
g_signal_connect_object (_tmp8_, "add-guid", (GCallback) ___lambda1__dacp_share_add_guid, self, 0);
_tmp9_ = self->priv->share;
dacp_share_start_lookup (_tmp9_);
return self;
}
......@@ -344,9 +384,9 @@ GType dacp_listener_get_type (void) {
gint _vala_main (gchar** args, int args_length1) {
gint result = 0;
GMainLoop* _tmp0_ = NULL;
GMainLoop* _tmp0_;
GMainLoop* loop;
DACPListener* _tmp1_ = NULL;
DACPListener* _tmp1_;
DACPListener* dacplistener;
_tmp0_ = g_main_loop_new (NULL, FALSE);
loop = _tmp0_;
......
/* dmapcopy.c generated by valac 0.12.0, the Vala compiler
/* dmapcopy.c generated by valac 0.14.2, the Vala compiler
* generated from dmapcopy.vala, do not modify */
/* FILE: dmapcopy.vala -- Copy files from a DMAP server
......@@ -116,10 +116,10 @@ enum {
DPAP_COPY_DUMMY_PROPERTY
};
static gboolean dpap_copy_connected_cb (DPAPCopy* self, DMAPConnection* connection, gboolean _result_, const gchar* reason);
static void _lambda0_ (gconstpointer k, gconstpointer v, DPAPCopy* self);
static void __lambda0_ (DPAPCopy* self, gconstpointer k, gconstpointer v);
GType vala_dpap_record_get_type (void) G_GNUC_CONST;
const gchar* vala_dpap_record_get_location (ValaDPAPRecord* self);
static void __lambda0__gh_func (gconstpointer key, gconstpointer value, gpointer self);
static void ___lambda0__gh_func (gconstpointer key, gconstpointer value, gpointer self);
static void dpap_copy_service_added_cb (DPAPCopy* self, DMAPMdnsBrowserService* service);
static gboolean _dpap_copy_connected_cb_dmap_connection_callback (DMAPConnection* connection, gboolean _result_, const gchar* reason, gpointer self);
DPAPCopy* dpap_copy_new (GError** error);
......@@ -136,26 +136,36 @@ gint _vala_main (gchar** args, int args_length1);
static void _debug_null_glog_func (const gchar* log_domain, GLogLevelFlags log_levels, const gchar* message, gpointer self);
static void _lambda0_ (gconstpointer k, gconstpointer v, DPAPCopy* self) {
const gchar* _tmp0_ = NULL;
_tmp0_ = vala_dpap_record_get_location (VALA_DPAP_RECORD (v));
fprintf (stdout, "%s\n", _tmp0_);
static void __lambda0_ (DPAPCopy* self, gconstpointer k, gconstpointer v) {
FILE* _tmp0_;
gconstpointer _tmp1_;
const gchar* _tmp2_;
const gchar* _tmp3_;
_tmp0_ = stdout;
_tmp1_ = v;
_tmp2_ = vala_dpap_record_get_location (VALA_DPAP_RECORD (_tmp1_));
_tmp3_ = _tmp2_;
fprintf (_tmp0_, "%s\n", _tmp3_);
}
static void __lambda0__gh_func (gconstpointer key, gconstpointer value, gpointer self) {
_lambda0_ (key, value, self);
static void ___lambda0__gh_func (gconstpointer key, gconstpointer value, gpointer self) {
__lambda0_ (self, key, value);
}
static gboolean dpap_copy_connected_cb (DPAPCopy* self, DMAPConnection* connection, gboolean _result_, const gchar* reason) {
gboolean result = FALSE;
gint64 _tmp0_;
ValaDMAPDb* _tmp0_;
gint64 _tmp1_ = 0LL;
ValaDMAPDb* _tmp2_;
g_return_val_if_fail (self != NULL, FALSE);
g_return_val_if_fail (connection != NULL, FALSE);
_tmp0_ = dmap_db_count ((DMAPDb*) self->priv->db);
g_debug ("dmapcopy.vala:30: %lld entries\n", _tmp0_);
dmap_db_foreach ((DMAPDb*) self->priv->db, __lambda0__gh_func, self);
_tmp0_ = self->priv->db;
_tmp1_ = dmap_db_count ((DMAPDb*) _tmp0_);
g_debug ("dmapcopy.vala:30: %lld entries\n", _tmp1_);
_tmp2_ = self->priv->db;
dmap_db_foreach ((DMAPDb*) _tmp2_, ___lambda0__gh_func, self);
result = TRUE;
return result;
}
......@@ -169,12 +179,30 @@ static gboolean _dpap_copy_connected_cb_dmap_connection_callback (DMAPConnection
static void dpap_copy_service_added_cb (DPAPCopy* self, DMAPMdnsBrowserService* service) {
DPAPConnection* _tmp0_ = NULL;
DMAPMdnsBrowserService* _tmp0_;
const gchar* _tmp1_;
DMAPMdnsBrowserService* _tmp2_;
const gchar* _tmp3_;
DMAPMdnsBrowserService* _tmp4_;
guint _tmp5_;
ValaDMAPDb* _tmp6_;
ValaDPAPRecordFactory* _tmp7_;
DPAPConnection* _tmp8_;
DMAPConnection* _tmp9_;
g_return_if_fail (self != NULL);
_tmp0_ = dpap_connection_new (service->service_name, service->host, service->port, (DMAPDb*) self->priv->db, (DMAPRecordFactory*) self->priv->factory);
_tmp0_ = service;
_tmp1_ = _tmp0_->service_name;
_tmp2_ = service;
_tmp3_ = _tmp2_->host;
_tmp4_ = service;
_tmp5_ = _tmp4_->port;
_tmp6_ = self->priv->db;
_tmp7_ = self->priv->factory;
_tmp8_ = dpap_connection_new (_tmp1_, _tmp3_, _tmp5_, (DMAPDb*) _tmp6_, (DMAPRecordFactory*) _tmp7_);
_g_object_unref0 (self->priv->connection);
self->priv->connection = DMAP_CONNECTION (_tmp0_);
dmap_connection_connect (self->priv->connection, _dpap_copy_connected_cb_dmap_connection_callback, self);
self->priv->connection = DMAP_CONNECTION (_tmp8_);
_tmp9_ = self->priv->connection;
dmap_connection_connect (_tmp9_, _dpap_copy_connected_cb_dmap_connection_callback, self);
}
......@@ -185,9 +213,11 @@ static void _dpap_copy_service_added_cb_dmap_mdns_browser_service_added (DMAPMdn
DPAPCopy* dpap_copy_construct (GType object_type, GError** error) {
DPAPCopy* self = NULL;
ValaDMAPDb* _tmp0_ = NULL;
ValaDPAPRecordFactory* _tmp1_ = NULL;
DMAPMdnsBrowser* _tmp2_ = NULL;
ValaDMAPDb* _tmp0_;
ValaDPAPRecordFactory* _tmp1_;
DMAPMdnsBrowser* _tmp2_;
DMAPMdnsBrowser* _tmp3_;
DMAPMdnsBrowser* _tmp4_;
GError * _inner_error_ = NULL;
self = (DPAPCopy*) g_type_create_instance (object_type);
_tmp0_ = vala_dmap_db_new ();
......@@ -199,8 +229,10 @@ DPAPCopy* dpap_copy_construct (GType object_type, GError** error) {
_tmp2_ = dmap_mdns_browser_new (DMAP_MDNS_BROWSER_SERVICE_TYPE_DPAP);
_g_object_unref0 (self->priv->browser);
self->priv->browser = _tmp2_;
g_signal_connect (self->priv->browser, "service-added", (GCallback) _dpap_copy_service_added_cb_dmap_mdns_browser_service_added, self);
dmap_mdns_browser_start (self->priv->browser, &_inner_error_);
_tmp3_ = self->priv->browser;
g_signal_connect (_tmp3_, "service-added", (GCallback) _dpap_copy_service_added_cb_dmap_mdns_browser_service_added, self);
_tmp4_ = self->priv->browser;
dmap_mdns_browser_start (_tmp4_, &_inner_error_);
if (_inner_error_ != NULL) {
g_propagate_error (error, _inner_error_);
_dpap_copy_unref0 (self);
......@@ -381,7 +413,11 @@ void dpap_copy_unref (gpointer instance) {
void debug_printf (const gchar* log_domain, GLogLevelFlags log_level, const gchar* message) {
fprintf (stdout, "%s\n", message);
FILE* _tmp0_;
const gchar* _tmp1_;
_tmp0_ = stdout;
_tmp1_ = message;
fprintf (_tmp0_, "%s\n", _tmp1_);
}
......@@ -396,9 +432,9 @@ static void _debug_null_glog_func (const gchar* log_domain, GLogLevelFlags log_l
gint _vala_main (gchar** args, int args_length1) {
gint result = 0;
GMainLoop* _tmp0_ = NULL;
GMainLoop* _tmp0_;
GMainLoop* loop;
DPAPCopy* _tmp1_ = NULL;
DPAPCopy* _tmp1_;
DPAPCopy* dmapcopy;
GError * _inner_error_ = NULL;
_tmp0_ = g_main_loop_new (NULL, FALSE);
......
/* dmapserve.c generated by valac 0.12.0, the Vala compiler
/* dmapserve.c generated by valac 0.14.2, the Vala compiler
* generated from dmapserve.vala, do not modify */
/* FILE: dmapserve.vala -- Serve media using DMAP
......@@ -133,10 +133,14 @@ static void _debug_printf_glog_func (const gchar* log_domain, GLogLevelFlags log
DPAPServe* dpap_serve_construct (GType object_type, GError** error) {
DPAPServe* self = NULL;
ValaDPAPRecord* _tmp0_ = NULL;
ValaDMAPDb* _tmp1_ = NULL;
ValaDMAPContainerDb* _tmp2_ = NULL;
DPAPShare* _tmp3_ = NULL;
ValaDPAPRecord* _tmp0_;
ValaDMAPDb* _tmp1_;
ValaDMAPDb* _tmp2_;
ValaDPAPRecord* _tmp3_;
ValaDMAPContainerDb* _tmp4_;
ValaDMAPDb* _tmp5_;
ValaDMAPContainerDb* _tmp6_;
DPAPShare* _tmp7_;
self = (DPAPServe*) g_type_create_instance (object_type);
_tmp0_ = vala_dpap_record_new ();
_g_object_unref0 (self->priv->record);
......@@ -144,13 +148,17 @@ DPAPServe* dpap_serve_construct (GType object_type, GError** error) {
_tmp1_ = vala_dmap_db_new ();
_g_object_unref0 (self->priv->db);
self->priv->db = _tmp1_;
dmap_db_add ((DMAPDb*) self->priv->db, (DMAPRecord*) self->priv->record);
_tmp2_ = vala_dmap_container_db_new ();
_tmp2_ = self->priv->db;
_tmp3_ = self->priv->record;
dmap_db_add ((DMAPDb*) _tmp2_, (DMAPRecord*) _tmp3_);
_tmp4_ = vala_dmap_container_db_new ();
_g_object_unref0 (self->priv->container_db);
self->priv->container_db = _tmp2_;
_tmp3_ = dpap_share_new ("dmapserve", NULL, self->priv->db, self->priv->container_db, NULL);
self->priv->container_db = _tmp4_;
_tmp5_ = self->priv->db;
_tmp6_ = self->priv->container_db;
_tmp7_ = dpap_share_new ("dmapserve", NULL, _tmp5_, _tmp6_, NULL);
_g_object_unref0 (self->priv->share);
self->priv->share = _tmp3_;
self->priv->share = _tmp7_;
return self;
}
......@@ -326,7 +334,11 @@ void dpap_serve_unref (gpointer instance) {
void debug_printf (const gchar* log_domain, GLogLevelFlags log_level, const gchar* message) {
fprintf (stdout, "%s\n", message);
FILE* _tmp0_;
const gchar* _tmp1_;
_tmp0_ = stdout;
_tmp1_ = message;
fprintf (_tmp0_, "%s\n", _tmp1_);
}
......@@ -341,9 +353,9 @@ static void _debug_printf_glog_func (const gchar* log_domain, GLogLevelFlags log
gint _vala_main (gchar** args, int args_length1) {
gint result = 0;
GMainLoop* _tmp0_ = NULL;
GMainLoop* _tmp0_;
GMainLoop* loop;
DPAPServe* _tmp1_ = NULL;
DPAPServe* _tmp1_;
DPAPServe* dmapcopy;
GError * _inner_error_ = NULL;
_tmp0_ = g_main_loop_new (NULL, FALSE);
......
This diff is collapsed.
/* vala-dmap-container-db.c generated by valac 0.12.0, the Vala compiler
/* vala-dmap-container-db.c generated by valac 0.14.2, the Vala compiler
* generated from vala-dmap-container-db.vala, do not modify */
/* FILE: vala-dmap-db.vala -- A DMAPContainerDb implementation in Vala
......@@ -75,10 +75,14 @@ static void vala_dmap_container_db_finalize (GObject* obj);
static gint64 vala_dmap_container_db_real_count (DMAPContainerDb* base) {
ValaDMAPContainerDb * self;
gint64 result = 0LL;
gint _tmp0_;
GeeArrayList* _tmp0_;
gint _tmp1_;
gint _tmp2_;
self = (ValaDMAPContainerDb*) base;
_tmp0_ = gee_collection_get_size ((GeeCollection*) self->priv->db);
result = (gint64) _tmp0_;
_tmp0_ = self->priv->db;
_tmp1_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp0_);
_tmp2_ = _tmp1_;
result = (gint64) _tmp2_;
return result;
}
......@@ -92,20 +96,40 @@ static void vala_dmap_container_db_real_foreach (DMAPContainerDb* base, GHFunc f
i = 0;
_tmp0_ = TRUE;
while (TRUE) {
gint _tmp1_;
void* _tmp2_ = NULL;
gpointer _tmp3_ = NULL;
if (!_tmp0_) {
i++;
gboolean _tmp1_;
gint _tmp3_;
GeeArrayList* _tmp4_;
gint _tmp5_;
gint _tmp6_;
GHFunc _tmp7_;
void* _tmp7__target;
gint _tmp8_;
void* _tmp9_ = NULL;
GeeArrayList* _tmp10_;
gint _tmp11_;
gpointer _tmp12_ = NULL;
_tmp1_ = _tmp0_;
if (!_tmp1_) {
gint _tmp2_;
_tmp2_ = i;
i = _tmp2_ + 1;
}
_tmp0_ = FALSE;
_tmp1_ = gee_collection_get_size ((GeeCollection*) self->priv->db);
if (!(i < _tmp1_)) {
_tmp3_ = i;
_tmp4_ = self->priv->db;
_tmp5_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp4_);
_tmp6_ = _tmp5_;
if (!(_tmp3_ < _tmp6_)) {
break;
}
_tmp2_ = GINT_TO_POINTER (i);
_tmp3_ = gee_abstract_list_get ((GeeAbstractList*) self->priv->db, i);
func (_tmp2_, (DMAPRecord*) _tmp3_, func_target);
_tmp7_ = func;
_tmp7__target = func_target;
_tmp8_ = i;
_tmp9_ = GINT_TO_POINTER (_tmp8_);
_tmp10_ = self->priv->db;
_tmp11_ = i;
_tmp12_ = gee_abstract_list_get ((GeeAbstractList*) _tmp10_, _tmp11_);
_tmp7_ (_tmp9_, (DMAPRecord*) _tmp12_, _tmp7__target);
}
}
}
......@@ -150,14 +174,14 @@ static void vala_dmap_container_db_class_init (ValaDMAPContainerDbClass * klass)
static void vala_dmap_container_db_dmap_container_db_interface_init (DMAPContainerDbIface * iface) {
vala_dmap_container_db_dmap_container_db_parent_iface = g_type_interface_peek_parent (iface);
iface->count = (gint64 (*)(DMAPContainerDb*)) vala_dmap_container_db_real_count;
iface->foreach = (void (*)(DMAPContainerDb* ,GHFunc ,void*)) vala_dmap_container_db_real_foreach;
iface->lookup_by_id = (DMAPContainerRecord* (*)(DMAPContainerDb* ,guint)) vala_dmap_container_db_real_lookup_by_id;
iface->add = (void (*)(DMAPContainerDb* ,DMAPContainerRecord*)) vala_dmap_container_db_real_add;
iface->foreach = (void (*)(DMAPContainerDb*, GHFunc, void*)) vala_dmap_container_db_real_foreach;
iface->lookup_by_id = (DMAPContainerRecord* (*)(DMAPContainerDb*, guint)) vala_dmap_container_db_real_lookup_by_id;
iface->add = (void (*)(DMAPContainerDb*, DMAPContainerRecord*)) vala_dmap_container_db_real_add;
}
static void vala_dmap_container_db_instance_init (ValaDMAPContainerDb * self) {
GeeArrayList* _tmp0_ = NULL;
GeeArrayList* _tmp0_;
self->priv = VALA_DMAP_CONTAINER_DB_GET_PRIVATE (self);
_tmp0_ = gee_array_list_new (DMAP_TYPE_RECORD, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL);
self->priv->db = _tmp0_;
......
/* vala-dmap-db.c generated by valac 0.12.0, the Vala compiler
/* vala-dmap-db.c generated by valac 0.14.2, the Vala compiler
* generated from vala-dmap-db.vala, do not modify */
/* FILE: vala-dmap-db.vala -- A DMAPDb implementation in Vala
......@@ -80,13 +80,20 @@ static void vala_dmap_db_finalize (GObject* obj);
static guint vala_dmap_db_real_add (DMAPDb* base, DMAPRecord* record) {
ValaDMAPDb * self;
guint result = 0U;
gint _tmp0_;
GeeArrayList* _tmp0_;
DMAPRecord* _tmp1_;
GeeArrayList* _tmp2_;
gint _tmp3_;
gint _tmp4_;
self = (ValaDMAPDb*) base;
g_return_val_if_fail (record != NULL, 0U);
gee_abstract_collection_add ((GeeAbstractCollection*) self->priv->db, DMAP_RECORD (record));
gee_abstract_collection_add ((GeeAbstractCollection*) self->priv->db, DMAP_RECORD (record));
_tmp0_ = gee_collection_get_size ((GeeCollection*) self->priv->db);
result = (guint) _tmp0_;
_tmp0_ = self->priv->db;
_tmp1_ = record;
gee_abstract_collection_add ((GeeAbstractCollection*) _tmp0_, DMAP_RECORD (_tmp1_));
_tmp2_ = self->priv->db;
_tmp3_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp2_);
_tmp4_ = _tmp3_;
result = (guint) _tmp4_;
return result;
}
......@@ -96,7 +103,7 @@ static guint vala_dmap_db_real_add_path (DMAPDb* base, const gchar* path) {
guint result = 0U;
self = (ValaDMAPDb*) base;
g_return_val_if_fail (path != NULL, 0U);
g_error ("vala-dmap-db.vala:36: add_path not implemented");
g_error ("vala-dmap-db.vala:35: add_path not implemented");
return result;
}
......@@ -106,7 +113,7 @@ static guint vala_dmap_db_real_add_with_id (DMAPDb* base, DMAPRecord* record, gu
guint result = 0U;
self = (ValaDMAPDb*) base;
g_return_val_if_fail (record != NULL, 0U);
g_error ("vala-dmap-db.vala:40: add_with_id not implemented");
g_error ("vala-dmap-db.vala:39: add_with_id not implemented");
return result;
}
......@@ -114,10 +121,14 @@ static guint vala_dmap_db_real_add_with_id (DMAPDb* base, DMAPRecord* record, gu
static gint64 vala_dmap_db_real_count (DMAPDb* base) {
ValaDMAPDb * self;
gint64 result = 0LL;
gint _tmp0_;
GeeArrayList* _tmp0_;
gint _tmp1_;
gint _tmp2_;
self = (ValaDMAPDb*) base;
_tmp0_ = gee_collection_get_size ((GeeCollection*) self->priv->db);
result = (gint64) _tmp0_;
_tmp0_ = self->priv->db;
_tmp1_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp0_);
_tmp2_ = _tmp1_;
result = (gint64) _tmp2_;
return result;
}
......@@ -131,20 +142,40 @@ static void vala_dmap_db_real_foreach (DMAPDb* base, GHFunc func, void* func_tar
i = 0;
_tmp0_ = TRUE;
while (TRUE) {
gint _tmp1_;
void* _tmp2_ = NULL;