blob: 07a4a7723413ce86fef66d5b5394b819f8656e53 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
// Copyright (c) 2012 The Chromium 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 CHROMEOS_NETWORK_NETWORK_STATE_HANDLER_OBSERVER_H_
#define CHROMEOS_NETWORK_NETWORK_STATE_HANDLER_OBSERVER_H_
#include <string>
#include <vector>
#include "base/basictypes.h"
#include "chromeos/chromeos_export.h"
namespace chromeos {
class NetworkState;
// Observer class for all network state changes, including changes to
// active (connecting or connected) services.
class CHROMEOS_EXPORT NetworkStateHandlerObserver {
public:
typedef std::vector<const NetworkState*> NetworkStateList;
NetworkStateHandlerObserver();
virtual ~NetworkStateHandlerObserver();
// Called when one or more network manager properties changes.
virtual void NetworkManagerChanged();
// The list of networks changed.
virtual void NetworkListChanged(const NetworkStateList& networks);
// The list of devices changed. Typically we don't care about the list
// of devices, so they are not passed in the method.
virtual void DeviceListChanged();
// The active network changed. |network| will be NULL if there is no longer
// an active network.
virtual void ActiveNetworkChanged(const NetworkState* network);
// The state of the active network changed.
virtual void ActiveNetworkStateChanged(const NetworkState* network);
// One or more network service properties changed. Note: for the active
// network, this will be called in *addition* to ActiveNetworkStateChanged()
// if the state property changed.
virtual void NetworkServiceChanged(const NetworkState* network);
private:
DISALLOW_COPY_AND_ASSIGN(NetworkStateHandlerObserver);
};
} // namespace chromeos
#endif // CHROMEOS_NETWORK_NETWORK_STATE_HANDLER_OBSERVER_H_
|