| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium 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 CHROME_BROWSER_CHROMEOS_DBUS_CASHEW_CLIENT_H_ | 5 #ifndef CHROMEOS_DBUS_CASHEW_CLIENT_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_DBUS_CASHEW_CLIENT_H_ | 6 #define CHROMEOS_DBUS_CASHEW_CLIENT_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
| 13 #include "base/callback.h" | 13 #include "base/callback.h" |
| 14 #include "chrome/browser/chromeos/dbus/dbus_client_implementation_type.h" | 14 #include "chromeos/chromeos_export.h" |
| 15 #include "chromeos/dbus/dbus_client_implementation_type.h" |
| 15 | 16 |
| 16 namespace base { | 17 namespace base { |
| 17 class ListValue; | 18 class ListValue; |
| 18 } | 19 } |
| 19 | 20 |
| 20 namespace dbus { | 21 namespace dbus { |
| 21 class Bus; | 22 class Bus; |
| 22 } | 23 } |
| 23 | 24 |
| 24 namespace chromeos { | 25 namespace chromeos { |
| 25 | 26 |
| 26 // CashewClient is used to communicate with the Cashew service. | 27 // CashewClient is used to communicate with the Cashew service. |
| 27 // All methods should be called from the origin thread (UI thread) which | 28 // All methods should be called from the origin thread (UI thread) which |
| 28 // initializes the DBusThreadManager instance. | 29 // initializes the DBusThreadManager instance. |
| 29 class CashewClient { | 30 class CHROMEOS_EXPORT CashewClient { |
| 30 public: | 31 public: |
| 31 // A callback to handle "DataPlansUpdate" signal. | 32 // A callback to handle "DataPlansUpdate" signal. |
| 32 // |service| is the D-Bus path of the cellular service. | 33 // |service| is the D-Bus path of the cellular service. |
| 33 // (e.g. /service/cellular_0271266ce2ce_310260467781434) | 34 // (e.g. /service/cellular_0271266ce2ce_310260467781434) |
| 34 typedef base::Callback<void(const std::string& service, | 35 typedef base::Callback<void(const std::string& service, |
| 35 const base::ListValue& data_plans)> | 36 const base::ListValue& data_plans)> |
| 36 DataPlansUpdateHandler; | 37 DataPlansUpdateHandler; |
| 37 | 38 |
| 38 virtual ~CashewClient(); | 39 virtual ~CashewClient(); |
| 39 | 40 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 54 protected: | 55 protected: |
| 55 // Create() should be used instead. | 56 // Create() should be used instead. |
| 56 CashewClient(); | 57 CashewClient(); |
| 57 | 58 |
| 58 private: | 59 private: |
| 59 DISALLOW_COPY_AND_ASSIGN(CashewClient); | 60 DISALLOW_COPY_AND_ASSIGN(CashewClient); |
| 60 }; | 61 }; |
| 61 | 62 |
| 62 } // namespace chromeos | 63 } // namespace chromeos |
| 63 | 64 |
| 64 #endif // CHROME_BROWSER_CHROMEOS_DBUS_CASHEW_CLIENT_H_ | 65 #endif // CHROMEOS_DBUS_CASHEW_CLIENT_H_ |
| OLD | NEW |