OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 virtual ObjectProxy* GetObjectProxy(const std::string& service_name, | 223 virtual ObjectProxy* GetObjectProxy(const std::string& service_name, |
224 const ObjectPath& object_path); | 224 const ObjectPath& object_path); |
225 | 225 |
226 // Same as above, but also takes a bitfield of ObjectProxy::Options. | 226 // Same as above, but also takes a bitfield of ObjectProxy::Options. |
227 // See object_proxy.h for available options. | 227 // See object_proxy.h for available options. |
228 virtual ObjectProxy* GetObjectProxyWithOptions( | 228 virtual ObjectProxy* GetObjectProxyWithOptions( |
229 const std::string& service_name, | 229 const std::string& service_name, |
230 const ObjectPath& object_path, | 230 const ObjectPath& object_path, |
231 int options); | 231 int options); |
232 | 232 |
| 233 // Removes the previously created object proxy for the given service |
| 234 // name and the object path and releases its memory. |
| 235 // |
| 236 // If and object proxy for the given service name and object was |
| 237 // created with GetObjectProxy, this function removes it from the |
| 238 // bus object and detaches the ObjectProxy, invalidating any pointer |
| 239 // previously acquired for it with GetObjectProxy. A subsequent call |
| 240 // to GetObjectProxy will return a new object. |
| 241 // |
| 242 // All the object proxies are detached from remote objects at the |
| 243 // shutdown time of the bus, but they can be detached early to reduce |
| 244 // memory footprint and match rules for the bus connection. |
| 245 // |
| 246 // |service_name| looks like "org.freedesktop.NetworkManager", and |
| 247 // |object_path| looks like "/org/freedesktop/NetworkManager/Devices/0". |
| 248 // |
| 249 // Must be called in the origin thread. |
| 250 virtual void RemoveObjectProxy(const std::string& service_name, |
| 251 const ObjectPath& object_path); |
| 252 |
| 253 // Same as above, but also takes a bitfield of ObjectProxy::Options. |
| 254 // See object_proxy.h for available options. |
| 255 virtual void RemoveObjectProxyWithOptions( |
| 256 const std::string& service_name, |
| 257 const ObjectPath& object_path, |
| 258 int options); |
| 259 |
233 // Gets the exported object for the given object path. | 260 // Gets the exported object for the given object path. |
234 // The caller must not delete the returned object. | 261 // The caller must not delete the returned object. |
235 // | 262 // |
236 // Returns an existing exported object if the bus object already owns | 263 // Returns an existing exported object if the bus object already owns |
237 // the exported object for the given object path. Never returns NULL. | 264 // the exported object for the given object path. Never returns NULL. |
238 // | 265 // |
239 // The bus will own all exported objects created by the bus, to ensure | 266 // The bus will own all exported objects created by the bus, to ensure |
240 // that the exported objects are unregistered at the shutdown time of | 267 // that the exported objects are unregistered at the shutdown time of |
241 // the bus. | 268 // the bus. |
242 // | 269 // |
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
547 int num_pending_timeouts_; | 574 int num_pending_timeouts_; |
548 | 575 |
549 std::string address_; | 576 std::string address_; |
550 | 577 |
551 DISALLOW_COPY_AND_ASSIGN(Bus); | 578 DISALLOW_COPY_AND_ASSIGN(Bus); |
552 }; | 579 }; |
553 | 580 |
554 } // namespace dbus | 581 } // namespace dbus |
555 | 582 |
556 #endif // DBUS_BUS_H_ | 583 #endif // DBUS_BUS_H_ |
OLD | NEW |