| 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 #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  Loading... | 
| 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  Loading... | 
| 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  Loading... | 
| 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 | 
| OLD | NEW | 
|---|