| 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 CHROMEOS_DBUS_IMAGE_BURNER_CLIENT_H_ | 5 #ifndef CHROMEOS_DBUS_IMAGE_BURNER_CLIENT_H_ |
| 6 #define CHROMEOS_DBUS_IMAGE_BURNER_CLIENT_H_ | 6 #define CHROMEOS_DBUS_IMAGE_BURNER_CLIENT_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 #include "base/callback.h" | 11 #include "base/callback.h" |
| 12 #include "chromeos/chromeos_export.h" | 12 #include "chromeos/chromeos_export.h" |
| 13 #include "chromeos/dbus/dbus_client.h" | 13 #include "chromeos/dbus/dbus_client.h" |
| 14 #include "chromeos/dbus/dbus_client_implementation_type.h" | |
| 15 | 14 |
| 16 namespace chromeos { | 15 namespace chromeos { |
| 17 | 16 |
| 18 // ImageBurnerClient is used to communicate with the image burner. | 17 // ImageBurnerClient is used to communicate with the image burner. |
| 19 // All method should be called from the origin thread (UI thread) which | 18 // All method should be called from the origin thread (UI thread) which |
| 20 // initializes the DBusThreadManager instance. | 19 // initializes the DBusThreadManager instance. |
| 21 class CHROMEOS_EXPORT ImageBurnerClient : public DBusClient { | 20 class CHROMEOS_EXPORT ImageBurnerClient : public DBusClient { |
| 22 public: | 21 public: |
| 23 virtual ~ImageBurnerClient(); | 22 virtual ~ImageBurnerClient(); |
| 24 | 23 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 47 virtual void SetEventHandlers( | 46 virtual void SetEventHandlers( |
| 48 const BurnFinishedHandler& burn_finished_handler, | 47 const BurnFinishedHandler& burn_finished_handler, |
| 49 const BurnProgressUpdateHandler& burn_progress_update_handler) = 0; | 48 const BurnProgressUpdateHandler& burn_progress_update_handler) = 0; |
| 50 | 49 |
| 51 // Resets event handlers. After calling this method, nothing is done when | 50 // Resets event handlers. After calling this method, nothing is done when |
| 52 // signals are received. | 51 // signals are received. |
| 53 virtual void ResetEventHandlers() = 0; | 52 virtual void ResetEventHandlers() = 0; |
| 54 | 53 |
| 55 // Factory function, creates a new instance and returns ownership. | 54 // Factory function, creates a new instance and returns ownership. |
| 56 // For normal usage, access the singleton via DBusThreadManager::Get(). | 55 // For normal usage, access the singleton via DBusThreadManager::Get(). |
| 57 static ImageBurnerClient* Create(DBusClientImplementationType type); | 56 static ImageBurnerClient* Create(); |
| 58 | 57 |
| 59 protected: | 58 protected: |
| 60 // Create() should be used instead. | 59 // Create() should be used instead. |
| 61 ImageBurnerClient(); | 60 ImageBurnerClient(); |
| 62 | 61 |
| 63 private: | 62 private: |
| 64 DISALLOW_COPY_AND_ASSIGN(ImageBurnerClient); | 63 DISALLOW_COPY_AND_ASSIGN(ImageBurnerClient); |
| 65 }; | 64 }; |
| 66 | 65 |
| 67 } // namespace chromeos | 66 } // namespace chromeos |
| 68 | 67 |
| 69 #endif // CHROMEOS_DBUS_IMAGE_BURNER_CLIENT_H_ | 68 #endif // CHROMEOS_DBUS_IMAGE_BURNER_CLIENT_H_ |
| OLD | NEW |