Chris Masone | c1e5041 | 2011-06-07 13:04:53 -0700 | [diff] [blame] | 1 | // Copyright (c) 2011 The Chromium OS Authors. All rights reserved. |
Paul Stewart | 25379f1 | 2011-05-26 06:41:38 -0700 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #ifndef SHILL_IO_HANDLER_ |
| 6 | #define SHILL_IO_HANDLER_ |
| 7 | |
| 8 | namespace shill { |
| 9 | |
| 10 | struct InputData { |
Darin Petkov | 633ac6f | 2011-07-08 13:56:13 -0700 | [diff] [blame] | 11 | InputData() : buf(NULL), len(0) {} |
| 12 | InputData(unsigned char *in_buf, size_t in_len) : buf(in_buf), len(in_len) {} |
| 13 | |
Paul Stewart | 25379f1 | 2011-05-26 06:41:38 -0700 | [diff] [blame] | 14 | unsigned char *buf; |
| 15 | size_t len; |
| 16 | }; |
| 17 | |
Paul Stewart | 26b327e | 2011-10-19 11:38:09 -0700 | [diff] [blame] | 18 | class IOHandler { |
Paul Stewart | 25379f1 | 2011-05-26 06:41:38 -0700 | [diff] [blame] | 19 | public: |
Paul Stewart | f0aae10 | 2011-10-19 12:11:44 -0700 | [diff] [blame] | 20 | enum ReadyMode { |
| 21 | kModeInput, |
| 22 | kModeOutput |
| 23 | }; |
| 24 | |
Paul Stewart | 26b327e | 2011-10-19 11:38:09 -0700 | [diff] [blame] | 25 | IOHandler() {} |
| 26 | virtual ~IOHandler() {} |
Paul Stewart | f0aae10 | 2011-10-19 12:11:44 -0700 | [diff] [blame] | 27 | |
| 28 | virtual void Start() {} |
| 29 | virtual void Stop() {} |
Paul Stewart | 25379f1 | 2011-05-26 06:41:38 -0700 | [diff] [blame] | 30 | }; |
| 31 | |
| 32 | } // namespace shill |
| 33 | |
| 34 | #endif // SHILL_IO_HANDLER_ |