Paul Stewart | a3c56f9 | 2011-05-26 07:08:52 -0700 | [diff] [blame] | 1 | // 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 | |
| 10 | struct nlmsghdr; |
| 11 | |
| 12 | namespace shill { |
| 13 | |
| 14 | class RTNLListener { |
| 15 | public: |
| 16 | RTNLListener(int listen_flags, Callback1<struct nlmsghdr *>::Type *callback); |
| 17 | ~RTNLListener(); |
| 18 | void NotifyEvent(int type, struct nlmsghdr *hdr); |
| 19 | private: |
| 20 | int listen_flags_; |
| 21 | Callback1<struct nlmsghdr *>::Type *callback_; |
| 22 | DISALLOW_COPY_AND_ASSIGN(RTNLListener); |
| 23 | }; |
| 24 | |
| 25 | } // namespace shill |
| 26 | |
| 27 | #endif // SHILL_RTNL_LISTENER_ |