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_MESSAGE_H_ | 5 #ifndef DBUS_MESSAGE_H_ |
6 #define DBUS_MESSAGE_H_ | 6 #define DBUS_MESSAGE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 #include <dbus/dbus.h> | 10 #include <dbus/dbus.h> |
(...skipping 10 matching lines...) Expand all Loading... |
21 } // namespace protobuf | 21 } // namespace protobuf |
22 } // namespace google | 22 } // namespace google |
23 | 23 |
24 | 24 |
25 namespace dbus { | 25 namespace dbus { |
26 | 26 |
27 class MessageWriter; | 27 class MessageWriter; |
28 class MessageReader; | 28 class MessageReader; |
29 | 29 |
30 // DBUS_TYPE_UNIX_FD was added in D-Bus version 1.4 | 30 // DBUS_TYPE_UNIX_FD was added in D-Bus version 1.4 |
31 #if !defined(DBUS_TYPE_UNIX_FD) | 31 #if defined(DBUS_TYPE_UNIX_FD) |
| 32 const bool kDBusTypeUnixFdIsSupported = true; |
| 33 #else |
| 34 const bool kDBusTypeUnixFdIsSupported = false; |
32 #define DBUS_TYPE_UNIX_FD ((int) 'h') | 35 #define DBUS_TYPE_UNIX_FD ((int) 'h') |
33 #endif | 36 #endif |
34 | 37 |
35 // Message is the base class of D-Bus message types. Client code must use | 38 // Message is the base class of D-Bus message types. Client code must use |
36 // sub classes such as MethodCall and Response instead. | 39 // sub classes such as MethodCall and Response instead. |
37 // | 40 // |
38 // The class name Message is very generic, but there should be no problem | 41 // The class name Message is very generic, but there should be no problem |
39 // as the class is inside 'dbus' namespace. We chose to name this way, as | 42 // as the class is inside 'dbus' namespace. We chose to name this way, as |
40 // libdbus defines lots of types starting with DBus, such as | 43 // libdbus defines lots of types starting with DBus, such as |
41 // DBusMessage. We should avoid confusion and conflict with these types. | 44 // DBusMessage. We should avoid confusion and conflict with these types. |
(...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
470 | 473 |
471 Message* message_; | 474 Message* message_; |
472 DBusMessageIter raw_message_iter_; | 475 DBusMessageIter raw_message_iter_; |
473 | 476 |
474 DISALLOW_COPY_AND_ASSIGN(MessageReader); | 477 DISALLOW_COPY_AND_ASSIGN(MessageReader); |
475 }; | 478 }; |
476 | 479 |
477 } // namespace dbus | 480 } // namespace dbus |
478 | 481 |
479 #endif // DBUS_MESSAGE_H_ | 482 #endif // DBUS_MESSAGE_H_ |
OLD | NEW |