summaryrefslogtreecommitdiffstats
path: root/dbus/exported_object.h
Commit message (Collapse)AuthorAgeFilesLines
* dbus: Add comments about object ownershipsatorux@chromium.org2012-11-291-14/+21
| | | | | | | | | BUG=163231 TEST=none Review URL: https://codereview.chromium.org/11416252 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@170117 0039d316-1c4b-4281-b951-d872f2087c98
* dbus: Make it possible to build as shared_library.tfarina@chromium.org2012-11-051-1/+3
| | | | | | | | | | BUG=158887 R=satorux@chromium.org NOTRY=true Review URL: https://chromiumcodereview.appspot.com/11364033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165893 0039d316-1c4b-4281-b951-d872f2087c98
* Remove the rest of #pragma once in one big CL.ajwong@chromium.org2012-07-111-1/+0
| | | | | | | | | For context see this thread: https://groups.google.com/a/chromium.org/forum/?fromgroups#!topic/chromium-dev/RMcVNGjB4II TBR=thakis,pkasting,jam git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146163 0039d316-1c4b-4281-b951-d872f2087c98
* dbus: remove service name from ExportedObjectkeybuk@chromium.org2012-03-101-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | Well-known names in D-Bus are merely aliases to unique connection ids maintained by the bus, they have no purpose in qualifying object paths or interfaces and it's perfectly legimiate for a client to make requests to the unique connection id (e.g. in response to a signal, which does not reference the well-known name of the origin connection). Remove the service_name member from dbus::ExportedObject, from its constructor and from dbus::Bus::GetExportedObject and require code to call dbus::Bus::RequestOwnership if a well-known name is desired. This requires making that function callable from the origin thread with a callback for the return value. BUG=chromium-os:27101 TEST=dbus_unittests Change-Id: Ib91de8b68ad9c3b432e224a2c715f0c2ca1af463 Review URL: http://codereview.chromium.org/9668018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@125970 0039d316-1c4b-4281-b951-d872f2087c98
* dbus: add ObjectPath typekeybuk@google.com2012-02-141-3/+4
| | | | | | | | | | | | | | | | | | Rather than use std::string for object paths, add a dbus::ObjectPath type that wraps one while allowing more type-safety. This solves all sorts of issues with confusing object paths for strings, and allows us to do Properties code using templates disambiguating them from strings. BUG=chromium:109194 TEST=built and run tests Change-Id: Icaf6f19daea4af23a9d2ec0ed76d2cbd379d680e Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=121920 Review URL: https://chromiumcodereview.appspot.com/9378039 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@121941 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 121920 - dbus: add ObjectPath typedpapad@chromium.org2012-02-141-4/+3
| | | | | | | | | | | | | | | | | | | | Rather than use std::string for object paths, add a dbus::ObjectPath type that wraps one while allowing more type-safety. This solves all sorts of issues with confusing object paths for strings, and allows us to do Properties code using templates disambiguating them from strings. BUG=chromium:109194 TEST=built and run tests Change-Id: Icaf6f19daea4af23a9d2ec0ed76d2cbd379d680e Review URL: http://codereview.chromium.org/9378039 TBR=keybuk@chromium.org Review URL: https://chromiumcodereview.appspot.com/9363045 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@121923 0039d316-1c4b-4281-b951-d872f2087c98
* dbus: add ObjectPath typekeybuk@chromium.org2012-02-141-3/+4
| | | | | | | | | | | | | | | | | Rather than use std::string for object paths, add a dbus::ObjectPath type that wraps one while allowing more type-safety. This solves all sorts of issues with confusing object paths for strings, and allows us to do Properties code using templates disambiguating them from strings. BUG=chromium:109194 TEST=built and run tests Change-Id: Icaf6f19daea4af23a9d2ec0ed76d2cbd379d680e Review URL: http://codereview.chromium.org/9378039 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@121920 0039d316-1c4b-4281-b951-d872f2087c98
* chrome: dbus: support asynchronous method repliesvlaviano@chromium.org2011-11-301-3/+16
| | | | | | | | | | | | BUG=chromium-os:23241 TEST=Unit tests and manual testing on device. Change-Id: Iab009ddbd12dea1e12299ae0ddccd4e430d9cf97 Review URL: http://codereview.chromium.org/8728020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112131 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 111479 - chrome: dbus: support asynchronous method repliesthestig@chromium.org2011-11-241-16/+3
| | | | | | | | | | | | | | | BUG=chromium-os:23241 TEST=Unit tests and manual testing on device. Change-Id: I4d665897687030f4ab2379e4f6ddb9b3ebe02af4 Review URL: http://codereview.chromium.org/8637002 TBR=vlaviano@chromium.org Review URL: http://codereview.chromium.org/8682032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111487 0039d316-1c4b-4281-b951-d872f2087c98
* chrome: dbus: support asynchronous method repliesvlaviano@chromium.org2011-11-241-3/+16
| | | | | | | | | | | | BUG=chromium-os:23241 TEST=Unit tests and manual testing on device. Change-Id: I4d665897687030f4ab2379e4f6ddb9b3ebe02af4 Review URL: http://codereview.chromium.org/8637002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111479 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup: Remove unneeded forward declarations in base, dbug, gpu, ipc, ↵thestig@chromium.org2011-11-151-5/+3
| | | | | | | | | | jingle, and media. BUG=none TEST=none Review URL: http://codereview.chromium.org/8511045 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109998 0039d316-1c4b-4281-b951-d872f2087c98
* Make ExportedObject and ObjectProxy own Bus as scoped_refptr.satorux@chromium.org2011-10-131-1/+1
| | | | | | | | | | | | | | | | They should own Bus as scoped_refptr, rather than raw pointer. Otherwise, they may reference |bus_| after Bus is deleted. I know this is convoluted. I'm planning to minimize use of scoped_refptr from dbus/* but this change is necessary until then. TEST=run dbus_unittest under valgrind and confirm no memory leaks BUG=chromium-os:21379 Review URL: http://codereview.chromium.org/8201023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105222 0039d316-1c4b-4281-b951-d872f2087c98
* Eliminate a timed wait from ExportedObject::HandleMessage().satorux@chromium.org2011-10-071-3/+8
| | | | | | | | | | | | | | | | | Previouslly, we blocked in D-Bus thread until the method call is handled in the UI thread. Turned out this was a bad idea, and caused a crash when the UI thread is hanging (crosbug.com/21341). This patch will eliminate the timed wait and incoming methods will be handled completely asynchronously. BUG=chromium-os:21341 TEST=run dbus_unittests under valgrind Review URL: http://codereview.chromium.org/8175009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104497 0039d316-1c4b-4281-b951-d872f2087c98
* Eliminate hacks needed to work around a limitation of base::Bind()satorux@chromium.org2011-10-041-1/+1
| | | | | | | | | | | | | base::Bind() used to be unable to handle opaque type pointers, but the limitation was fixed in crrev.com/103627. BUG=crosbug.com/21166 TEST=build and run dbus_unittests Review URL: http://codereview.chromium.org/8124002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103881 0039d316-1c4b-4281-b951-d872f2087c98
* Add some histograms to the D-Bus library:satorux@chromium.org2011-09-061-1/+3
| | | | | | | | | | | | | | | | | | - DBus.SyncMethodCallTime: time spent to perform synchronos method calls - DBus.AsyncMethodCallTime: time spent to perform asynchronos method calls - DBus.SyncMethodCallSuccess: success ratio of synchronous method calls - DBus.AsyncMethodCallSuccess: success ratio of asynchronous method calls - DBus.ExportedMethodHandleTime: time spent to handle calls to export methods - DBus.ExportedMethodHandleSuccess: success ratio of the exported method calls - DBus.SignalHandleTime: time spent to handle signals - DBus.SignalSendTime: time spent to send signals BUG=chromium:90036 TEST=dbus_unittests Review URL: http://codereview.chromium.org/7824054 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99811 0039d316-1c4b-4281-b951-d872f2087c98
* Add mock classes for Bus, ObjectProxy, and ExportedObject.satorux@chromium.org2011-08-251-1/+4
| | | | | | | | | | | | Also add mock_unittest.cc that demonstrates how to mock synchronos and asynchronos D-Bus method calls. BUG=90036 TEST=dbus_unittests Review URL: http://codereview.chromium.org/7714030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98188 0039d316-1c4b-4281-b951-d872f2087c98
* Add support for sending and receiving D-Bus signals.satorux@chromium.org2011-08-231-2/+10
| | | | | | | | | | | | | | | | ObjectProxy is used to receive signals from the remote object. ExportedObject is used to send signals from the exported object. Note that signals are asynchronos so we don't have a test in end_to_end_sync_unittest.cc BUG=90036 TEST=run unit tests Review URL: http://codereview.chromium.org/7655033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97831 0039d316-1c4b-4281-b951-d872f2087c98
* Rework TestService using asynchronos API of ExportedObject.satorux@chromium.org2011-08-201-4/+2
| | | | | | | | | | | | | | | | | This change is to to exercise asynchronos API of ExportedObject. The asynchronos API is implemented on top the synchronos API, hence the synchronos API code is also covered. Along the way, change EndToEndAsyncTest to use the D-Bus thread. Simplified the test code per phajdan.jr's comments as well. TEST=dbus_unittests BUG=90036 Review URL: http://codereview.chromium.org/7671028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97540 0039d316-1c4b-4281-b951-d872f2087c98
* Implement Bus and ObjectProxy classes for our D-Bus library.satorux@chromium.org2011-08-171-0/+144
ObjectProxy is used to access remote objects. ExportedObject is used to export objects to other D-Bus BUG=90036 TEST=run unit tests. The code is not yet used in Chrome. Review URL: http://codereview.chromium.org/7491029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97204 0039d316-1c4b-4281-b951-d872f2087c98