1.1 --- a/libfsserver/include/fsserver/directory_provider.h Sat Oct 16 22:11:11 2021 +0200
1.2 +++ b/libfsserver/include/fsserver/directory_provider.h Sat Oct 16 23:41:12 2021 +0200
1.3 @@ -22,13 +22,13 @@
1.4 #pragma once
1.5
1.6 #include <fsserver/directory_accessor.h>
1.7 -#include <fsserver/file_notification.h>
1.8 +#include <fsserver/provider.h>
1.9
1.10
1.11
1.12 /* An object providing access to directory functionality. */
1.13
1.14 -class DirectoryProvider : public FileNotification
1.15 +class DirectoryProvider : public Provider
1.16 {
1.17 protected:
1.18 DirectoryAccessor *_accessor;
2.1 --- a/libfsserver/include/fsserver/file_notification.h Sat Oct 16 22:11:11 2021 +0200
2.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
2.3 @@ -1,39 +0,0 @@
2.4 -/*
2.5 - * File-specific notification support.
2.6 - *
2.7 - * Copyright (C) 2021 Paul Boddie <paul@boddie.org.uk>
2.8 - *
2.9 - * This program is free software; you can redistribute it and/or
2.10 - * modify it under the terms of the GNU General Public License as
2.11 - * published by the Free Software Foundation; either version 2 of
2.12 - * the License, or (at your option) any later version.
2.13 - *
2.14 - * This program is distributed in the hope that it will be useful,
2.15 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
2.16 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2.17 - * GNU General Public License for more details.
2.18 - *
2.19 - * You should have received a copy of the GNU General Public License
2.20 - * along with this program; if not, write to the Free Software
2.21 - * Foundation, Inc., 51 Franklin Street, Fifth Floor,
2.22 - * Boston, MA 02110-1301, USA
2.23 - */
2.24 -
2.25 -#pragma once
2.26 -
2.27 -#include <mutex>
2.28 -
2.29 -#include <fsserver/accountable.h>
2.30 -#include <fsserver/notification.h>
2.31 -
2.32 -
2.33 -
2.34 -/* Notification support for files. */
2.35 -
2.36 -class FileNotification : public NotificationSupport, public Accountable
2.37 -{
2.38 -public:
2.39 - explicit FileNotification();
2.40 -};
2.41 -
2.42 -// vim: tabstop=4 expandtab shiftwidth=4
3.1 --- a/libfsserver/include/fsserver/file_provider.h Sat Oct 16 22:11:11 2021 +0200
3.2 +++ b/libfsserver/include/fsserver/file_provider.h Sat Oct 16 23:41:12 2021 +0200
3.3 @@ -21,14 +21,14 @@
3.4
3.5 #pragma once
3.6
3.7 -#include <fsserver/file_notification.h>
3.8 #include <fsserver/page_mapper.h>
3.9 +#include <fsserver/provider.h>
3.10
3.11
3.12
3.13 /* An object providing access to file functionality. */
3.14
3.15 -class FileProvider : public FileNotification
3.16 +class FileProvider : public Provider
3.17 {
3.18 protected:
3.19 PageMapper *_mapper;
4.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
4.2 +++ b/libfsserver/include/fsserver/provider.h Sat Oct 16 23:41:12 2021 +0200
4.3 @@ -0,0 +1,37 @@
4.4 +/*
4.5 + * Filesystem object provider support.
4.6 + *
4.7 + * Copyright (C) 2021 Paul Boddie <paul@boddie.org.uk>
4.8 + *
4.9 + * This program is free software; you can redistribute it and/or
4.10 + * modify it under the terms of the GNU General Public License as
4.11 + * published by the Free Software Foundation; either version 2 of
4.12 + * the License, or (at your option) any later version.
4.13 + *
4.14 + * This program is distributed in the hope that it will be useful,
4.15 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
4.16 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4.17 + * GNU General Public License for more details.
4.18 + *
4.19 + * You should have received a copy of the GNU General Public License
4.20 + * along with this program; if not, write to the Free Software
4.21 + * Foundation, Inc., 51 Franklin Street, Fifth Floor,
4.22 + * Boston, MA 02110-1301, USA
4.23 + */
4.24 +
4.25 +#pragma once
4.26 +
4.27 +#include <fsserver/accountable.h>
4.28 +#include <fsserver/notification.h>
4.29 +
4.30 +
4.31 +
4.32 +/* A provider offering notification support and accounting capabilities. */
4.33 +
4.34 +class Provider : public NotificationSupport, public Accountable
4.35 +{
4.36 +public:
4.37 + explicit Provider();
4.38 +};
4.39 +
4.40 +// vim: tabstop=4 expandtab shiftwidth=4
5.1 --- a/libfsserver/lib/Makefile Sat Oct 16 22:11:11 2021 +0200
5.2 +++ b/libfsserver/lib/Makefile Sat Oct 16 23:41:12 2021 +0200
5.3 @@ -56,7 +56,6 @@
5.4 files/ext2_file_opener.cc \
5.5 files/ext2_file_operations.cc \
5.6 files/ext2_filesystem.cc \
5.7 - files/file_notification.cc \
5.8 files/file_object_registry.cc \
5.9 files/file_pager.cc \
5.10 files/file_provider.cc \
5.11 @@ -72,6 +71,7 @@
5.12 generic/accountable.cc \
5.13 generic/notification.cc \
5.14 generic/pager.cc \
5.15 + generic/provider.cc \
5.16 generic/resource_server.cc \
5.17 generic/simple_pager.cc \
5.18 mapping/access_map.cc \
6.1 --- a/libfsserver/lib/directories/directory_provider.cc Sat Oct 16 22:11:11 2021 +0200
6.2 +++ b/libfsserver/lib/directories/directory_provider.cc Sat Oct 16 23:41:12 2021 +0200
6.3 @@ -26,7 +26,7 @@
6.4 /* Initialise the provider. */
6.5
6.6 DirectoryProvider::DirectoryProvider(DirectoryAccessor *accessor)
6.7 -: FileNotification(), _accessor(accessor)
6.8 +: Provider(), _accessor(accessor)
6.9 {
6.10 }
6.11
7.1 --- a/libfsserver/lib/files/file_notification.cc Sat Oct 16 22:11:11 2021 +0200
7.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
7.3 @@ -1,31 +0,0 @@
7.4 -/*
7.5 - * Notification support for files.
7.6 - *
7.7 - * Copyright (C) 2021 Paul Boddie <paul@boddie.org.uk>
7.8 - *
7.9 - * This program is free software; you can redistribute it and/or
7.10 - * modify it under the terms of the GNU General Public License as
7.11 - * published by the Free Software Foundation; either version 2 of
7.12 - * the License, or (at your option) any later version.
7.13 - *
7.14 - * This program is distributed in the hope that it will be useful,
7.15 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
7.16 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7.17 - * GNU General Public License for more details.
7.18 - *
7.19 - * You should have received a copy of the GNU General Public License
7.20 - * along with this program; if not, write to the Free Software
7.21 - * Foundation, Inc., 51 Franklin Street, Fifth Floor,
7.22 - * Boston, MA 02110-1301, USA
7.23 - */
7.24 -
7.25 -#include "file_notification.h"
7.26 -
7.27 -
7.28 -
7.29 -FileNotification::FileNotification()
7.30 -: NotificationSupport()
7.31 -{
7.32 -}
7.33 -
7.34 -// vim: tabstop=4 expandtab shiftwidth=4
8.1 --- a/libfsserver/lib/files/file_provider.cc Sat Oct 16 22:11:11 2021 +0200
8.2 +++ b/libfsserver/lib/files/file_provider.cc Sat Oct 16 23:41:12 2021 +0200
8.3 @@ -26,7 +26,7 @@
8.4 /* Initialise the provider with a page 'mapper' for the file's contents. */
8.5
8.6 FileProvider::FileProvider(PageMapper *mapper)
8.7 -: FileNotification(), _mapper(mapper)
8.8 +: Provider(), _mapper(mapper)
8.9 {
8.10 }
8.11
9.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
9.2 +++ b/libfsserver/lib/generic/provider.cc Sat Oct 16 23:41:12 2021 +0200
9.3 @@ -0,0 +1,31 @@
9.4 +/*
9.5 + * Provider support for filesystem objects.
9.6 + *
9.7 + * Copyright (C) 2021 Paul Boddie <paul@boddie.org.uk>
9.8 + *
9.9 + * This program is free software; you can redistribute it and/or
9.10 + * modify it under the terms of the GNU General Public License as
9.11 + * published by the Free Software Foundation; either version 2 of
9.12 + * the License, or (at your option) any later version.
9.13 + *
9.14 + * This program is distributed in the hope that it will be useful,
9.15 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
9.16 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9.17 + * GNU General Public License for more details.
9.18 + *
9.19 + * You should have received a copy of the GNU General Public License
9.20 + * along with this program; if not, write to the Free Software
9.21 + * Foundation, Inc., 51 Franklin Street, Fifth Floor,
9.22 + * Boston, MA 02110-1301, USA
9.23 + */
9.24 +
9.25 +#include "provider.h"
9.26 +
9.27 +
9.28 +
9.29 +Provider::Provider()
9.30 +: NotificationSupport()
9.31 +{
9.32 +}
9.33 +
9.34 +// vim: tabstop=4 expandtab shiftwidth=4