OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROMEOS_DBUS_ARC_INSTANCE_CLIENT_H_ |
| 6 #define CHROMEOS_DBUS_ARC_INSTANCE_CLIENT_H_ |
| 7 |
| 8 #include "base/basictypes.h" |
| 9 #include "chromeos/chromeos_export.h" |
| 10 #include "chromeos/dbus/dbus_client.h" |
| 11 #include "chromeos/dbus/dbus_method_call_status.h" |
| 12 |
| 13 namespace dbus { |
| 14 class ObjectPath; |
| 15 } |
| 16 |
| 17 namespace chromeos { |
| 18 |
| 19 // Client for the Arc Instance Service |
| 20 class CHROMEOS_EXPORT ArcInstanceClient : public DBusClient { |
| 21 public: |
| 22 ~ArcInstanceClient() override; |
| 23 |
| 24 // Factory function, creates a new instance and returns ownership. |
| 25 // For normal usage, access the singleton via DBusThreadManager::Get(). |
| 26 static ArcInstanceClient* Create(); |
| 27 |
| 28 // Starts an instance of ARC. |callback| is called after the method call |
| 29 // succeeds. |
| 30 virtual void StartInstance(const std::string& socket_path, |
| 31 const BoolDBusMethodCallback& callback) = 0; |
| 32 |
| 33 // Stops the currently running instance of ARC. |callback| is called after |
| 34 // the method call is processed. |
| 35 virtual void StopInstance(const VoidDBusMethodCallback& callback) = 0; |
| 36 |
| 37 protected: |
| 38 // Create() should be used instead. |
| 39 ArcInstanceClient(); |
| 40 |
| 41 private: |
| 42 DISALLOW_COPY_AND_ASSIGN(ArcInstanceClient); |
| 43 }; |
| 44 |
| 45 } // namespace chromeos |
| 46 |
| 47 #endif // CHROMEOS_DBUS_ARC_INSTANCE_CLIENT_H_ |
OLD | NEW |