/* * \brief Client-side RAM session interface * \author Norman Feske * \date 2006-05-31 */ /* * Copyright (C) 2006-2017 Genode Labs GmbH * * This file is part of the Genode OS framework, which is distributed * under the terms of the GNU Affero General Public License version 3. */ #ifndef _INCLUDE__RAM_SESSION__CLIENT_H_ #define _INCLUDE__RAM_SESSION__CLIENT_H_ #include #include #include namespace Genode { struct Ram_session_client; } struct Genode::Ram_session_client : Rpc_client { explicit Ram_session_client(Ram_session_capability session) : Rpc_client(session) { } Ram_dataspace_capability alloc(size_t size, Cache_attribute cached = CACHED) override { return call(size, cached); } void free(Ram_dataspace_capability ds) override { call(ds); } size_t dataspace_size(Ram_dataspace_capability ds) const override { return ds.valid() ? Dataspace_client(ds).size() : 0; } void ref_account(Ram_session_capability ram_session) override { call(ram_session); } void transfer_quota(Ram_session_capability ram_session, Ram_quota amount) override { call(ram_session, amount); } Ram_quota ram_quota() const override { return call(); } Ram_quota used_ram() const override { return call(); } }; #endif /* _INCLUDE__RAM_SESSION__CLIENT_H_ */