Index: chromeos/dbus/ibus/ibus_object.h |
diff --git a/chromeos/dbus/ibus/ibus_object.h b/chromeos/dbus/ibus/ibus_object.h |
index b37e09c22919bd20f1503afc12b43cf1154b0788..d978df03792e7e066b39c3ea3cdb9655934b42cd 100644 |
--- a/chromeos/dbus/ibus/ibus_object.h |
+++ b/chromeos/dbus/ibus/ibus_object.h |
@@ -9,6 +9,7 @@ |
#include "base/basictypes.h" |
#include "base/memory/scoped_ptr.h" |
#include "chromeos/chromeos_export.h" |
+#include "chromeos/dbus/ibus/ibus_text.h" |
namespace dbus { |
class MessageReader; |
@@ -99,11 +100,14 @@ class CHROMEOS_EXPORT IBusObjectReader { |
// Sets up |reader| for reading an IBusObject entry. |
bool PopIBusObject(IBusObjectReader* reader); |
- // Returns main reader if the specified IBusObject is valid, otherwise returns |
- // NULL. This reader corresponds to second depth struct field(see above |
- // description). This function is useful in the case of adding other |
- // IBusObjects. |
- dbus::MessageReader* GetContentsReader(); |
+ // Pops a IBusText. |
+ // Returns true on success. |
+ bool PopIBusText(ibus::IBusText* text); |
+ |
+ // Pops a IBusText and store it's text field into |text|. Use PopIBusText |
+ // instead in the case of using any attribute entries in IBusText. |
+ // Return true on success. |
+ bool PopStringFromIBusText(std::string* text); |
private: |
enum CheckResult { |
@@ -167,13 +171,14 @@ class CHROMEOS_EXPORT IBusObjectWriter { |
// Returns true if writer is initialized. |
bool IsInitialized() const; |
- // Returns main contents writer if it is initialized, otherwise returns NULL. |
- // this writer corresponds to second depth struct(see above description). This |
- // function is useful in the case of appeding other IBusObjects. |
- dbus::MessageWriter* GetContentsWriter(); |
+ // Appends a IBusText. |
+ void AppendIBusText(const ibus::IBusText& text); |
+ |
+ // Appends a string as IBusText without any attributes. Use AppendIBusText |
+ // instead in the case of using any attribute entries. |
+ void AppendStringAsIBusText(const std::string& text); |
private: |
- friend class TestableIBusObjectWriter; |
// Appends IBusObject headers, should be called once. |
void Init(); |