Skip to content

Commit

Permalink
Merge pull request #2025 from hioa-cs/v0.13.x
Browse files Browse the repository at this point in the history
v0.13.x into master
  • Loading branch information
alfreb authored Jan 23, 2019
2 parents 1850d74 + cc87322 commit 0efba18
Show file tree
Hide file tree
Showing 64 changed files with 2,836 additions and 661 deletions.
5 changes: 3 additions & 2 deletions api/fs/common.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

#include <memory>
#include <string>
#include <pmr>
#include <vector>
#include "path.hpp"
#include <common>
Expand All @@ -35,12 +36,12 @@ namespace fs {
/**
* @brief Shared vector used as a buffer within the filesystem subsystem
*/
using buffer_t = std::shared_ptr<std::vector<uint8_t>>;
using buffer_t = os::mem::buf_ptr;

/** Construct a shared vector **/
template <typename... Args>
buffer_t construct_buffer(Args&&... args) {
return std::make_shared<std::vector<uint8_t>> (std::forward<Args> (args)...);
return std::make_shared<os::mem::buffer> (std::forward<Args> (args)...);
}

/** Container types **/
Expand Down
5 changes: 3 additions & 2 deletions api/hw/block_device.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include <cstdint>
#include <delegate>
#include <memory>
#include <pmr>
#include <vector>

namespace hw {
Expand All @@ -32,7 +33,7 @@ namespace hw {
class Block_device {
public:
using block_t = uint64_t;
using buffer_t = std::shared_ptr<std::vector<uint8_t>>;
using buffer_t = os::mem::buf_ptr;
using on_read_func = delegate<void(buffer_t)>;
using on_write_func = delegate<void(bool error)>;

Expand Down Expand Up @@ -149,7 +150,7 @@ class Block_device {
* This functionality is not enabled by default, nor always supported
**/
virtual void write(block_t blk, buffer_t, on_write_func) = 0;

virtual bool write_sync(block_t blk, buffer_t) = 0;

/**
Expand Down
12 changes: 12 additions & 0 deletions api/net/botan/tls_server.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,18 @@ class Server : public Botan::TLS::Callbacks, public net::Stream
m_transport->on_read(bs, {this, &Server::tls_read});
this->m_on_read = cb;
}
void on_data(DataCallback cb) override {
// FIXME
throw std::runtime_error("on_data not implemented on botan::server");
}
size_t next_size() override {
// FIXME
throw std::runtime_error("next_size not implemented on botan::server");
}
buffer_t read_next() override {
// FIXME
throw std::runtime_error("read_next not implemented on botan::server");
}
void on_write(WriteCallback cb) override {
this->m_on_write = cb;
}
Expand Down
Loading

0 comments on commit 0efba18

Please sign in to comment.