| 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 493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 504 virtual bool TryRegisterObjectPath(const ObjectPath& object_path, | 504 virtual bool TryRegisterObjectPath(const ObjectPath& object_path, |
| 505 const DBusObjectPathVTable* vtable, | 505 const DBusObjectPathVTable* vtable, |
| 506 void* user_data, | 506 void* user_data, |
| 507 DBusError* error); | 507 DBusError* error); |
| 508 | 508 |
| 509 // Unregister the object path. | 509 // Unregister the object path. |
| 510 // | 510 // |
| 511 // BLOCKING CALL. | 511 // BLOCKING CALL. |
| 512 virtual void UnregisterObjectPath(const ObjectPath& object_path); | 512 virtual void UnregisterObjectPath(const ObjectPath& object_path); |
| 513 | 513 |
| 514 // Posts |task| to the task runner of the D-Bus thread. On completion, |reply| |
| 515 // is posted to the origin thread. |
| 516 virtual void PostTaskToDBusThreadAndReply( |
| 517 const tracked_objects::Location& from_here, |
| 518 const base::Closure& task, |
| 519 const base::Closure& reply); |
| 520 |
| 514 // Posts the task to the task runner of the thread that created the bus. | 521 // Posts the task to the task runner of the thread that created the bus. |
| 515 virtual void PostTaskToOriginThread( | 522 virtual void PostTaskToOriginThread( |
| 516 const tracked_objects::Location& from_here, | 523 const tracked_objects::Location& from_here, |
| 517 const base::Closure& task); | 524 const base::Closure& task); |
| 518 | 525 |
| 519 // Posts the task to the task runner of the D-Bus thread. If D-Bus | 526 // Posts the task to the task runner of the D-Bus thread. If D-Bus |
| 520 // thread is not supplied, the task runner of the origin thread will be | 527 // thread is not supplied, the task runner of the origin thread will be |
| 521 // used. | 528 // used. |
| 522 virtual void PostTaskToDBusThread( | 529 virtual void PostTaskToDBusThread( |
| 523 const tracked_objects::Location& from_here, | 530 const tracked_objects::Location& from_here, |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 687 | 694 |
| 688 std::string address_; | 695 std::string address_; |
| 689 base::Closure on_disconnected_closure_; | 696 base::Closure on_disconnected_closure_; |
| 690 | 697 |
| 691 DISALLOW_COPY_AND_ASSIGN(Bus); | 698 DISALLOW_COPY_AND_ASSIGN(Bus); |
| 692 }; | 699 }; |
| 693 | 700 |
| 694 } // namespace dbus | 701 } // namespace dbus |
| 695 | 702 |
| 696 #endif // DBUS_BUS_H_ | 703 #endif // DBUS_BUS_H_ |
| OLD | NEW |