| 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_EXPORTED_OBJECT_H_ | 5 #ifndef DBUS_EXPORTED_OBJECT_H_ |
| 6 #define DBUS_EXPORTED_OBJECT_H_ | 6 #define DBUS_EXPORTED_OBJECT_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <map> | 10 #include <map> |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 | 137 |
| 138 // Redirects the function call to HandleMessage(). | 138 // Redirects the function call to HandleMessage(). |
| 139 static DBusHandlerResult HandleMessageThunk(DBusConnection* connection, | 139 static DBusHandlerResult HandleMessageThunk(DBusConnection* connection, |
| 140 DBusMessage* raw_message, | 140 DBusMessage* raw_message, |
| 141 void* user_data); | 141 void* user_data); |
| 142 | 142 |
| 143 // Redirects the function call to OnUnregistered(). | 143 // Redirects the function call to OnUnregistered(). |
| 144 static void OnUnregisteredThunk(DBusConnection* connection, | 144 static void OnUnregisteredThunk(DBusConnection* connection, |
| 145 void* user_data); | 145 void* user_data); |
| 146 | 146 |
| 147 Bus* bus_; | 147 scoped_refptr<Bus> bus_; |
| 148 std::string service_name_; | 148 std::string service_name_; |
| 149 std::string object_path_; | 149 std::string object_path_; |
| 150 bool object_is_registered_; | 150 bool object_is_registered_; |
| 151 | 151 |
| 152 // The method table where keys are absolute method names (i.e. interface | 152 // The method table where keys are absolute method names (i.e. interface |
| 153 // name + method name), and values are the corresponding callbacks. | 153 // name + method name), and values are the corresponding callbacks. |
| 154 typedef std::map<std::string, MethodCallCallback> MethodTable; | 154 typedef std::map<std::string, MethodCallCallback> MethodTable; |
| 155 MethodTable method_table_; | 155 MethodTable method_table_; |
| 156 }; | 156 }; |
| 157 | 157 |
| 158 } // namespace dbus | 158 } // namespace dbus |
| 159 | 159 |
| 160 #endif // DBUS_EXPORTED_OBJECT_H_ | 160 #endif // DBUS_EXPORTED_OBJECT_H_ |
| OLD | NEW |