dbus-c++: deprecate Connection::request_name

Connection::request_name is kind of broken, in that it doesn't
actually tell you whether or not you got the name. Callers
should use acquire_name instead of request_name, so mark
request_name as deprecated.

While there, mark acquire_name with the warn_unused_result
attribute. That way, callers will know that they need to
check the return value. (acquire_name will return false
to indicate that acquisition failed.)

BUG=chromium:364556
TEST=manual
CQ-DEPEND=CL:197066

Manual test: compiled some code that uses request_name,
saw that the compiler generated a warning. Added some
code that called acquire_name, but did not check its
return value. Saw a compiler warning for that, too.

Change-Id: Ied3088d0722df160526cc75a81c3158ff793eaee
Reviewed-on: https://chromium-review.googlesource.com/195420
Reviewed-by: mukesh agrawal <quiche@chromium.org>
Commit-Queue: mukesh agrawal <quiche@chromium.org>
Tested-by: mukesh agrawal <quiche@chromium.org>
1 file changed