[gnome-online-miners] src: Added stub for media server miner
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-online-miners] src: Added stub for media server miner
- Date: Mon, 18 Aug 2014 09:18:54 +0000 (UTC)
commit 89ec6058acf3a864e8a763ca35090fbbfc44aee2
Author: Pranav Kant <pranav913 gmail com>
Date: Wed Jun 4 01:04:11 2014 +0530
src: Added stub for media server miner
http://bugzilla.gnome.org/show_bug.cgi?id=728912
src/Makefile.am | 63 +++++++++++++++++
src/gom-dleyna-server-manager.xml | 37 ++++++++++
src/gom-dleyna-server-media-device.xml | 47 +++++++++++++
src/gom-media-server-miner-main.c | 33 +++++++++
src/gom-media-server-miner.c | 71 +++++++++++++++++++
src/gom-media-server-miner.h | 69 +++++++++++++++++++
src/gom-upnp-media-container2.xml | 117 ++++++++++++++++++++++++++++++++
7 files changed, 437 insertions(+), 0 deletions(-)
---
diff --git a/src/Makefile.am b/src/Makefile.am
index ef82626..915bb5b 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -49,6 +49,7 @@ libexec_PROGRAMS = \
gom-facebook-miner \
gom-flickr-miner \
gom-gdata-miner \
+ gom-media-server-miner \
gom-owncloud-miner \
gom-zpj-miner \
$(NULL)
@@ -131,6 +132,43 @@ gom_gdata_miner_LDADD = \
$(TRACKER_LIBS) \
$(NULL)
+gom_media_server_miner_built_sources = \
+ gom-dleyna-server-manager.c \
+ gom-dleyna-server-manager.h \
+ gom-dleyna-server-media-device.c \
+ gom-dleyna-server-media-device.h \
+ gom-upnp-media-container2.c \
+ gom-upnp-media-container2.h \
+ $(NULL)
+
+nodist_gom_media_server_miner_SOURCES = \
+ $(gom_media_server_miner_built_sources)
+ $(NULL)
+
+gom_media_server_miner_SOURCES = \
+ gom-media-server-miner-main.c \
+ gom-media-server-miner.c \
+ gom-media-server-miner.h \
+ $(NULL)
+
+gom_media_server_miner_CPPFLAGS = \
+ -DG_LOG_DOMAIN=\"Gom\" \
+ -DG_DISABLE_DEPRECATED \
+ -I$(top_srcdir)/src \
+ $(GIO_CFLAGS) \
+ $(GLIB_CFLAGS) \
+ $(GOA_CFLAGS) \
+ $(TRACKER_CFLAGS) \
+ $(NULL)
+
+gom_media_server_miner_LDADD = \
+ libgom-1.0.la \
+ $(GIO_LIBS) \
+ $(GLIB_LIBS) \
+ $(GOA_LIBS) \
+ $(TRACKER_LIBS) \
+ $(NULL)
+
gom_owncloud_miner_SOURCES = \
gom-owncloud-miner-main.c \
gom-owncloud-miner.c \
@@ -183,6 +221,7 @@ gom_zpj_miner_LDADD = \
BUILT_SOURCES = \
$(libgom_1_0_la_built_sources) \
+ $(gom_media_server_miner_built_sources)
$(NULL)
CLEANFILES = \
@@ -191,9 +230,33 @@ CLEANFILES = \
EXTRA_DIST = \
gom-dbus.xml \
+ gom-dleyna-server-manager.xml \
+ gom-dleyna-server-media-device.xml \
+ gom-upnp-media-container2.xml \
gom-miner-main.c \
$(NULL)
+gom-dleyna-server-media-device.h gom-dleyna-server-media-device.c: gom-dleyna-server-media-device.xml
+ $(AM_V_GEN)gdbus-codegen \
+ --c-namespace DleynaServer \
+ --generate-c-code gom-dleyna-server-media-device \
+ --interface-prefix com.intel.dLeynaServer. \
+ $<
+
+gom-dleyna-server-manager.h gom-dleyna-server-manager.c: gom-dleyna-server-manager.xml
+ $(AM_V_GEN)gdbus-codegen \
+ --c-namespace DleynaServer \
+ --generate-c-code gom-dleyna-server-manager \
+ --interface-prefix com.intel.dLeynaServer. \
+ $<
+
+gom-upnp-media-container2.h gom-upnp-media-container2.c: gom-upnp-media-container2.xml
+ $(AM_V_GEN)gdbus-codegen \
+ --c-namespace Upnp \
+ --generate-c-code gom-upnp-media-container2 \
+ --interface-prefix org.gnome.UPnP. \
+ $<
+
gom-dbus.h gom-dbus.c: gom-dbus.xml
$(AM_V_GEN)gdbus-codegen \
--c-namespace Gom \
diff --git a/src/gom-dleyna-server-manager.xml b/src/gom-dleyna-server-manager.xml
new file mode 100644
index 0000000..7829acd
--- /dev/null
+++ b/src/gom-dleyna-server-manager.xml
@@ -0,0 +1,37 @@
+<!DOCTYPE node PUBLIC
+"-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
+"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
+
+<!--
+ GNOME Online Miners - crawls through your online content
+ Copyright (c) 2014 Pranav Kant
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301, USA.
+-->
+
+<node>
+ <interface name="com.intel.dLeynaServer.Manager">
+ <method name="GetServers">
+ <arg name="Servers" type="ao" direction="out" />
+ </method>
+ <signal name="FoundServer">
+ <arg type="o" name="Path" />
+ </signal>
+ <signal name="LostServer">
+ <arg type="o" name="Path" />
+ </signal>
+ </interface>
+</node>
diff --git a/src/gom-dleyna-server-media-device.xml b/src/gom-dleyna-server-media-device.xml
new file mode 100644
index 0000000..1e4edb8
--- /dev/null
+++ b/src/gom-dleyna-server-media-device.xml
@@ -0,0 +1,47 @@
+<!DOCTYPE node PUBLIC
+"-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
+"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
+
+<!--
+ GNOME Online Miners - crawls through your online content
+ Copyright (c) 2014 Pranav Kant
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301, USA.
+-->
+
+<node>
+ <interface name="com.intel.dLeynaServer.MediaDevice">
+ <method name="Cancel"></method>
+ <method name="GetIcon">
+ <arg type="s" name="RequestedMimeType" direction="in"></arg>
+ <arg type="s" name="Resolution" direction="in"></arg>
+ <arg type="ay" name="Bytes" direction="out"></arg>
+ <arg type="s" name="MimeType" direction="out"></arg>
+ </method>
+ <property type="s" name="DeviceType" access="read"></property>
+ <property type="s" name="UDN" access="read"></property>
+ <property type="s" name="FriendlyName" access="read"></property>
+ <property type="s" name="IconURL" access="read"></property>
+ <property type="s" name="Manufacturer" access="read"></property>
+ <property type="s" name="ManufacturerUrl" access="read"></property>
+ <property type="s" name="ModelDescription" access="read"></property>
+ <property type="s" name="ModelName" access="read"></property>
+ <property type="s" name="ModelNumber" access="read"></property>
+ <property type="s" name="SerialNumber" access="read"></property>
+ <property type="s" name="PresentationURL" access="read"></property>
+ <property type="s" name="ProtocolInfo" access="read"></property>
+ </interface>
+</node>
diff --git a/src/gom-media-server-miner-main.c b/src/gom-media-server-miner-main.c
new file mode 100644
index 0000000..b244411
--- /dev/null
+++ b/src/gom-media-server-miner-main.c
@@ -0,0 +1,33 @@
+/*
+ * GNOME Online Miners - crawls through your online content
+ * Copyright (c) 2014 Pranav Kant
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301, USA.
+ *
+ * Author: Pranav Kant <pranav913 gmail com>
+ *
+ */
+
+#include "config.h"
+
+#define INSIDE_MINER
+#define MINER_NAME "MEDIA_SERVER"
+#define MINER_TYPE GOM_TYPE_MEDIA_SERVER_MINER
+#define MINER_BUS_NAME "org.gnome.OnlineMiners.MediaServer"
+#define MINER_OBJECT_PATH "/org/gnome/OnlineMiners/MediaServer"
+
+#include "gom-media-server-miner.h"
+#include "gom-miner-main.c"
diff --git a/src/gom-media-server-miner.c b/src/gom-media-server-miner.c
new file mode 100644
index 0000000..863ef04
--- /dev/null
+++ b/src/gom-media-server-miner.c
@@ -0,0 +1,71 @@
+/*
+ * GNOME Online Miners - crawls through your online content
+ * Copyright (c) 2014 Pranav Kant
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301, USA.
+ *
+ * Author: Pranav Kant <pranav913 gmail com>
+ *
+ */
+
+#include "config.h"
+
+#include <goa/goa.h>
+
+#include "gom-media-server-miner.h"
+
+#define MINER_IDENTIFIER "gd:media-server:miner:a4a47a3e-eb55-11e3-b983-14feb59cfa0e"
+
+G_DEFINE_TYPE (GomMediaServerMiner, gom_media_server_miner, GOM_TYPE_MINER)
+
+static void
+query_media_server (GomAccountMinerJob *job,
+ GError **error)
+{
+}
+
+static GHashTable *
+create_services (GomMiner *self,
+ GoaObject *object)
+{
+ GHashTable *services;
+
+ services = g_hash_table_new_full (g_str_hash, g_str_equal,
+ NULL, (GDestroyNotify) g_object_unref);
+
+ if (gom_miner_supports_type (self, "photos"))
+ g_hash_table_insert (services, "photos", g_object_ref (object));
+
+ return services;
+}
+
+static void
+gom_media_server_miner_init (GomMediaServerMiner *miner)
+{
+}
+
+static void
+gom_media_server_miner_class_init (GomMediaServerMinerClass *klass)
+{
+ GomMinerClass *miner_class = GOM_MINER_CLASS (klass);
+
+ miner_class->goa_provider_type = "media_server";
+ miner_class->miner_identifier = MINER_IDENTIFIER;
+ miner_class->version = 1;
+
+ miner_class->create_services = create_services;
+ miner_class->query = query_media_server;
+}
diff --git a/src/gom-media-server-miner.h b/src/gom-media-server-miner.h
new file mode 100644
index 0000000..e6b4afb
--- /dev/null
+++ b/src/gom-media-server-miner.h
@@ -0,0 +1,69 @@
+/*
+ * GNOME Online Miners - crawls through your online content
+ * Copyright (c) 2014 Pranav Kant
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301, USA.
+ *
+ * Author: Pranav Kant <pranav913 gmail com>
+ *
+ */
+
+#ifndef __GOM_MEDIA_SERVER_MINER_H__
+#define __GOM_MEDIA_SERVER_MINER_H__
+
+#include <gio/gio.h>
+#include "gom-miner.h"
+
+G_BEGIN_DECLS
+
+#define GOM_TYPE_MEDIA_SERVER_MINER gom_media_server_miner_get_type()
+
+#define GOM_MEDIA_SERVER_MINER(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
+ GOM_TYPE_MEDIA_SERVER_MINER, GomMediaServerMiner))
+
+#define GOM_MEDIA_SERVER_MINER_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_CAST ((klass), \
+ GOM_TYPE_MEDIA_SERVER_MINER, GomMediaServerMinerClass))
+
+#define GOM_IS_MEDIA_SERVER_MINER(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
+ GOM_TYPE_MEDIA_SERVER_MINER))
+
+#define GOM_IS_MEDIA_SERVER_MINER_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_TYPE ((klass), \
+ GOM_TYPE_MEDIA_SERVER_MINER))
+
+#define GOM_MEDIA_SERVER_MINER_GET_CLASS(obj) \
+ (G_TYPE_INSTANCE_GET_CLASS ((obj), \
+ GOM_TYPE_MEDIA_SERVER_MINER, GomMediaServerMinerClass))
+
+typedef struct _GomMediaServerMiner GomMediaServerMiner;
+typedef struct _GomMediaServerMinerClass GomMediaServerMinerClass;
+
+struct _GomMediaServerMiner {
+ GomMiner parent;
+};
+
+struct _GomMediaServerMinerClass {
+ GomMinerClass parent_class;
+};
+
+GType gom_media_server_miner_get_type(void);
+
+G_END_DECLS
+
+#endif /* __GOM_MEDIA_SERVER_MINER_H__ */
diff --git a/src/gom-upnp-media-container2.xml b/src/gom-upnp-media-container2.xml
new file mode 100644
index 0000000..9b483f1
--- /dev/null
+++ b/src/gom-upnp-media-container2.xml
@@ -0,0 +1,117 @@
+<!DOCTYPE node PUBLIC
+"-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
+"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
+
+<!--
+ GNOME Online Miners - crawls through your online content
+ Copyright (c) 2014 Pranav Kant
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301, USA.
+-->
+
+<node>
+ <interface name="org.gnome.UPnP.MediaContainer2">
+ <method name="ListChildren">
+ <arg type="u" name="Offset" direction="in"></arg>
+ <arg type="u" name="Max" direction="in"></arg>
+ <arg type="as" name="Filter" direction="in"></arg>
+ <arg type="aa{sv}" name="Children" direction="out"></arg>
+ </method>
+ <method name="ListChildrenEx">
+ <arg type="u" name="Offset" direction="in"></arg>
+ <arg type="u" name="Max" direction="in"></arg>
+ <arg type="as" name="Filter" direction="in"></arg>
+ <arg type="s" name="SortBy" direction="in"></arg>
+ <arg type="aa{sv}" name="Children" direction="out"></arg>
+ </method>
+ <method name="ListContainers">
+ <arg type="u" name="Offset" direction="in"></arg>
+ <arg type="u" name="Max" direction="in"></arg>
+ <arg type="as" name="Filter" direction="in"></arg>
+ <arg type="aa{sv}" name="Children" direction="out"></arg>
+ </method>
+ <method name="ListContainersEx">
+ <arg type="u" name="Offset" direction="in"></arg>
+ <arg type="u" name="Max" direction="in"></arg>
+ <arg type="as" name="Filter" direction="in"></arg>
+ <arg type="s" name="SortBy" direction="in"></arg>
+ <arg type="aa{sv}" name="Children" direction="out"></arg>
+ </method>
+ <method name="ListItems">
+ <arg type="u" name="Offset" direction="in"></arg>
+ <arg type="u" name="Max" direction="in"></arg>
+ <arg type="as" name="Filter" direction="in"></arg>
+ <arg type="aa{sv}" name="Children" direction="out"></arg>
+ </method>
+ <method name="ListItemsEx">
+ <arg type="u" name="Offset" direction="in"></arg>
+ <arg type="u" name="Max" direction="in"></arg>
+ <arg type="as" name="Filter" direction="in"></arg>
+ <arg type="s" name="SortBy" direction="in"></arg>
+ <arg type="aa{sv}" name="Children" direction="out"></arg>
+ </method>
+ <method name="SearchObjects">
+ <arg type="s" name="Query" direction="in"> </arg>
+ <arg type="u" name="Offset" direction="in"></arg>
+ <arg type="u" name="Max" direction="in"></arg>
+ <arg type="as" name="Filter" direction="in"></arg>
+ <arg type="aa{sv}" name="Children" direction="out"></arg>
+ </method>
+ <method name="SearchObjectsEx">
+ <arg type="s" name="Query" direction="in"></arg>
+ <arg type="u" name="Offset" direction="in"></arg>
+ <arg type="u" name="Max" direction="in"></arg>
+ <arg type="as" name="Filter" direction="in"></arg>
+ <arg type="s" name="SortBy" direction="in"></arg>
+ <arg type="aa{sv}" name="Children" direction="out"></arg>
+ <arg type="u" name="TotalItems" direction="out"></arg>
+ </method>
+ <method name="Upload">
+ <arg type="s" name="DisplayName" direction="in"></arg>
+ <arg type="s" name="FilePath" direction="in"></arg>
+ <arg type="u" name="UploadId" direction="out"></arg>
+ <arg type="o" name="Path" direction="out"></arg>
+ </method>
+ <method name="CreateContainer">
+ <arg type="s" name="DisplayName" direction="in"></arg>
+ <arg type="s" name="Type" direction="in"></arg>
+ <arg type="as" name="ChildTypes" direction="in"></arg>
+ <arg type="o" name="Path" direction="out"></arg>
+ </method>
+ <method name="GetCompatibleResource">
+ <arg type="s" name="ProtocolInfo" direction="in"></arg>
+ <arg type="as" name="Filter" direction="in"></arg>
+ <arg type="a{sv}" name="Properties" direction="out"></arg>
+ </method>
+ <method name="CreateReference">
+ <arg type="o" name="Path" direction="in"></arg>
+ <arg type="o" name="RefPath" direction="out"></arg>
+ </method>
+ <property type="u" name="ChildCount" access="read"></property>
+ <property type="b" name="Searchable" access="read"></property>
+ <property type="a(sb)" name="CreateClasses" access="read"></property>
+ <property type="u" name="ContainerUpdateID" access="read"></property>
+ <property type="u" name="TotalDeletedChildCount" access="read"></property>
+ <property type="aa{sv}" name="Resources" access="read"></property>
+ <property type="as" name="URLs" access="read"></property>
+ <property type="s" name="MIMEType" access="read"></property>
+ <property type="s" name="DLNAProfile" access="read"></property>
+ <property type="a{sb}" name="DLNAConversion" access="read"></property>
+ <property type="a{sb}" name="DLNAOperation" access="read"></property>
+ <property type="a{sb}" name="DLNAFlags" access="read"></property>
+ <property type="x" name="Size" access="read"></property>
+ </interface>
+</node>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]