| 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 #ifndef SRC_POLICY_H_ | 5 #ifndef SRC_POLICY_H_ |
| 6 #define SRC_POLICY_H_ | 6 #define SRC_POLICY_H_ |
| 7 | 7 |
| 8 #include <glib.h> | 8 #include <glib.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 // what carrier is associated with this policy? | 21 // what carrier is associated with this policy? |
| 22 virtual const std::string& GetCarrier() const = 0; | 22 virtual const std::string& GetCarrier() const = 0; |
| 23 | 23 |
| 24 // how often should a service request updates via the carrier usage API? | 24 // how often should a service request updates via the carrier usage API? |
| 25 // return value is in seconds | 25 // return value is in seconds |
| 26 virtual guint GetUpdateTimerIdleSecs(const DataPlanList& plans) const = 0; | 26 virtual guint GetUpdateTimerIdleSecs(const DataPlanList& plans) const = 0; |
| 27 | 27 |
| 28 // should we emit a data plans update for the change from |old_plans| | 28 // should we emit a data plans update for the change from |old_plans| |
| 29 // to |new_plans|? | 29 // to |new_plans|? |
| 30 // NOTE: user might also want to influence this from the Chrome side | 30 // NOTE: user might also want to influence this from the Chrome side |
| 31 virtual bool ShouldEmitDataPlansUpdate(const DataPlanList& old_plans, | 31 virtual bool ShouldEmitDataPlansUpdate(const DataPlanList& plans) const = 0; |
| 32 const DataPlanList& new_plans) const = 0; | |
| 33 | |
| 34 // must usage API requests for a cellular service be sent over the air? | |
| 35 virtual bool UsageRequestsMustBeSentOTA() const = 0; | |
| 36 | 32 |
| 37 // should time strings with no timezone suffix be interpreted as being in | 33 // should time strings with no timezone suffix be interpreted as being in |
| 38 // local time instead of UTC? | 34 // local time instead of UTC? |
| 39 virtual bool ZonelessTimeStringsAreLocal() const = 0; | 35 virtual bool ZonelessTimeStringsAreLocal() const = 0; |
| 40 | 36 |
| 41 // factory | 37 // factory |
| 42 // return appropriate concrete impl for |carrier| | 38 // return appropriate concrete impl for |carrier| |
| 43 // caller owns returned Policy and is responsible for deleting it | 39 // caller owns returned Policy and is responsible for deleting it |
| 44 static Policy* GetPolicy(const std::string& carrier); | 40 static Policy* GetPolicy(const std::string& carrier); |
| 45 }; | 41 }; |
| 46 | 42 |
| 47 } // namespace cashew | 43 } // namespace cashew |
| 48 | 44 |
| 49 #endif // SRC_POLICY_H_ | 45 #endif // SRC_POLICY_H_ |
| OLD | NEW |