| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 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 | 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 // TODO(vlaviano): update accessor style (GetFoo/SetFoo -> foo) |
| 6 |
| 5 #ifndef SRC_SERVICE_H_ | 7 #ifndef SRC_SERVICE_H_ |
| 6 #define SRC_SERVICE_H_ | 8 #define SRC_SERVICE_H_ |
| 7 | 9 |
| 8 #include <glib.h> | 10 #include <glib.h> |
| 9 | 11 |
| 10 #include <map> | 12 #include <map> |
| 11 #include <string> | 13 #include <string> |
| 12 | 14 |
| 13 #include <base/basictypes.h> // NOLINT | 15 #include <base/basictypes.h> // NOLINT |
| 14 #include <dbus-c++/dbus.h> // NOLINT | 16 #include <dbus-c++/dbus.h> // NOLINT |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 virtual Type GetType() const; | 73 virtual Type GetType() const; |
| 72 | 74 |
| 73 // convert type string to Type enum value | 75 // convert type string to Type enum value |
| 74 static Type TypeFromString(const std::string& type); | 76 static Type TypeFromString(const std::string& type); |
| 75 | 77 |
| 76 // get Device object for this service | 78 // get Device object for this service |
| 77 // this can return NULL if we don't yet have Device info | 79 // this can return NULL if we don't yet have Device info |
| 78 virtual Device* GetDevice() const; | 80 virtual Device* GetDevice() const; |
| 79 | 81 |
| 80 // get data plan info, formatted for D-Bus | 82 // get data plan info, formatted for D-Bus |
| 83 // filters out inactive (future, expired, or consumed) plans |
| 81 virtual DBusDataPlanList GetDBusDataPlans() const; | 84 virtual DBusDataPlanList GetDBusDataPlans() const; |
| 82 | 85 |
| 83 // do we think that we're the default service at this time? | 86 // do we think that we're the default service at this time? |
| 84 virtual bool IsDefaultService() const; | 87 virtual bool IsDefaultService() const; |
| 85 | 88 |
| 86 typedef enum { | 89 typedef enum { |
| 87 kConnectivityStateUnknown = 0, | 90 kConnectivityStateUnknown = 0, |
| 88 kConnectivityStateRestricted, | 91 kConnectivityStateRestricted, |
| 89 kConnectivityStateUnrestricted, | 92 kConnectivityStateUnrestricted, |
| 90 kConnectivityStateNone, | 93 kConnectivityStateNone, |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 296 | 299 |
| 297 // consult policy to determine if we should send an unsolicited update | 300 // consult policy to determine if we should send an unsolicited update |
| 298 void MaybeEmitDataPlansUpdate(); | 301 void MaybeEmitDataPlansUpdate(); |
| 299 | 302 |
| 300 DISALLOW_COPY_AND_ASSIGN(Service); | 303 DISALLOW_COPY_AND_ASSIGN(Service); |
| 301 }; | 304 }; |
| 302 | 305 |
| 303 } // namespace cashew | 306 } // namespace cashew |
| 304 | 307 |
| 305 #endif // SRC_SERVICE_H_ | 308 #endif // SRC_SERVICE_H_ |
| OLD | NEW |