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_BUS_H_ | 5 #ifndef DBUS_BUS_H_ |
6 #define DBUS_BUS_H_ | 6 #define DBUS_BUS_H_ |
7 | 7 |
8 #include <dbus/dbus.h> | 8 #include <dbus/dbus.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
414 // or failed to be obtained, in the origin thread. | 414 // or failed to be obtained, in the origin thread. |
415 // | 415 // |
416 // Must be called in the origin thread. | 416 // Must be called in the origin thread. |
417 virtual void RequestOwnership(const std::string& service_name, | 417 virtual void RequestOwnership(const std::string& service_name, |
418 ServiceOwnershipOptions options, | 418 ServiceOwnershipOptions options, |
419 OnOwnershipCallback on_ownership_callback); | 419 OnOwnershipCallback on_ownership_callback); |
420 | 420 |
421 // Requests the ownership of the given service name. | 421 // Requests the ownership of the given service name. |
422 // Returns true on success, or the the service name is already obtained. | 422 // Returns true on success, or the the service name is already obtained. |
423 // | 423 // |
| 424 // Note that it's important to expose methods before requesting a service |
| 425 // name with this method. See also ExportedObject::ExportMethodAndBlock() |
| 426 // for details. |
| 427 // |
424 // BLOCKING CALL. | 428 // BLOCKING CALL. |
425 virtual bool RequestOwnershipAndBlock(const std::string& service_name, | 429 virtual bool RequestOwnershipAndBlock(const std::string& service_name, |
426 ServiceOwnershipOptions options); | 430 ServiceOwnershipOptions options); |
427 | 431 |
428 // Releases the ownership of the given service name. | 432 // Releases the ownership of the given service name. |
429 // Returns true on success. | 433 // Returns true on success. |
430 // | 434 // |
431 // BLOCKING CALL. | 435 // BLOCKING CALL. |
432 virtual bool ReleaseOwnership(const std::string& service_name); | 436 virtual bool ReleaseOwnership(const std::string& service_name); |
433 | 437 |
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
744 | 748 |
745 std::string address_; | 749 std::string address_; |
746 base::Closure on_disconnected_closure_; | 750 base::Closure on_disconnected_closure_; |
747 | 751 |
748 DISALLOW_COPY_AND_ASSIGN(Bus); | 752 DISALLOW_COPY_AND_ASSIGN(Bus); |
749 }; | 753 }; |
750 | 754 |
751 } // namespace dbus | 755 } // namespace dbus |
752 | 756 |
753 #endif // DBUS_BUS_H_ | 757 #endif // DBUS_BUS_H_ |
OLD | NEW |