blob: 0370c920e2e1a86944c9b7a942f7d1dbdfc25ac9 [file] [log] [blame]
Paul Stewarta3c56f92011-05-26 07:08:52 -07001// Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
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_RTNL_LISTENER_
6#define SHILL_RTNL_LISTENER_
7
8#include <base/callback_old.h>
9
Paul Stewarta3c56f92011-05-26 07:08:52 -070010namespace shill {
11
Chris Masone2aa97072011-08-09 17:35:08 -070012class RTNLMessage;
13
Paul Stewarta3c56f92011-05-26 07:08:52 -070014class RTNLListener {
15 public:
Chris Masone2aa97072011-08-09 17:35:08 -070016 RTNLListener(int listen_flags,
17 Callback1<const RTNLMessage &>::Type *callback);
Paul Stewarta3c56f92011-05-26 07:08:52 -070018 ~RTNLListener();
Darin Petkovca432fc2011-07-08 15:56:57 -070019
Chris Masone2aa97072011-08-09 17:35:08 -070020 void NotifyEvent(int type, const RTNLMessage &msg);
Darin Petkovca432fc2011-07-08 15:56:57 -070021
Paul Stewarta3c56f92011-05-26 07:08:52 -070022 private:
23 int listen_flags_;
Chris Masone2aa97072011-08-09 17:35:08 -070024 Callback1<const RTNLMessage &>::Type *callback_;
Darin Petkovca432fc2011-07-08 15:56:57 -070025
Paul Stewarta3c56f92011-05-26 07:08:52 -070026 DISALLOW_COPY_AND_ASSIGN(RTNLListener);
27};
28
29} // namespace shill
30
31#endif // SHILL_RTNL_LISTENER_