[tracker/miner-web: 23/31] TrackerMinerWeb: Added empty implementation.
- From: Adrien Bustany <abustany src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [tracker/miner-web: 23/31] TrackerMinerWeb: Added empty implementation.
- Date: Thu, 12 Nov 2009 20:39:58 +0000 (UTC)
commit c2c7afa410136db6d10f1ffb5da2cd9686e2633c
Author: Carlos Garnacho <carlos lanedo com>
Date: Fri Nov 6 15:47:32 2009 +0100
TrackerMinerWeb: Added empty implementation.
This already features an extra DBus interface for dealing with authentication.
data/dbus/tracker-miner-web.xml | 52 ++++++++++++++++++++++
src/libtracker-miner/tracker-miner-web-dbus.h | 37 +++++++++++++++
src/libtracker-miner/tracker-miner-web.c | 59 +++++++++++++++++++++++++
src/libtracker-miner/tracker-miner-web.h | 54 ++++++++++++++++++++++
4 files changed, 202 insertions(+), 0 deletions(-)
---
diff --git a/data/dbus/tracker-miner-web.xml b/data/dbus/tracker-miner-web.xml
new file mode 100644
index 0000000..d2b8c52
--- /dev/null
+++ b/data/dbus/tracker-miner-web.xml
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<node name="/">
+ <interface name="org.freedesktop.Tracker1.Miner">
+ <annotation name="org.freedesktop.DBus.GLib.CSymbol" value="tracker_miner_dbus"/>
+ <method name="GetStatus">
+ <annotation name="org.freedesktop.DBus.GLib.Async" value="true"/>
+ <arg type="s" name="status" direction="out" />
+ </method>
+ <method name="GetProgress">
+ <annotation name="org.freedesktop.DBus.GLib.Async" value="true"/>
+ <arg type="d" name="progress" direction="out" />
+ </method>
+ <method name="GetPauseDetails">
+ <annotation name="org.freedesktop.DBus.GLib.Async" value="true"/>
+ <arg type="as" name="pause_applications" direction="out" />
+ <arg type="as" name="pause_reasons" direction="out" />
+ </method>
+ <method name="Pause">
+ <annotation name="org.freedesktop.DBus.GLib.Async" value="true"/>
+ <arg type="s" name="application" direction="in" />
+ <arg type="s" name="reason" direction="in" />
+ <arg type="i" name="cookie" direction="out" />
+ </method>
+ <method name="Resume">
+ <annotation name="org.freedesktop.DBus.GLib.Async" value="true"/>
+ <arg type="i" name="cookie" direction="in" />
+ </method>
+
+ <!-- Signals -->
+ <signal name="Started" />
+ <signal name="Stopped">
+ <arg type="b" name="interrupted" />
+ </signal>
+ <signal name="Paused" />
+ <signal name="Resumed" />
+ <signal name="Progress">
+ <arg type="s" name="status" />
+ <arg type="d" name="progress" />
+ </signal>
+ <signal name="Error">
+ <arg type="i" name="code"/>
+ <arg type="s" name="reason"/>
+ </signal>
+ </interface>
+
+ <interface name="org.freedesktop.Tracker1.Miner.Web">
+ <method name="Authenticate">
+ <annotation name="org.freedesktop.DBus.GLib.Async" value="true"/>
+ </method>
+ </interface>
+</node>
diff --git a/src/libtracker-miner/tracker-miner-web-dbus.h b/src/libtracker-miner/tracker-miner-web-dbus.h
new file mode 100644
index 0000000..829a997
--- /dev/null
+++ b/src/libtracker-miner/tracker-miner-web-dbus.h
@@ -0,0 +1,37 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
+ * Copyright (C) 2009, Nokia (urho konttori nokia com)
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __LIBTRACKERMINER_WEB_DBUS_H__
+#define __LIBTRACKERMINER_WEB_DBUS_H__
+
+#include <glib-object.h>
+
+#include "tracker-miner-dbus.h"
+#include "tracker-miner-web.h"
+
+G_BEGIN_DECLS
+
+void tracker_miner_web_authenticate (TrackerMinerWeb *web,
+ DBusGMethodInvocation *context,
+ GError **error);
+
+G_END_DECLS
+
+#endif /* __LIBTRACKERMINER_DBUS_H__ */
diff --git a/src/libtracker-miner/tracker-miner-web.c b/src/libtracker-miner/tracker-miner-web.c
new file mode 100644
index 0000000..d321f98
--- /dev/null
+++ b/src/libtracker-miner/tracker-miner-web.c
@@ -0,0 +1,59 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
+ * Copyright (C) 2009, Nokia (urho konttori nokia com)
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include "tracker-miner-web.h"
+#include "tracker-dbus.h"
+#include "tracker-miner-web-dbus.h"
+#include "tracker-miner-web-glue.h"
+
+static void tracker_miner_web_constructed (GObject *object);
+
+
+G_DEFINE_ABSTRACT_TYPE (TrackerMinerWeb, tracker_miner_web, TRACKER_TYPE_MINER)
+
+static void
+tracker_miner_web_class_init (TrackerMinerWebClass *klass)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+ object_class->constructed = tracker_miner_web_constructed;
+}
+
+static void
+tracker_miner_web_init (TrackerMinerWeb *klass)
+{
+
+}
+
+static void
+tracker_miner_web_constructed (GObject *object)
+{
+ tracker_miner_dbus_init (TRACKER_MINER (object),
+ &dbus_glib_tracker_miner_web_object_info);
+
+ G_OBJECT_CLASS (tracker_miner_web_parent_class)->constructed (object);
+}
+
+void
+tracker_miner_web_authenticate (TrackerMinerWeb *web,
+ DBusGMethodInvocation *context,
+ GError **error)
+{
+}
diff --git a/src/libtracker-miner/tracker-miner-web.h b/src/libtracker-miner/tracker-miner-web.h
new file mode 100644
index 0000000..0dac054
--- /dev/null
+++ b/src/libtracker-miner/tracker-miner-web.h
@@ -0,0 +1,54 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
+ * Copyright (C) 2009, Nokia (urho konttori nokia com)
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __TRACKER_MINER_WEB_H__
+#define __TRACKER_MINER_WEB_H__
+
+#include <libtracker-miner/tracker-miner.h>
+
+G_BEGIN_DECLS
+
+#define TRACKER_TYPE_MINER_WEB (tracker_miner_web_get_type())
+#define TRACKER_MINER_WEB(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), TRACKER_TYPE_MINER_WEB, TrackerMinerWeb))
+#define TRACKER_MINER_WEB_CLASS(c) (G_TYPE_CHECK_CLASS_CAST ((c), TRACKER_TYPE_MINER_WEB, TrackerMinerWebClass))
+#define TRACKER_IS_MINER_WEB(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), TRACKER_TYPE_MINER_WEB))
+#define TRACKER_IS_MINER_WEB_CLASS(c) (G_TYPE_CHECK_CLASS_TYPE ((c), TRACKER_TYPE_MINER_WEB))
+#define TRACKER_MINER_WEB_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), TRACKER_TYPE_MINER_WEB, TrackerMinerWebClass))
+
+typedef struct TrackerMinerWeb TrackerMinerWeb;
+typedef struct TrackerMinerWebPrivate TrackerMinerWebPrivate;
+
+struct TrackerMinerWeb {
+ TrackerMiner parent_instance;
+};
+
+typedef struct {
+ TrackerMinerClass parent_class;
+
+ /* vmethods */
+ void (*authenticate) (TrackerMinerWeb *miner);
+} TrackerMinerWebClass;
+
+GType tracker_miner_web_get_type (void) G_GNUC_CONST;
+
+
+G_END_DECLS
+
+#endif /* __TRACKER_MINER_WEB_H__ */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]