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

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: Remove string.h include 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/bus.cc » ('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 also takes a bitfield of ObjectProxy::Options.
200 // See object_proxy.h for available options.
201 virtual ObjectProxy* GetObjectProxyWithOptions(
202 const std::string& service_name,
203 const std::string& object_path,
204 int options);
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 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
461 // ObjectProxyTable is used to hold the object proxies created by the 468 // ObjectProxyTable is used to hold the object proxies created by the
462 // bus object. Key is a concatenated string of service name + object path, 469 // bus object. Key is a concatenated string of service name + object path,
463 // like "org.chromium.TestService/org/chromium/TestObject". 470 // like "org.chromium.TestService/org/chromium/TestObject".
464 typedef std::map<std::string, 471 typedef std::map<std::string,
465 scoped_refptr<dbus::ObjectProxy> > ObjectProxyTable; 472 scoped_refptr<dbus::ObjectProxy> > ObjectProxyTable;
466 ObjectProxyTable object_proxy_table_; 473 ObjectProxyTable object_proxy_table_;
467 474
468 // ExportedObjectTable is used to hold the exported objects created by 475 // ExportedObjectTable is used to hold the exported objects created by
469 // the bus object. Key is a concatenated string of service name + 476 // the bus object. Key is a concatenated string of service name +
470 // object path, like "org.chromium.TestService/org/chromium/TestObject". 477 // object path, like "org.chromium.TestService/org/chromium/TestObject".
478 // If any ObjectProxy::Options were passed in, they are concatenated as an
479 // int to the end of the key.
satorux1 2012/02/10 18:09:01 This doesn't seem to be the right place. Move this
adamk 2012/02/10 19:28:21 Woops, this was meant to go above. I've updated t
471 typedef std::map<std::string, 480 typedef std::map<std::string,
472 scoped_refptr<dbus::ExportedObject> > ExportedObjectTable; 481 scoped_refptr<dbus::ExportedObject> > ExportedObjectTable;
473 ExportedObjectTable exported_object_table_; 482 ExportedObjectTable exported_object_table_;
474 483
475 bool async_operations_set_up_; 484 bool async_operations_set_up_;
476 bool shutdown_completed_; 485 bool shutdown_completed_;
477 486
478 // Counters to make sure that OnAddWatch()/OnRemoveWatch() and 487 // Counters to make sure that OnAddWatch()/OnRemoveWatch() and
479 // OnAddTimeout()/OnRemoveTimeou() are balanced. 488 // OnAddTimeout()/OnRemoveTimeou() are balanced.
480 int num_pending_watches_; 489 int num_pending_watches_;
481 int num_pending_timeouts_; 490 int num_pending_timeouts_;
482 491
483 DISALLOW_COPY_AND_ASSIGN(Bus); 492 DISALLOW_COPY_AND_ASSIGN(Bus);
484 }; 493 };
485 494
486 } // namespace dbus 495 } // namespace dbus
487 496
488 #endif // DBUS_BUS_H_ 497 #endif // DBUS_BUS_H_
OLDNEW
« no previous file with comments | « no previous file | dbus/bus.cc » ('j') | dbus/bus.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698