blob: bdd2f6cba2376976be364bc232849d9f06196ef6 [file] [log] [blame]
Wade Guthrie5020b572012-10-12 15:51:14 -07001// 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 Guthrie5020b572012-10-12 15:51:14 -070011#include <base/basictypes.h>
Wade Guthrie5020b572012-10-12 15:51:14 -070012
13#include "shill/callback80211_object.h"
14
15namespace shill {
16
Wade Guthrie5020b572012-10-12 15:51:14 -070017class Metrics;
repo syncdc085c82012-12-28 08:54:41 -080018class Nl80211Message;
Wade Guthrie5020b572012-10-12 15:51:14 -070019
20// Config80211 callback object that sends stuff to UMA metrics.
21class Callback80211Metrics : public Callback80211Object {
22 public:
Christopher Wileyfe34be02012-11-12 16:02:46 -080023 explicit Callback80211Metrics(Metrics *metrics);
Wade Guthrie5020b572012-10-12 15:51:14 -070024
Christopher Wileyfe34be02012-11-12 16:02:46 -080025 protected:
repo syncdc085c82012-12-28 08:54:41 -080026 virtual void Config80211MessageCallback(const Nl80211Message &msg);
Wade Guthrie5020b572012-10-12 15:51:14 -070027
Christopher Wileyfe34be02012-11-12 16:02:46 -080028 private:
Wade Guthrie5020b572012-10-12 15:51:14 -070029 static const char kMetricLinkDisconnectCount[];
30
31 Metrics *metrics_;
32
Wade Guthrie5020b572012-10-12 15:51:14 -070033 DISALLOW_COPY_AND_ASSIGN(Callback80211Metrics);
34};
35
36} // namespace shill
37
38#endif // SHILL_CALLBACK80211_METRICS_H