Wade Guthrie | 5020b57 | 2012-10-12 15:51:14 -0700 | [diff] [blame] | 1 | // Copyright (c) 2012 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 | // This class is a callback object that observes all nl80211 events that come |
| 6 | // up from the kernel. |
| 7 | |
| 8 | #ifndef SHILL_CALLBACK80211_METRICS_H |
| 9 | #define SHILL_CALLBACK80211_METRICS_H |
| 10 | |
Wade Guthrie | 5020b57 | 2012-10-12 15:51:14 -0700 | [diff] [blame] | 11 | #include <base/basictypes.h> |
Wade Guthrie | 5020b57 | 2012-10-12 15:51:14 -0700 | [diff] [blame] | 12 | |
| 13 | #include "shill/callback80211_object.h" |
| 14 | |
| 15 | namespace shill { |
| 16 | |
Wade Guthrie | 5020b57 | 2012-10-12 15:51:14 -0700 | [diff] [blame] | 17 | class Metrics; |
repo sync | dc085c8 | 2012-12-28 08:54:41 -0800 | [diff] [blame] | 18 | class Nl80211Message; |
Wade Guthrie | 5020b57 | 2012-10-12 15:51:14 -0700 | [diff] [blame] | 19 | |
| 20 | // Config80211 callback object that sends stuff to UMA metrics. |
| 21 | class Callback80211Metrics : public Callback80211Object { |
| 22 | public: |
Christopher Wiley | fe34be0 | 2012-11-12 16:02:46 -0800 | [diff] [blame] | 23 | explicit Callback80211Metrics(Metrics *metrics); |
Wade Guthrie | 5020b57 | 2012-10-12 15:51:14 -0700 | [diff] [blame] | 24 | |
Christopher Wiley | fe34be0 | 2012-11-12 16:02:46 -0800 | [diff] [blame] | 25 | protected: |
repo sync | dc085c8 | 2012-12-28 08:54:41 -0800 | [diff] [blame] | 26 | virtual void Config80211MessageCallback(const Nl80211Message &msg); |
Wade Guthrie | 5020b57 | 2012-10-12 15:51:14 -0700 | [diff] [blame] | 27 | |
Christopher Wiley | fe34be0 | 2012-11-12 16:02:46 -0800 | [diff] [blame] | 28 | private: |
Wade Guthrie | 5020b57 | 2012-10-12 15:51:14 -0700 | [diff] [blame] | 29 | static const char kMetricLinkDisconnectCount[]; |
| 30 | |
| 31 | Metrics *metrics_; |
| 32 | |
Wade Guthrie | 5020b57 | 2012-10-12 15:51:14 -0700 | [diff] [blame] | 33 | DISALLOW_COPY_AND_ASSIGN(Callback80211Metrics); |
| 34 | }; |
| 35 | |
| 36 | } // namespace shill |
| 37 | |
| 38 | #endif // SHILL_CALLBACK80211_METRICS_H |