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 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
347 virtual ObjectManager* GetObjectManager(const std::string& service_name, | 347 virtual ObjectManager* GetObjectManager(const std::string& service_name, |
348 const ObjectPath& object_path); | 348 const ObjectPath& object_path); |
349 | 349 |
350 // Unregisters the object manager for the given remote object path | 350 // Unregisters the object manager for the given remote object path |
351 // |object_path| exported by the srevice |service_name|. | 351 // |object_path| exported by the srevice |service_name|. |
352 // | 352 // |
353 // Getting an object manager for the same remote object after this call | 353 // Getting an object manager for the same remote object after this call |
354 // will return a new object, method calls on any remaining copies of the | 354 // will return a new object, method calls on any remaining copies of the |
355 // previous object are not permitted. | 355 // previous object are not permitted. |
356 // | 356 // |
357 // This method will asynchronously clean up any match rules that have been | |
358 // added for the object manager and invoke |callback| when the operation is | |
359 // complete. If this method returns false, then |callback| is never called. | |
360 // The |callback| argument must not be null. | |
361 // | |
357 // Must be called in the origin thread. | 362 // Must be called in the origin thread. |
358 virtual void RemoveObjectManager(const std::string& service_name, | 363 virtual bool RemoveObjectManager(const std::string& service_name, |
satorux1
2014/08/29 05:20:53
Please document the return value.
| |
359 const ObjectPath& object_path); | 364 const ObjectPath& object_path, |
365 const base::Closure& callback); | |
360 | 366 |
361 // Instructs all registered object managers to retrieve their set of managed | 367 // Instructs all registered object managers to retrieve their set of managed |
362 // objects from their respective remote objects. There is no need to call this | 368 // objects from their respective remote objects. There is no need to call this |
363 // manually, this is called automatically by the D-Bus thread manager once | 369 // manually, this is called automatically by the D-Bus thread manager once |
364 // implementation classes are registered. | 370 // implementation classes are registered. |
365 virtual void GetManagedObjects(); | 371 virtual void GetManagedObjects(); |
366 | 372 |
367 // Shuts down the bus and blocks until it's done. More specifically, this | 373 // Shuts down the bus and blocks until it's done. More specifically, this |
368 // function does the following: | 374 // function does the following: |
369 // | 375 // |
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
594 // This is protected, so we can define sub classes. | 600 // This is protected, so we can define sub classes. |
595 virtual ~Bus(); | 601 virtual ~Bus(); |
596 | 602 |
597 private: | 603 private: |
598 friend class base::RefCountedThreadSafe<Bus>; | 604 friend class base::RefCountedThreadSafe<Bus>; |
599 | 605 |
600 // Helper function used for RemoveObjectProxy(). | 606 // Helper function used for RemoveObjectProxy(). |
601 void RemoveObjectProxyInternal(scoped_refptr<dbus::ObjectProxy> object_proxy, | 607 void RemoveObjectProxyInternal(scoped_refptr<dbus::ObjectProxy> object_proxy, |
602 const base::Closure& callback); | 608 const base::Closure& callback); |
603 | 609 |
610 // Helper functions used for RemoveObjectManager(). | |
611 void RemoveObjectManagerInternal( | |
612 scoped_refptr<dbus::ObjectManager> object_manager, | |
613 const base::Closure& callback); | |
614 void RemoveObjectManagerInternalHelper( | |
615 scoped_refptr<dbus::ObjectManager> object_manager, | |
616 const base::Closure& callback); | |
617 | |
604 // Helper function used for UnregisterExportedObject(). | 618 // Helper function used for UnregisterExportedObject(). |
605 void UnregisterExportedObjectInternal( | 619 void UnregisterExportedObjectInternal( |
606 scoped_refptr<dbus::ExportedObject> exported_object); | 620 scoped_refptr<dbus::ExportedObject> exported_object); |
607 | 621 |
608 // Helper function used for ShutdownOnDBusThreadAndBlock(). | 622 // Helper function used for ShutdownOnDBusThreadAndBlock(). |
609 void ShutdownOnDBusThreadAndBlockInternal(); | 623 void ShutdownOnDBusThreadAndBlockInternal(); |
610 | 624 |
611 // Helper function used for RequestOwnership(). | 625 // Helper function used for RequestOwnership(). |
612 void RequestOwnershipInternal(const std::string& service_name, | 626 void RequestOwnershipInternal(const std::string& service_name, |
613 ServiceOwnershipOptions options, | 627 ServiceOwnershipOptions options, |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
748 | 762 |
749 std::string address_; | 763 std::string address_; |
750 base::Closure on_disconnected_closure_; | 764 base::Closure on_disconnected_closure_; |
751 | 765 |
752 DISALLOW_COPY_AND_ASSIGN(Bus); | 766 DISALLOW_COPY_AND_ASSIGN(Bus); |
753 }; | 767 }; |
754 | 768 |
755 } // namespace dbus | 769 } // namespace dbus |
756 | 770 |
757 #endif // DBUS_BUS_H_ | 771 #endif // DBUS_BUS_H_ |
OLD | NEW |