Lines Matching refs:bus

5 #include "dbus/bus.h"
78 scoped_refptr<Bus> bus = new Bus(options);
81 bus->GetObjectProxy("org.chromium.TestService",
87 bus->GetObjectProxy("org.chromium.TestService",
94 bus->GetObjectProxy(
100 bus->ShutdownAndBlock();
105 scoped_refptr<Bus> bus = new Bus(options);
108 bus->GetObjectProxyWithOptions(
116 bus->GetObjectProxyWithOptions(
125 bus->GetObjectProxyWithOptions(
132 bus->ShutdownAndBlock();
145 // Create the bus.
148 scoped_refptr<Bus> bus = new Bus(options);
149 ASSERT_FALSE(bus->shutdown_completed());
153 bus->RemoveObjectProxy("org.chromium.TestService",
158 bus->GetObjectProxy("org.chromium.TestService",
166 // Remove the object from the bus. This will invalidate any other usage of
170 bus->RemoveObjectProxy("org.chromium.TestService",
175 // from the bus, but not deleted from memory.
177 bus->GetObjectProxy("org.chromium.TestService",
189 bus->ShutdownOnDBusThreadAndBlock();
190 EXPECT_TRUE(bus->shutdown_completed());
196 scoped_refptr<Bus> bus = new Bus(options);
199 bus->GetExportedObject(ObjectPath("/org/chromium/TestObject"));
204 bus->GetExportedObject(ObjectPath("/org/chromium/TestObject"));
210 bus->GetExportedObject(
215 bus->ShutdownAndBlock();
225 // Create the bus.
228 scoped_refptr<Bus> bus = new Bus(options);
229 ASSERT_FALSE(bus->shutdown_completed());
232 bus->GetExportedObject(ObjectPath("/org/chromium/TestObject"));
240 bus->UnregisterExportedObject(ObjectPath("/org/chromium/TestObject"));
245 bus->GetExportedObject(ObjectPath("/org/chromium/TestObject"));
253 bus->ShutdownOnDBusThreadAndBlock();
254 EXPECT_TRUE(bus->shutdown_completed());
260 scoped_refptr<Bus> bus = new Bus(options);
261 ASSERT_FALSE(bus->shutdown_completed());
264 bus->ShutdownAndBlock();
265 EXPECT_TRUE(bus->shutdown_completed());
275 // Create the bus.
278 scoped_refptr<Bus> bus = new Bus(options);
279 ASSERT_FALSE(bus->shutdown_completed());
282 bus->ShutdownOnDBusThreadAndBlock();
283 EXPECT_TRUE(bus->shutdown_completed());
289 scoped_refptr<Bus> bus = new Bus(options);
291 bus->Connect();
295 ASSERT_TRUE(bus->AddFilterFunction(&DummyHandler, &data1));
297 ASSERT_FALSE(bus->AddFilterFunction(&DummyHandler, &data1));
299 ASSERT_TRUE(bus->AddFilterFunction(&DummyHandler, &data2));
301 ASSERT_TRUE(bus->RemoveFilterFunction(&DummyHandler, &data1));
302 ASSERT_FALSE(bus->RemoveFilterFunction(&DummyHandler, &data1));
303 ASSERT_TRUE(bus->RemoveFilterFunction(&DummyHandler, &data2));
305 bus->ShutdownAndBlock();
310 scoped_refptr<Bus> bus = new Bus(options);
313 bus->Connect();
316 bus->AddMatch(
321 bus->AddMatch(
327 ASSERT_TRUE(bus->RemoveMatch(
332 // The rule should be still in the bus since it was removed only once.
334 ASSERT_TRUE(bus->RemoveMatch(
340 ASSERT_FALSE(bus->RemoveMatch(
344 bus->ShutdownAndBlock();
353 // Create the bus.
355 scoped_refptr<Bus> bus = new Bus(bus_options);
365 bus->ListenForServiceOwnerChange("org.chromium.TestService", callback1);
367 bus->ListenForServiceOwnerChange("org.chromium.TestService", callback1);
375 ASSERT_TRUE(bus->RequestOwnershipAndBlock("org.chromium.TestService",
383 bus->GetServiceOwnerAndBlock("org.chromium.TestService",
402 bus->ListenForServiceOwnerChange("org.chromium.TestService", callback2);
407 ASSERT_TRUE(bus->ReleaseOwnership("org.chromium.TestService"));
416 bus->UnlistenForServiceOwnerChange("org.chromium.TestService", callback1);
417 bus->UnlistenForServiceOwnerChange("org.chromium.TestService", callback2);
421 bus->ShutdownAndBlock();
422 EXPECT_TRUE(bus->shutdown_completed());