blob: 97e008929bdfe2f1d8f7e8f08aac8c98d2641774 [file] [log] [blame]
Chris Masonec1e50412011-06-07 13:04:53 -07001// Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
Paul Stewart25379f12011-05-26 06:41:38 -07002// 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
8namespace shill {
9
10struct InputData {
Darin Petkov633ac6f2011-07-08 13:56:13 -070011 InputData() : buf(NULL), len(0) {}
12 InputData(unsigned char *in_buf, size_t in_len) : buf(in_buf), len(in_len) {}
13
Paul Stewart25379f12011-05-26 06:41:38 -070014 unsigned char *buf;
15 size_t len;
16};
17
Paul Stewart26b327e2011-10-19 11:38:09 -070018class IOHandler {
Paul Stewart25379f12011-05-26 06:41:38 -070019 public:
Paul Stewartf0aae102011-10-19 12:11:44 -070020 enum ReadyMode {
21 kModeInput,
22 kModeOutput
23 };
24
Paul Stewart26b327e2011-10-19 11:38:09 -070025 IOHandler() {}
26 virtual ~IOHandler() {}
Paul Stewartf0aae102011-10-19 12:11:44 -070027
28 virtual void Start() {}
29 virtual void Stop() {}
Paul Stewart25379f12011-05-26 06:41:38 -070030};
31
32} // namespace shill
33
34#endif // SHILL_IO_HANDLER_