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

Side by Side Diff: chromeos/dbus/ibus/ibus_component.cc

Issue 11361210: Extends IBusObject to handle attachment field. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix include order Created 8 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chromeos/dbus/ibus/ibus_lookup_table.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "chromeos/dbus/ibus/ibus_component.h" 5 #include "chromeos/dbus/ibus/ibus_component.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "chromeos/dbus/ibus/ibus_object.h" 8 #include "chromeos/dbus/ibus/ibus_object.h"
9 #include "dbus/message.h" 9 #include "dbus/message.h"
10 10
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 return false; 82 return false;
83 } 83 }
84 return true; 84 return true;
85 } 85 }
86 86
87 void AppendIBusEngineDesc(const IBusComponent::EngineDescription& engine_desc, 87 void AppendIBusEngineDesc(const IBusComponent::EngineDescription& engine_desc,
88 dbus::MessageWriter* writer) { 88 dbus::MessageWriter* writer) {
89 IBusObjectWriter ibus_object_writer("IBusEngineDesc", 89 IBusObjectWriter ibus_object_writer("IBusEngineDesc",
90 "ssssssssusss", 90 "ssssssssusss",
91 writer); 91 writer);
92 ibus_object_writer.CloseHeader();
92 ibus_object_writer.AppendString(engine_desc.engine_id); 93 ibus_object_writer.AppendString(engine_desc.engine_id);
93 ibus_object_writer.AppendString(engine_desc.display_name); 94 ibus_object_writer.AppendString(engine_desc.display_name);
94 ibus_object_writer.AppendString(engine_desc.description); 95 ibus_object_writer.AppendString(engine_desc.description);
95 ibus_object_writer.AppendString(engine_desc.language_code); 96 ibus_object_writer.AppendString(engine_desc.language_code);
96 ibus_object_writer.AppendString(""); // The license field is not used. 97 ibus_object_writer.AppendString(""); // The license field is not used.
97 ibus_object_writer.AppendString(engine_desc.author); 98 ibus_object_writer.AppendString(engine_desc.author);
98 ibus_object_writer.AppendString(""); // The icon path field is not used. 99 ibus_object_writer.AppendString(""); // The icon path field is not used.
99 ibus_object_writer.AppendString(engine_desc.layout); 100 ibus_object_writer.AppendString(engine_desc.layout);
100 ibus_object_writer.AppendUint32(0); // The engine rank is not used. 101 ibus_object_writer.AppendUint32(0); // The engine rank is not used.
101 ibus_object_writer.AppendString(""); // The hotkey field is not used. 102 ibus_object_writer.AppendString(""); // The hotkey field is not used.
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 return false; 187 return false;
187 } 188 }
188 engine_description->push_back(engine_description_entry); 189 engine_description->push_back(engine_description_entry);
189 } 190 }
190 return true; 191 return true;
191 } 192 }
192 193
193 void CHROMEOS_EXPORT AppendIBusComponent(const IBusComponent& ibus_component, 194 void CHROMEOS_EXPORT AppendIBusComponent(const IBusComponent& ibus_component,
194 dbus::MessageWriter* writer) { 195 dbus::MessageWriter* writer) {
195 IBusObjectWriter ibus_object_writer("IBusComponent", "ssssssssavav", writer); 196 IBusObjectWriter ibus_object_writer("IBusComponent", "ssssssssavav", writer);
197 ibus_object_writer.CloseHeader();
196 ibus_object_writer.AppendString(ibus_component.name()); 198 ibus_object_writer.AppendString(ibus_component.name());
197 ibus_object_writer.AppendString(ibus_component.description()); 199 ibus_object_writer.AppendString(ibus_component.description());
198 ibus_object_writer.AppendString(""); // The version string is not used. 200 ibus_object_writer.AppendString(""); // The version string is not used.
199 ibus_object_writer.AppendString(""); // The license field is not used. 201 ibus_object_writer.AppendString(""); // The license field is not used.
200 ibus_object_writer.AppendString(ibus_component.author()); 202 ibus_object_writer.AppendString(ibus_component.author());
201 ibus_object_writer.AppendString(""); // The URL field is not used. 203 ibus_object_writer.AppendString(""); // The URL field is not used.
202 ibus_object_writer.AppendString(""); // The exec path field is not used. 204 ibus_object_writer.AppendString(""); // The exec path field is not used.
203 ibus_object_writer.AppendString(""); // The text domain field is not used. 205 ibus_object_writer.AppendString(""); // The text domain field is not used.
204 // The observed object field is not used. 206 // The observed object field is not used.
205 dbus::MessageWriter empty_array_writer(NULL); 207 dbus::MessageWriter empty_array_writer(NULL);
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 language_code(language_code), 243 language_code(language_code),
242 author(author), 244 author(author),
243 layout(layout) { 245 layout(layout) {
244 } 246 }
245 247
246 IBusComponent::EngineDescription::~EngineDescription() { 248 IBusComponent::EngineDescription::~EngineDescription() {
247 } 249 }
248 250
249 } // namespace ibus 251 } // namespace ibus
250 } // namespace chromeos 252 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | chromeos/dbus/ibus/ibus_lookup_table.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698