# HG changeset patch # User Paul Boddie # Date 1634420472 -7200 # Node ID c9eb29eecf6972f339f08e2e135642094bd908aa # Parent 20d95266049cceea415e3607a1fc99f45afc1b47 Renamed FileNotification to Provider. diff -r 20d95266049c -r c9eb29eecf69 libfsserver/include/fsserver/directory_provider.h --- a/libfsserver/include/fsserver/directory_provider.h Sat Oct 16 22:11:11 2021 +0200 +++ b/libfsserver/include/fsserver/directory_provider.h Sat Oct 16 23:41:12 2021 +0200 @@ -22,13 +22,13 @@ #pragma once #include -#include +#include /* An object providing access to directory functionality. */ -class DirectoryProvider : public FileNotification +class DirectoryProvider : public Provider { protected: DirectoryAccessor *_accessor; diff -r 20d95266049c -r c9eb29eecf69 libfsserver/include/fsserver/file_notification.h --- a/libfsserver/include/fsserver/file_notification.h Sat Oct 16 22:11:11 2021 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,39 +0,0 @@ -/* - * File-specific notification support. - * - * Copyright (C) 2021 Paul Boddie - * - * 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 - */ - -#pragma once - -#include - -#include -#include - - - -/* Notification support for files. */ - -class FileNotification : public NotificationSupport, public Accountable -{ -public: - explicit FileNotification(); -}; - -// vim: tabstop=4 expandtab shiftwidth=4 diff -r 20d95266049c -r c9eb29eecf69 libfsserver/include/fsserver/file_provider.h --- a/libfsserver/include/fsserver/file_provider.h Sat Oct 16 22:11:11 2021 +0200 +++ b/libfsserver/include/fsserver/file_provider.h Sat Oct 16 23:41:12 2021 +0200 @@ -21,14 +21,14 @@ #pragma once -#include #include +#include /* An object providing access to file functionality. */ -class FileProvider : public FileNotification +class FileProvider : public Provider { protected: PageMapper *_mapper; diff -r 20d95266049c -r c9eb29eecf69 libfsserver/include/fsserver/provider.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libfsserver/include/fsserver/provider.h Sat Oct 16 23:41:12 2021 +0200 @@ -0,0 +1,37 @@ +/* + * Filesystem object provider support. + * + * Copyright (C) 2021 Paul Boddie + * + * 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 + */ + +#pragma once + +#include +#include + + + +/* A provider offering notification support and accounting capabilities. */ + +class Provider : public NotificationSupport, public Accountable +{ +public: + explicit Provider(); +}; + +// vim: tabstop=4 expandtab shiftwidth=4 diff -r 20d95266049c -r c9eb29eecf69 libfsserver/lib/Makefile --- a/libfsserver/lib/Makefile Sat Oct 16 22:11:11 2021 +0200 +++ b/libfsserver/lib/Makefile Sat Oct 16 23:41:12 2021 +0200 @@ -56,7 +56,6 @@ files/ext2_file_opener.cc \ files/ext2_file_operations.cc \ files/ext2_filesystem.cc \ - files/file_notification.cc \ files/file_object_registry.cc \ files/file_pager.cc \ files/file_provider.cc \ @@ -72,6 +71,7 @@ generic/accountable.cc \ generic/notification.cc \ generic/pager.cc \ + generic/provider.cc \ generic/resource_server.cc \ generic/simple_pager.cc \ mapping/access_map.cc \ diff -r 20d95266049c -r c9eb29eecf69 libfsserver/lib/directories/directory_provider.cc --- a/libfsserver/lib/directories/directory_provider.cc Sat Oct 16 22:11:11 2021 +0200 +++ b/libfsserver/lib/directories/directory_provider.cc Sat Oct 16 23:41:12 2021 +0200 @@ -26,7 +26,7 @@ /* Initialise the provider. */ DirectoryProvider::DirectoryProvider(DirectoryAccessor *accessor) -: FileNotification(), _accessor(accessor) +: Provider(), _accessor(accessor) { } diff -r 20d95266049c -r c9eb29eecf69 libfsserver/lib/files/file_notification.cc --- a/libfsserver/lib/files/file_notification.cc Sat Oct 16 22:11:11 2021 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,31 +0,0 @@ -/* - * Notification support for files. - * - * Copyright (C) 2021 Paul Boddie - * - * 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 - */ - -#include "file_notification.h" - - - -FileNotification::FileNotification() -: NotificationSupport() -{ -} - -// vim: tabstop=4 expandtab shiftwidth=4 diff -r 20d95266049c -r c9eb29eecf69 libfsserver/lib/files/file_provider.cc --- a/libfsserver/lib/files/file_provider.cc Sat Oct 16 22:11:11 2021 +0200 +++ b/libfsserver/lib/files/file_provider.cc Sat Oct 16 23:41:12 2021 +0200 @@ -26,7 +26,7 @@ /* Initialise the provider with a page 'mapper' for the file's contents. */ FileProvider::FileProvider(PageMapper *mapper) -: FileNotification(), _mapper(mapper) +: Provider(), _mapper(mapper) { } diff -r 20d95266049c -r c9eb29eecf69 libfsserver/lib/generic/provider.cc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libfsserver/lib/generic/provider.cc Sat Oct 16 23:41:12 2021 +0200 @@ -0,0 +1,31 @@ +/* + * Provider support for filesystem objects. + * + * Copyright (C) 2021 Paul Boddie + * + * 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 + */ + +#include "provider.h" + + + +Provider::Provider() +: NotificationSupport() +{ +} + +// vim: tabstop=4 expandtab shiftwidth=4