| 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_OBJECT_PATH_H_ | 5 #ifndef DBUS_OBJECT_PATH_H_ |
| 6 #define DBUS_OBJECT_PATH_H_ | 6 #define DBUS_OBJECT_PATH_H_ |
| 7 | 7 |
| 8 #include <iosfwd> |
| 8 #include <string> | 9 #include <string> |
| 9 | 10 |
| 10 #include "dbus/dbus_export.h" | 11 #include "dbus/dbus_export.h" |
| 11 | 12 |
| 12 namespace dbus { | 13 namespace dbus { |
| 13 | 14 |
| 14 // ObjectPath is a type used to distinguish D-Bus object paths from simple | 15 // ObjectPath is a type used to distinguish D-Bus object paths from simple |
| 15 // strings, especially since normal practice is that these should be only | 16 // strings, especially since normal practice is that these should be only |
| 16 // initialized from static constants or obtained from remote objects and no | 17 // initialized from static constants or obtained from remote objects and no |
| 17 // assumptions about their value made. | 18 // assumptions about their value made. |
| (...skipping 21 matching lines...) Expand all Loading... |
| 39 | 40 |
| 40 // Permit testing for equality, required for mocks to work and useful for | 41 // Permit testing for equality, required for mocks to work and useful for |
| 41 // observers. | 42 // observers. |
| 42 bool operator==(const ObjectPath&) const; | 43 bool operator==(const ObjectPath&) const; |
| 43 bool operator!=(const ObjectPath&) const; | 44 bool operator!=(const ObjectPath&) const; |
| 44 | 45 |
| 45 private: | 46 private: |
| 46 std::string value_; | 47 std::string value_; |
| 47 }; | 48 }; |
| 48 | 49 |
| 50 // This is required by gtest to print a readable output on test failures. |
| 51 CHROME_DBUS_EXPORT void PrintTo(const ObjectPath& path, std::ostream* out); |
| 52 |
| 49 } // namespace dbus | 53 } // namespace dbus |
| 50 | 54 |
| 51 #endif // DBUS_OBJECT_PATH_H_ | 55 #endif // DBUS_OBJECT_PATH_H_ |
| OLD | NEW |