Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(226)

Side by Side Diff: flimflam_proxy.h

Issue 4029002: AU: Don't use network on expensive connection types (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/update_engine.git
Patch Set: Created 10 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2010 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 CHROMEOS_PLATFORM_UPDATE_ENGINE_FLIMFLAM_PROXY_H__
6 #define CHROMEOS_PLATFORM_UPDATE_ENGINE_FLIMFLAM_PROXY_H__
7
8 // This class interfaces with FlimFlam to find out data about connectivity.
9
10 #include <base/basictypes.h>
11
12 #include "update_engine/dbus_interface.h"
13
14 namespace chromeos_update_engine {
15
16 extern const char* kFlimFlamDbusService;
17 extern const char* kFlimFlamDbusManagerInterface;
18 extern const char* kFlimFlamDbusManagerPath;
19 extern const char* kFlimFlamDbusServiceInterface;
20
21 extern const char* kFlimFlamNetTypeEthernet;
22 extern const char* kFlimFlamNetTypeWifi;
23 extern const char* kFlimFlamNetTypeWimax;
24 extern const char* kFlimFlamNetTypeBluetooth;
25 extern const char* kFlimFlamNetTypeCellular;
26
27 enum NetworkConnectionType {
28 kNetEthernet = 0,
29 kNetWifi,
30 kNetWimax,
31 kNetBluetooth,
32 kNetCellular,
33 kNetUnknown
34 };
35
36 class FlimFlamProxy {
37 public:
38 static bool GetConnectionType(DbusGlibInterface* dbus_iface,
39 NetworkConnectionType* out_type);
40
41 static bool IsExpensiveConnectionType(NetworkConnectionType type) {
42 return type == kNetWimax || type == kNetBluetooth || type == kNetCellular;
43 }
44 static const char* StringForConnectionType(NetworkConnectionType type);
45
46 private:
47 // Should never be allocated
48 DISALLOW_IMPLICIT_CONSTRUCTORS(FlimFlamProxy);
49 };
50
51 } // namespace chromeos_update_engine
52
53 #endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_FLIMFLAM_PROXY_H__
OLDNEW
« no previous file with comments | « dbus_interface.h ('k') | flimflam_proxy.cc » ('j') | flimflam_proxy.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698