summaryrefslogtreecommitdiffstats
path: root/dbus/property.cc
Commit message (Collapse)AuthorAgeFilesLines
* bluetooth: Create stub manager, adapter and device.keybuk@chromium.org2012-08-151-3/+4
| | | | | | | | | | | | | | | | | | | | These stub classes are used when building Chrome on Linux with chromeos=1. They allow sufficient UI to work to show a Bluetooth adapter, enable and disable it, and show an unconnected fake device associated with it. This can be trivially extended to provide all manner of fake Bluetooth information for UI development. BUG=chromium-os:28555 TEST=out/Debug/chrome Change-Id: I7af28be76355fad735389aaf2fa499d0a8dfd76b Review URL: https://chromiumcodereview.appspot.com/10823301 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@151621 0039d316-1c4b-4281-b951-d872f2087c98
* Coverity: Initialize member variables.jhawkins@chromium.org2012-07-251-1/+1
| | | | | | | | | | | | | | CID_COUNT=12 CID=104349,104361,104373,104374,104399,104420,104421,104422,104466,104476, 104532,104538 BUG=none TEST=none R=groby TBR=brettw,satorux,mnissler Review URL: https://chromiumcodereview.appspot.com/10833006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148430 0039d316-1c4b-4281-b951-d872f2087c98
* dbus: move logic from Property<> to PropertySetkeybuk@chromium.org2012-06-281-59/+89
| | | | | | | | | | | | | | | | | | | | | | Rather than implement Get() and Set() in dbus::Property<> move the code into dbus::PropertySet and pass a pointer to the property to operate on from the wrapper call. The advange of this way of doing things is that it's much easier to make subclasses, since you only need to subclass dbus::PropertySet; and ths makes it possible to mock. BUG=chromium-os:28555 TEST=dbus_unittests Change-Id: I760ca608d1e0a17422c11e0115c053d98be33fe0 R=satorux@chromium.org Review URL: https://chromiumcodereview.appspot.com/10698027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@144756 0039d316-1c4b-4281-b951-d872f2087c98
* READABILITY for Keybukkeybuk@chromium.org2012-03-221-5/+2
| | | | | | | | | | | | BUG=none TEST=dbus_unittests & emerge chromeos-chrome change-Id: I111b9e60a2c6c35edd9e0ea9f6976928c6c6474b Review URL: http://codereview.chromium.org/9407019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@128286 0039d316-1c4b-4281-b951-d872f2087c98
* dbus: clear array values before reading from variantkeybuk@google.com2012-03-211-0/+2
| | | | | | | | | | | | | | | | | | PopArrayFromVariant() appends values to the existing value, rather than clearing first like I expected, so using this without clear() first means the property value accumulates all values and never loses them. BUG=none TEST=unit test included Change-Id: Ie392a89190f4ad8570a905f24b2f446e1f2bed81 R=satorux@chromium.org Review URL: https://chromiumcodereview.appspot.com/9809001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@128108 0039d316-1c4b-4281-b951-d872f2087c98
* dbus: slight cleanup to Property codekeybuk@chromium.org2012-02-171-3/+0
| | | | | | | | | | | | | | | | | | | | | Correct comments based on practice that worked best for the bluetooth adapter and device clients, in particular adding the virtual destructor to the struct and cleaning up the return values of GetObject() in the documentation. Drop VLOG() calls, there's no need to debug at this level, you can use dbus-monitor to see the incoming and outgoing calls to Chromium and can add logging in upper layers when there are real values to log. BUG=none TEST=built on try bots Change-Id: I2ac6b55e288626b5f9cd843935887e261d386dec Review URL: http://codereview.chromium.org/9418035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@122522 0039d316-1c4b-4281-b951-d872f2087c98
* dbus: add Property handling for clientskeybuk@chromium.org2012-02-151-0/+425
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