| OLD | NEW |
| 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_OBJECT_PROXY_H_ | 5 #ifndef DBUS_OBJECT_PROXY_H_ |
| 6 #define DBUS_OBJECT_PROXY_H_ | 6 #define DBUS_OBJECT_PROXY_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <map> |
| 9 #include <string> | 10 #include <string> |
| 10 #include <vector> | 11 #include <vector> |
| 11 #include <dbus/dbus.h> | 12 #include <dbus/dbus.h> |
| 12 | 13 |
| 13 #include "base/callback.h" | 14 #include "base/callback.h" |
| 14 #include "base/memory/ref_counted.h" | 15 #include "base/memory/ref_counted.h" |
| 15 | 16 |
| 16 class MessageLoop; | 17 class MessageLoop; |
| 17 | 18 |
| 18 namespace dbus { | 19 namespace dbus { |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 const std::string& signal_name, | 98 const std::string& signal_name, |
| 98 SignalCallback signal_callback, | 99 SignalCallback signal_callback, |
| 99 OnConnectedCallback on_connected_callback); | 100 OnConnectedCallback on_connected_callback); |
| 100 | 101 |
| 101 // Detaches from the remote object. The Bus object will take care of | 102 // Detaches from the remote object. The Bus object will take care of |
| 102 // detaching so you don't have to do this manually. | 103 // detaching so you don't have to do this manually. |
| 103 // | 104 // |
| 104 // BLOCKING CALL. | 105 // BLOCKING CALL. |
| 105 virtual void Detach(); | 106 virtual void Detach(); |
| 106 | 107 |
| 108 protected: |
| 109 // This is protected, so we can define sub classes. |
| 110 virtual ~ObjectProxy(); |
| 111 |
| 107 private: | 112 private: |
| 108 friend class base::RefCountedThreadSafe<ObjectProxy>; | 113 friend class base::RefCountedThreadSafe<ObjectProxy>; |
| 109 virtual ~ObjectProxy(); | |
| 110 | 114 |
| 111 // Struct of data we'll be passing from StartAsyncMethodCall() to | 115 // Struct of data we'll be passing from StartAsyncMethodCall() to |
| 112 // OnPendingCallIsCompleteThunk(). | 116 // OnPendingCallIsCompleteThunk(). |
| 113 struct OnPendingCallIsCompleteData { | 117 struct OnPendingCallIsCompleteData { |
| 114 OnPendingCallIsCompleteData(ObjectProxy* in_object_proxy, | 118 OnPendingCallIsCompleteData(ObjectProxy* in_object_proxy, |
| 115 ResponseCallback in_response_callback); | 119 ResponseCallback in_response_callback); |
| 116 ~OnPendingCallIsCompleteData(); | 120 ~OnPendingCallIsCompleteData(); |
| 117 | 121 |
| 118 ObjectProxy* object_proxy; | 122 ObjectProxy* object_proxy; |
| 119 ResponseCallback response_callback; | 123 ResponseCallback response_callback; |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 MethodTable method_table_; | 180 MethodTable method_table_; |
| 177 | 181 |
| 178 std::vector<std::string> match_rules_; | 182 std::vector<std::string> match_rules_; |
| 179 | 183 |
| 180 DISALLOW_COPY_AND_ASSIGN(ObjectProxy); | 184 DISALLOW_COPY_AND_ASSIGN(ObjectProxy); |
| 181 }; | 185 }; |
| 182 | 186 |
| 183 } // namespace dbus | 187 } // namespace dbus |
| 184 | 188 |
| 185 #endif // DBUS_OBJECT_PROXY_H_ | 189 #endif // DBUS_OBJECT_PROXY_H_ |
| OLD | NEW |