Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(348)

Side by Side Diff: dbus/bus.h

Issue 125673003: dbus: Add comments about the right way to expose methods (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | dbus/exported_object.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « no previous file | dbus/exported_object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698