OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "chrome/common/remoting/chromoting_host_info.h" |
| 6 #include "ipc/ipc_channel_handle.h" |
| 7 |
5 #define IPC_MESSAGE_IMPL | 8 #define IPC_MESSAGE_IMPL |
6 #include "chrome/common/service_messages.h" | 9 #include "chrome/common/service_messages.h" |
| 10 |
| 11 namespace IPC { |
| 12 |
| 13 void ParamTraits<remoting::ChromotingHostInfo> ::Write( |
| 14 Message* m, const param_type& p) { |
| 15 WriteParam(m, p.host_id); |
| 16 WriteParam(m, p.hostname); |
| 17 WriteParam(m, p.public_key); |
| 18 WriteParam(m, p.enabled); |
| 19 WriteParam(m, p.email); |
| 20 } |
| 21 |
| 22 bool ParamTraits<remoting::ChromotingHostInfo> ::Read( |
| 23 const Message* m, void** iter, param_type* p) { |
| 24 bool ret = ReadParam(m, iter, &p->host_id); |
| 25 ret = ret && ReadParam(m, iter, &p->hostname); |
| 26 ret = ret && ReadParam(m, iter, &p->public_key); |
| 27 ret = ret && ReadParam(m, iter, &p->enabled); |
| 28 ret = ret && ReadParam(m, iter, &p->email); |
| 29 return ret; |
| 30 } |
| 31 |
| 32 void ParamTraits<remoting::ChromotingHostInfo> ::Log( |
| 33 const param_type& p, std::string* l) { |
| 34 l->append("("); |
| 35 LogParam(p.host_id, l); |
| 36 l->append(", "); |
| 37 LogParam(p.hostname, l); |
| 38 l->append(", "); |
| 39 LogParam(p.public_key, l); |
| 40 l->append(", "); |
| 41 LogParam(p.enabled, l); |
| 42 l->append(", "); |
| 43 LogParam(p.email, l); |
| 44 l->append(")"); |
| 45 } |
| 46 |
| 47 } // namespace IPC |
OLD | NEW |