OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_LOADER_CLIENT_H_ | 5 #ifndef CHROMEOS_DBUS_IMAGE_LOADER_CLIENT_H_ |
6 #define CHROMEOS_DBUS_IMAGE_LOADER_CLIENT_H_ | 6 #define CHROMEOS_DBUS_IMAGE_LOADER_CLIENT_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 public: | 21 public: |
22 ~ImageLoaderClient() override; | 22 ~ImageLoaderClient() override; |
23 | 23 |
24 // Registers a component by copying from |component_folder_abs_path| into its | 24 // Registers a component by copying from |component_folder_abs_path| into its |
25 // internal storage, if and only if, the component passes verification. | 25 // internal storage, if and only if, the component passes verification. |
26 virtual void RegisterComponent(const std::string& name, | 26 virtual void RegisterComponent(const std::string& name, |
27 const std::string& version, | 27 const std::string& version, |
28 const std::string& component_folder_abs_path, | 28 const std::string& component_folder_abs_path, |
29 const BoolDBusMethodCallback& callback) = 0; | 29 const BoolDBusMethodCallback& callback) = 0; |
30 | 30 |
| 31 // Mount a component given the |name| and return the mount point (if call is |
| 32 // successful). |
| 33 virtual void LoadComponent(const std::string& name, |
| 34 const StringDBusMethodCallback& callback) = 0; |
| 35 |
31 // Factory function, creates a new instance and returns ownership. | 36 // Factory function, creates a new instance and returns ownership. |
32 // For normal usage, access the singleton via DBusThreadManager::Get(). | 37 // For normal usage, access the singleton via DBusThreadManager::Get(). |
33 static ImageLoaderClient* Create(); | 38 static ImageLoaderClient* Create(); |
34 | 39 |
35 protected: | 40 protected: |
36 // Create() should be used instead. | 41 // Create() should be used instead. |
37 ImageLoaderClient(); | 42 ImageLoaderClient(); |
38 | 43 |
39 private: | 44 private: |
40 DISALLOW_COPY_AND_ASSIGN(ImageLoaderClient); | 45 DISALLOW_COPY_AND_ASSIGN(ImageLoaderClient); |
41 }; | 46 }; |
42 | 47 |
43 } // namespace chromeos | 48 } // namespace chromeos |
44 | 49 |
45 #endif // CHROMEOS_DBUS_IMAGE_LOADER_CLIENT_H_ | 50 #endif // CHROMEOS_DBUS_IMAGE_LOADER_CLIENT_H_ |
OLD | NEW |