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 <dbus/dbus.h> | 8 #include <dbus/dbus.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 // | 81 // |
82 // dbus::Bus::Options options; | 82 // dbus::Bus::Options options; |
83 // // Set up the bus options here. | 83 // // Set up the bus options here. |
84 // ... | 84 // ... |
85 // dbus::Bus bus(options); | 85 // dbus::Bus bus(options); |
86 // | 86 // |
87 // dbus::ObjectProxy* object_proxy = | 87 // dbus::ObjectProxy* object_proxy = |
88 // bus.GetObjectProxy(service_name, object_path); | 88 // bus.GetObjectProxy(service_name, object_path); |
89 // | 89 // |
90 // dbus::MethodCall method_call(interface_name, method_name); | 90 // dbus::MethodCall method_call(interface_name, method_name); |
91 // scoped_ptr<dbus::Response> response( | 91 // std::unique_ptr<dbus::Response> response( |
92 // object_proxy.CallMethodAndBlock(&method_call, timeout_ms)); | 92 // object_proxy.CallMethodAndBlock(&method_call, timeout_ms)); |
93 // if (response.get() != NULL) { // Success. | 93 // if (response.get() != NULL) { // Success. |
94 // ... | 94 // ... |
95 // } | 95 // } |
96 // | 96 // |
97 // Asynchronous method call: | 97 // Asynchronous method call: |
98 // | 98 // |
99 // void OnResponse(dbus::Response* response) { | 99 // void OnResponse(dbus::Response* response) { |
100 // // response is NULL if the method call failed. | 100 // // response is NULL if the method call failed. |
101 // if (!response) | 101 // if (!response) |
(...skipping 655 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
757 int num_pending_timeouts_; | 757 int num_pending_timeouts_; |
758 | 758 |
759 std::string address_; | 759 std::string address_; |
760 | 760 |
761 DISALLOW_COPY_AND_ASSIGN(Bus); | 761 DISALLOW_COPY_AND_ASSIGN(Bus); |
762 }; | 762 }; |
763 | 763 |
764 } // namespace dbus | 764 } // namespace dbus |
765 | 765 |
766 #endif // DBUS_BUS_H_ | 766 #endif // DBUS_BUS_H_ |
OLD | NEW |