Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(103)

Unified Diff: chromeos/dbus/ibus/ibus_object.h

Issue 10384141: Extends IBusObject. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Introduce Pop/AppendIBusText as member function. Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chromeos/dbus/ibus/ibus_object.cc » ('j') | chromeos/dbus/ibus/ibus_object.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« no previous file with comments | « no previous file | chromeos/dbus/ibus/ibus_object.cc » ('j') | chromeos/dbus/ibus/ibus_object.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698