// Copyright 2015 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef MINIBIND_CHANNEL_H_ #define MINIBIND_CHANNEL_H_ #include #include #include "parcel.h" namespace minibind { class Command; class Channel { public: explicit Channel(uint32_t handle); ~Channel(); void QueueCommand(Command* cmd); int TransactCommands(); Parcel* reader() { return &reader_; } uint32_t handle() const { return handle_; } const std::vector& write_commands() const { return write_commands_; } private: uint32_t handle_; int driver_; Parcel reader_; size_t write_commands_size_; std::vector write_commands_; }; } // namespace minibind #endif // MINIBIND_CHANNEL_H_