1.1 --- a/opener_resource.h Sun Mar 28 23:16:12 2021 +0200
1.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
1.3 @@ -1,56 +0,0 @@
1.4 -#pragma once
1.5 -
1.6 -#include <l4/sys/ipc.h>
1.7 -
1.8 -#include "accessing.h"
1.9 -#include "file_pager.h"
1.10 -#include "opener_context_resource.h"
1.11 -#include "opener_interface.h"
1.12 -#include "pager.h"
1.13 -#include "paging.h"
1.14 -#include "pages.h"
1.15 -#include "resource.h"
1.16 -
1.17 -/* Support for providing access to files. */
1.18 -
1.19 -class OpenerResource : public Resource, public Opener
1.20 -{
1.21 -protected:
1.22 - Accessing *_accessing;
1.23 - Paging *_paging;
1.24 - Pages *_pages;
1.25 -
1.26 - /* Convenience methods. */
1.27 -
1.28 - Accessor *get_accessor(fileid_t fileid);
1.29 -
1.30 - PageMapper *get_mapper(Accessor *accessor);
1.31 -
1.32 - /* Configurable methods. */
1.33 -
1.34 - virtual fileid_t get_fileid(const char *path) = 0;
1.35 -
1.36 - virtual Accessor *make_accessor(fileid_t fileid) = 0;
1.37 -
1.38 -public:
1.39 - explicit OpenerResource(Accessing *accessing, Paging *paging, Pages *pages);
1.40 -
1.41 - /* Server details. */
1.42 -
1.43 - int expected_items();
1.44 -
1.45 - ipc_server_handler_type handler();
1.46 -
1.47 - void *interface()
1.48 - { return static_cast<Opener *>(this); }
1.49 -
1.50 - /* Direct access methods. */
1.51 -
1.52 - FilePager *open(const char *path, flags_t flags);
1.53 -
1.54 - /* Opener interface methods. */
1.55 -
1.56 - long context(l4_cap_idx_t *context);
1.57 -};
1.58 -
1.59 -// vim: tabstop=4 expandtab shiftwidth=4