blob: d69458693d2b06e9421fc007730f89707f3b2e5d [file] [log] [blame]
// Copyright (c) 2011 The Chromium OS 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 SHILL_GLIB_IO_INPUT_HANDLER_
#define SHILL_GLIB_IO_INPUT_HANDLER_
#include <stdio.h>
#include <glib.h>
#include <base/callback_old.h>
#include "shill/io_handler.h"
namespace shill {
class GlibIOInputHandler : public IOHandler {
public:
GlibIOInputHandler(int fd, Callback1<InputData*>::Type *callback);
~GlibIOInputHandler();
virtual void Start();
virtual void Stop();
private:
GIOChannel *channel_;
Callback1<InputData *>::Type *callback_;
guint source_id_;
};
} // namespace shill
#endif // SHILL_GLIB_IO_INPUT_HANDLER_