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

Side by Side Diff: dbus/bus.h

Issue 9373039: Allow dbus clients to silence logging when a service is unavailable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 10 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/bus.cc » ('j') | dbus/object_proxy.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 // The object proxy is used to call methods of remote objects, and 189 // The object proxy is used to call methods of remote objects, and
190 // receive signals from them. 190 // receive signals from them.
191 // 191 //
192 // |service_name| looks like "org.freedesktop.NetworkManager", and 192 // |service_name| looks like "org.freedesktop.NetworkManager", and
193 // |object_path| looks like "/org/freedesktop/NetworkManager/Devices/0". 193 // |object_path| looks like "/org/freedesktop/NetworkManager/Devices/0".
194 // 194 //
195 // Must be called in the origin thread. 195 // Must be called in the origin thread.
196 virtual ObjectProxy* GetObjectProxy(const std::string& service_name, 196 virtual ObjectProxy* GetObjectProxy(const std::string& service_name,
197 const std::string& object_path); 197 const std::string& object_path);
198 198
199 // Same as above, but silence logging of
200 // org.freedesktop.DBus.Error.ServiceUnknown errors.
201 // This is useful for clients for whom the non-existence of the DBus
202 // service in question can be safely ignored.
203 virtual ObjectProxy* GetObjectProxyIgnoreUnknownService(
satorux1 2012/02/10 08:12:52 Let's make this more generic, like GetObjectProxyW
adamk 2012/02/10 17:57:16 Done.
204 const std::string& service_name, const std::string& object_path);
205
199 // Gets the exported object for the given service name and the object 206 // Gets the exported object for the given service name and the object
200 // path. The caller must not delete the returned object. 207 // path. The caller must not delete the returned object.
201 // 208 //
202 // Returns an existing exported object if the bus object already owns 209 // Returns an existing exported object if the bus object already owns
203 // the exported object for the given service name and the object path. 210 // the exported object for the given service name and the object path.
204 // Never returns NULL. 211 // Never returns NULL.
205 // 212 //
206 // The bus will own all exported objects created by the bus, to ensure 213 // The bus will own all exported objects created by the bus, to ensure
207 // that the exported objects are unregistered at the shutdown time of 214 // that the exported objects are unregistered at the shutdown time of
208 // the bus. 215 // the bus.
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
479 // OnAddTimeout()/OnRemoveTimeou() are balanced. 486 // OnAddTimeout()/OnRemoveTimeou() are balanced.
480 int num_pending_watches_; 487 int num_pending_watches_;
481 int num_pending_timeouts_; 488 int num_pending_timeouts_;
482 489
483 DISALLOW_COPY_AND_ASSIGN(Bus); 490 DISALLOW_COPY_AND_ASSIGN(Bus);
484 }; 491 };
485 492
486 } // namespace dbus 493 } // namespace dbus
487 494
488 #endif // DBUS_BUS_H_ 495 #endif // DBUS_BUS_H_
OLDNEW
« no previous file with comments | « no previous file | dbus/bus.cc » ('j') | dbus/object_proxy.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698