summaryrefslogtreecommitdiffstats
path: root/dbus/test_service.h
Commit message (Collapse)AuthorAgeFilesLines
* dbus: Use base::MessageLoop.xhwang@chromium.org2013-05-011-1/+1
| | | | | | | | | BUG=236029 R=keybuk@chromium.org Review URL: https://chromiumcodereview.appspot.com/14386016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@197629 0039d316-1c4b-4281-b951-d872f2087c98
* Support D-Bus Object Managerkeybuk@chromium.org2013-03-251-0/+21
| | | | | | | | | | | | | | | | | Object Manager is a new standard D-Bus interface, closely related to the Properties interface. It is used by BlueZ 5.x thus the need to implement it now. The intended use is that Chrome D-Bus Client singletons set up a link to an object manager in their constructor and register themselves to handle their particular interface. BUG=220951 TEST=dbus_unittests Review URL: https://codereview.chromium.org/12491014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@190440 0039d316-1c4b-4281-b951-d872f2087c98
* DBus: Use TaskRunners instead of MessageLoopProxies.thestig@chromium.org2013-02-201-4/+4
| | | | | | Review URL: https://chromiumcodereview.appspot.com/12255043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@183362 0039d316-1c4b-4281-b951-d872f2087c98
* Make SignalSenderVerificationTest more robustharuki@chromium.org2012-11-141-3/+16
| | | | | | | | | | | | | | | Add more assertions and a callback to check the result of RequestOwnership. Original test can hang when test_service2_ tries to acquire the ownership before D-Bus recognizes test_service_'s disconnection. In that situation, test_service2_ cannot own the name and cannot send a message. BUG=158689 TEST=unittests Review URL: https://chromiumcodereview.appspot.com/11358111 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@167649 0039d316-1c4b-4281-b951-d872f2087c98
* Add sender verification of D-Bus signals.haruki@chromium.org2012-10-291-0/+6
| | | | | | | | | | | | | | | | | | The CL does the following: - Add a match rule for NameOwnerChanged signal from org.freedesktop.DBus. - Update the owner of the well-known bus name when a NameOwnerChanged comes. - Call GetNameOwner method to update the latest if ObjectProxy instance does not know the owner. - Verify the sender of the signal and reject the unknown senders. - Add UMA_HISTOGRAM_COUNTS "DBus.RejectedSignalCount" for rejected signals. and a unittest. BUG=140938 TEST=manual, unittests Review URL: https://chromiumcodereview.appspot.com/11199007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@164597 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-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | 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 Property handling for clientskeybuk@chromium.org2012-02-151-1/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | D-Bus properties can be tricky to handle due to their reliance on variants, and since they use a common interface, result in a lot of copy and paste code to deal with. Add an API that simplifies matters somewhat; detailed documentation is in dbus/property.h, but fundamentally you add a struct Properties to the client implementation derived from dbus::PropertySet, and in it declare members of dbus::Property<property type> and connect them in the constructor with RegisterProperty(name, ptr). The API works on two levels, from a higher-level each member of the structure is a type-safe way to obtain the current value of the property, update the value, and set a new value. From the lower-level, it uses a generic reader/writer based interface so that the parent structure's GetAll and signal handling methods can update the values without requiring knowledge of the contained type. BUG=chromium:109194 TEST=unit tests included in CL change-Id: I111b9e60a2c6c35edd9e0ea9f6976928c6c6474b Review URL: http://codereview.chromium.org/9380053 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@122039 0039d316-1c4b-4281-b951-d872f2087c98
* chrome: dbus: support asynchronous method repliesvlaviano@chromium.org2011-11-301-4/+12
| | | | | | | | | | | | 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-12/+4
| | | | | | | | | | | | | | | 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-4/+12
| | | | | | | | | | | | 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
* Add OVERRIDE to base/, dbus/.avi@chromium.org2011-11-231-1/+1
| | | | | | | | | BUG=104314 TEST=no change Review URL: http://codereview.chromium.org/8684001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111411 0039d316-1c4b-4281-b951-d872f2087c98
* Stop restricting the sender object path for incoming signals.satorux@chromium.org2011-09-141-0/+7
| | | | | | | | | | | | | | | | | | Restricting the sender path makes it impossible to test signal handling with dbus-send --type=signal, as it uses "/" as the sender object path. For now, let's remove the restriction. We can make this restriction customizable when it becomes necessary. This is for http://codereview.chromium.org/7862020/ TEST=dbus_unittests BUG=none Review URL: http://codereview.chromium.org/7845029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@101171 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: use MessageLoopProxy instead of base::Thread in our DBus client library. mdm@chromium.org2011-09-061-2/+6
| | | | | | | | | This allows us to use BrowserThread::GetMessageLoopProxyForThread() to specify the DBus thread. Also do a little bit of unrelated comment cleanup. BUG=90036 Review URL: http://codereview.chromium.org/7800023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99794 0039d316-1c4b-4281-b951-d872f2087c98
* Add Bus::ShutdownOnDBusThreadAndBlock() and remove bus::Shutdown()satorux@chromium.org2011-09-021-12/+4
| | | | | | | | | | | | | | | | This function is intended to use at the the very end of the browser shutdown, where it it makes more sense to shut down the bus synchronously, than trying to make it asynchronous. Remove Bus::Shutdown() as we are unlikely to need it for the production code. BUG=chromium:90036 TEST=dbus_unittests Review URL: http://codereview.chromium.org/7830009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99331 0039d316-1c4b-4281-b951-d872f2087c98
* Add support for sending and receiving D-Bus signals.satorux@chromium.org2011-08-231-2/+11
| | | | | | | | | | | | | | | | 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-18/+45
| | | | | | | | | | | | | | | | | 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/+73
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