L4Re/departure

test_file_opener.h

10:54182479d4bd
2021-02-01 Paul Boddie Made the opener, opener context and file pager resources, introducing the resource server functionality as a wrapper around server configurations. Introduced testing of the opener-related abstractions.
     1 #pragma once     2      3 #include "opener_resource.h"     4      5 /* Support for providing access to files. */     6      7 class TestFileOpener : public OpenerResource     8 {     9 protected:    10     offset_t _file_size;    11     12     /* Configurable methods. */    13     14     virtual fileid_t get_fileid(const char *path);    15     16     virtual Accessor *make_accessor(fileid_t fileid);    17     18 public:    19     explicit TestFileOpener(Accessing *accessing, Paging *paging, Pages *pages,    20                             offset_t file_size=0);    21 };    22     23 // vim: tabstop=4 expandtab shiftwidth=4