paul@9 | 1 | #pragma once |
paul@9 | 2 | |
paul@10 | 3 | #include <l4/sys/ipc.h> |
paul@10 | 4 | |
paul@10 | 5 | #include "opener_context_resource.h" |
paul@10 | 6 | #include "opener_interface.h" |
paul@9 | 7 | #include "paging.h" |
paul@9 | 8 | #include "pages.h" |
paul@10 | 9 | #include "resource.h" |
paul@9 | 10 | |
paul@9 | 11 | /* Support for providing access to files. */ |
paul@9 | 12 | |
paul@79 | 13 | class OpenerResource : public Resource, public Paging, public Opener |
paul@9 | 14 | { |
paul@9 | 15 | public: |
paul@79 | 16 | explicit OpenerResource(Pages *pages); |
paul@10 | 17 | |
paul@10 | 18 | /* Server details. */ |
paul@10 | 19 | |
paul@10 | 20 | int expected_items(); |
paul@9 | 21 | |
paul@10 | 22 | ipc_server_handler_type handler(); |
paul@10 | 23 | |
paul@10 | 24 | void *interface() |
paul@10 | 25 | { return static_cast<Opener *>(this); } |
paul@10 | 26 | |
paul@10 | 27 | /* Direct access methods. */ |
paul@9 | 28 | |
paul@79 | 29 | Pager *open(const char *path, flags_t flags); |
paul@10 | 30 | |
paul@10 | 31 | /* Opener interface methods. */ |
paul@10 | 32 | |
paul@10 | 33 | long context(l4_cap_idx_t *context); |
paul@9 | 34 | }; |
paul@9 | 35 | |
paul@9 | 36 | // vim: tabstop=4 expandtab shiftwidth=4 |