OLD | NEW |
1 // Copyright (c) 2010, 2011 The Chromium OS Authors. All rights reserved. | 1 // Copyright (c) 2010, 2011 The Chromium OS Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef SRC_SERVICE_MANAGER_H_ | 5 #ifndef SRC_SERVICE_MANAGER_H_ |
6 #define SRC_SERVICE_MANAGER_H_ | 6 #define SRC_SERVICE_MANAGER_H_ |
7 | 7 |
8 #include <glib.h> | 8 #include <glib.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 static bool IsOfflineConnectivityState(ConnectivityState state); | 63 static bool IsOfflineConnectivityState(ConnectivityState state); |
64 | 64 |
65 // does |state| represent an online state | 65 // does |state| represent an online state |
66 static bool IsOnlineConnectivityState(ConnectivityState state); | 66 static bool IsOnlineConnectivityState(ConnectivityState state); |
67 | 67 |
68 // Service methods | 68 // Service methods |
69 | 69 |
70 // a child Service wants us to emit an update about its data plans | 70 // a child Service wants us to emit an update about its data plans |
71 virtual void EmitDataPlansUpdate(const Service& service) = 0; | 71 virtual void EmitDataPlansUpdate(const Service& service) = 0; |
72 | 72 |
| 73 // |plan|, associated with |service|, has become inactive |
| 74 virtual void OnDataPlanInactive(const Service& service, |
| 75 const DataPlan& plan) = 0; |
| 76 |
73 // factory | 77 // factory |
74 static ServiceManager* NewServiceManager( | 78 static ServiceManager* NewServiceManager( |
75 DBus::Connection& connection, // NOLINT | 79 DBus::Connection& connection, // NOLINT |
76 GMainLoop * const main_loop); | 80 GMainLoop * const main_loop); |
77 | 81 |
78 private: | 82 private: |
79 DISALLOW_COPY_AND_ASSIGN(ServiceManager); | 83 DISALLOW_COPY_AND_ASSIGN(ServiceManager); |
80 }; | 84 }; |
81 | 85 |
82 } // namespace cashew | 86 } // namespace cashew |
83 | 87 |
84 #endif // SRC_SERVICE_MANAGER_H_ | 88 #endif // SRC_SERVICE_MANAGER_H_ |
OLD | NEW |