[tracker-miners/sam/test-removable-devices] Update vol mon code
- From: Sam Thursfield <sthursfield src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker-miners/sam/test-removable-devices] Update vol mon code
- Date: Wed, 18 Aug 2021 12:19:03 +0000 (UTC)
commit 75f6db28c6b56a554c7f6300b237459075c86c2d
Author: Sam Thursfield <sam afuera me uk>
Date: Wed Aug 18 14:18:29 2021 +0200
Update vol mon code
.../mockvolumemonitor/mock-drive.c | 22 +++++++++++++++
.../mockvolumemonitor/mock-drive.h | 22 +++++++++++++++
.../mockvolumemonitor/mock-mount.c | 21 +++++++++++++++
.../mockvolumemonitor/mock-mount.h | 21 +++++++++++++++
.../mockvolumemonitor/mock-volume-monitor.c | 31 +++++++++++++++++++---
.../mockvolumemonitor/mock-volume-monitor.h | 21 +++++++++++++++
.../mockvolumemonitor/mock-volume.c | 23 ++++++++++++++++
.../mockvolumemonitor/mock-volume.h | 21 +++++++++++++++
8 files changed, 179 insertions(+), 3 deletions(-)
---
diff --git a/tests/functional-tests/mockvolumemonitor/mock-drive.c
b/tests/functional-tests/mockvolumemonitor/mock-drive.c
index 0ab2c9716..fe12095a4 100644
--- a/tests/functional-tests/mockvolumemonitor/mock-drive.c
+++ b/tests/functional-tests/mockvolumemonitor/mock-drive.c
@@ -1,3 +1,24 @@
+/*
+ * Copyright (C) 2021, Codethink Ltd
+ *
+ * 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: Sam Thursfield <sam afuera me uk>
+ */
+
#include <glib.h>
#include <gio/gio.h>
@@ -46,6 +67,7 @@ mock_drive_init (MockDrive *drive)
{
}
+static void
emit_changed (MockDrive *drive)
{
g_signal_emit_by_name (drive, "changed");
diff --git a/tests/functional-tests/mockvolumemonitor/mock-drive.h
b/tests/functional-tests/mockvolumemonitor/mock-drive.h
index 0dee6820f..ac6d186fd 100644
--- a/tests/functional-tests/mockvolumemonitor/mock-drive.h
+++ b/tests/functional-tests/mockvolumemonitor/mock-drive.h
@@ -1,3 +1,25 @@
+/*
+ * Copyright (C) 2021, Codethink Ltd
+ *
+ * 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: Sam Thursfield <sam afuera me uk>
+ */
+
+
#ifndef __MOCK_DRIVE_H__
#define __MOCK_DRIVE_H__
diff --git a/tests/functional-tests/mockvolumemonitor/mock-mount.c
b/tests/functional-tests/mockvolumemonitor/mock-mount.c
index 053533f68..fa7955f4a 100644
--- a/tests/functional-tests/mockvolumemonitor/mock-mount.c
+++ b/tests/functional-tests/mockvolumemonitor/mock-mount.c
@@ -1,3 +1,24 @@
+/*
+ * Copyright (C) 2021, Codethink Ltd
+ *
+ * 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: Sam Thursfield <sam afuera me uk>
+ */
+
#include <glib.h>
#include <gio/gio.h>
diff --git a/tests/functional-tests/mockvolumemonitor/mock-mount.h
b/tests/functional-tests/mockvolumemonitor/mock-mount.h
index 17938443b..88bfeff75 100644
--- a/tests/functional-tests/mockvolumemonitor/mock-mount.h
+++ b/tests/functional-tests/mockvolumemonitor/mock-mount.h
@@ -1,3 +1,24 @@
+/*
+ * Copyright (C) 2021, Codethink Ltd
+ *
+ * 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: Sam Thursfield <sam afuera me uk>
+ */
+
#ifndef __MOCK_MOUNT_H__
#define __MOCK_MOUNT_H__
diff --git a/tests/functional-tests/mockvolumemonitor/mock-volume-monitor.c
b/tests/functional-tests/mockvolumemonitor/mock-volume-monitor.c
index a98893335..ba6dc92d6 100644
--- a/tests/functional-tests/mockvolumemonitor/mock-volume-monitor.c
+++ b/tests/functional-tests/mockvolumemonitor/mock-volume-monitor.c
@@ -1,3 +1,24 @@
+/*
+ * Copyright (C) 2021, Codethink Ltd
+ *
+ * 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: Sam Thursfield <sam afuera me uk>
+ */
+
#include "mock-volume-monitor.h"
#include "mock-drive.h"
#include "mock-volume.h"
@@ -105,12 +126,12 @@ remove_mock_mount (MockVolumeMonitor *self, const gchar *uri)
* Used by tests to control the MockVolumeMonitor object.
*/
-#define BUS_NAME "org.freedesktop.Tracker.MockVolumeMonitor"
-#define BUS_PATH "/org/freedesktop/Tracker/MockVolumeMonitor"
+#define BUS_NAME "org.freedesktop.Tracker3.MockVolumeMonitor"
+#define BUS_PATH "/org/freedesktop/Tracker3/MockVolumeMonitor"
static const gchar dbus_xml[] =
"<node>"
- " <interface name='org.freedesktop.Tracker.MockVolumeMonitor'>"
+ " <interface name='org.freedesktop.Tracker3.MockVolumeMonitor'>"
" <method name='AddMount'>"
" <arg type='s' name='path' direction='in' />"
" </method>"
@@ -139,12 +160,16 @@ on_dbus_method_call (GDBusConnection *connection,
g_variant_get (parameters, "(s)", &uri);
add_mock_mount (self, uri);
+
+ g_dbus_method_invocation_return_value (invocation, NULL);
} else if (g_strcmp0 (method_name, "RemoveMount") == 0) {
g_autofree gchar *uri = NULL;
g_variant_get (parameters, "(s)", &uri);
remove_mock_mount (self, uri);
+
+ g_dbus_method_invocation_return_value (invocation, NULL);
} else {
g_dbus_method_invocation_return_error (invocation,
G_DBUS_ERROR,
diff --git a/tests/functional-tests/mockvolumemonitor/mock-volume-monitor.h
b/tests/functional-tests/mockvolumemonitor/mock-volume-monitor.h
index 6728bc81b..740978edf 100644
--- a/tests/functional-tests/mockvolumemonitor/mock-volume-monitor.h
+++ b/tests/functional-tests/mockvolumemonitor/mock-volume-monitor.h
@@ -1,3 +1,24 @@
+/*
+ * Copyright (C) 2021, Codethink Ltd
+ *
+ * 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: Sam Thursfield <sam afuera me uk>
+ */
+
#ifndef __MOCK_VOLUME_MONITOR_H__
#define __MOCK_VOLUME_MONITOR_H__
diff --git a/tests/functional-tests/mockvolumemonitor/mock-volume.c
b/tests/functional-tests/mockvolumemonitor/mock-volume.c
index 8cd24c6cd..b9773bbaa 100644
--- a/tests/functional-tests/mockvolumemonitor/mock-volume.c
+++ b/tests/functional-tests/mockvolumemonitor/mock-volume.c
@@ -1,7 +1,30 @@
+/*
+ * Copyright (C) 2021, Codethink Ltd
+ *
+ * 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: Sam Thursfield <sam afuera me uk>
+ */
+
#include <glib.h>
#include <gio/gio.h>
#include "mock-volume.h"
+#include "mock-mount.h"
+#include "mock-drive.h"
struct _MockVolume
{
diff --git a/tests/functional-tests/mockvolumemonitor/mock-volume.h
b/tests/functional-tests/mockvolumemonitor/mock-volume.h
index 9d9c23bc4..9cb655666 100644
--- a/tests/functional-tests/mockvolumemonitor/mock-volume.h
+++ b/tests/functional-tests/mockvolumemonitor/mock-volume.h
@@ -1,3 +1,24 @@
+/*
+ * Copyright (C) 2021, Codethink Ltd
+ *
+ * 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: Sam Thursfield <sam afuera me uk>
+ */
+
#ifndef __MOCK_VOLUME_H__
#define __MOCK_VOLUME_H__
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]