| 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 DBUS_TEST_SERVICE_H_ | 5 #ifndef DBUS_TEST_SERVICE_H_ |
| 6 #define DBUS_TEST_SERVICE_H_ | 6 #define DBUS_TEST_SERVICE_H_ |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/threading/thread.h" | 10 #include "base/threading/thread.h" |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 Options(); | 34 Options(); |
| 35 ~Options(); | 35 ~Options(); |
| 36 | 36 |
| 37 // NULL by default (i.e. don't use the D-Bus thread). | 37 // NULL by default (i.e. don't use the D-Bus thread). |
| 38 scoped_refptr<base::MessageLoopProxy> dbus_thread_message_loop_proxy; | 38 scoped_refptr<base::MessageLoopProxy> dbus_thread_message_loop_proxy; |
| 39 }; | 39 }; |
| 40 | 40 |
| 41 // The number of methods we'll export. | 41 // The number of methods we'll export. |
| 42 static const int kNumMethodsToExport; | 42 static const int kNumMethodsToExport; |
| 43 | 43 |
| 44 TestService(const Options& options); | 44 explicit TestService(const Options& options); |
| 45 virtual ~TestService(); | 45 virtual ~TestService(); |
| 46 | 46 |
| 47 // Starts the service in a separate thread. | 47 // Starts the service in a separate thread. |
| 48 // Returns true if the thread is started successfully. | 48 // Returns true if the thread is started successfully. |
| 49 bool StartService(); | 49 bool StartService(); |
| 50 | 50 |
| 51 // Waits until the service is started (i.e. all methods are exported). | 51 // Waits until the service is started (i.e. all methods are exported). |
| 52 // Returns true on success. | 52 // Returns true on success. |
| 53 bool WaitUntilServiceIsStarted() WARN_UNUSED_RESULT; | 53 bool WaitUntilServiceIsStarted() WARN_UNUSED_RESULT; |
| 54 | 54 |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 // True iff this instance has successfully acquired the name ownership. | 151 // True iff this instance has successfully acquired the name ownership. |
| 152 bool has_ownership_; | 152 bool has_ownership_; |
| 153 | 153 |
| 154 scoped_refptr<Bus> bus_; | 154 scoped_refptr<Bus> bus_; |
| 155 ExportedObject* exported_object_; | 155 ExportedObject* exported_object_; |
| 156 }; | 156 }; |
| 157 | 157 |
| 158 } // namespace dbus | 158 } // namespace dbus |
| 159 | 159 |
| 160 #endif // DBUS_TEST_SERVICE_H_ | 160 #endif // DBUS_TEST_SERVICE_H_ |
| OLD | NEW |