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 #ifndef IPC_IPC_MESSAGE_UTILS_H_ | 5 #ifndef IPC_IPC_MESSAGE_UTILS_H_ |
6 #define IPC_IPC_MESSAGE_UTILS_H_ | 6 #define IPC_IPC_MESSAGE_UTILS_H_ |
7 | 7 |
8 #include <algorithm> | 8 #include <algorithm> |
9 #include <map> | 9 #include <map> |
10 #include <set> | 10 #include <set> |
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
289 | 289 |
290 template <> | 290 template <> |
291 struct IPC_EXPORT ParamTraits<std::vector<unsigned char> > { | 291 struct IPC_EXPORT ParamTraits<std::vector<unsigned char> > { |
292 typedef std::vector<unsigned char> param_type; | 292 typedef std::vector<unsigned char> param_type; |
293 static void Write(Message* m, const param_type& p); | 293 static void Write(Message* m, const param_type& p); |
294 static bool Read(const Message* m, PickleIterator* iter, param_type* r); | 294 static bool Read(const Message* m, PickleIterator* iter, param_type* r); |
295 static void Log(const param_type& p, std::string* l); | 295 static void Log(const param_type& p, std::string* l); |
296 }; | 296 }; |
297 | 297 |
298 template <> | 298 template <> |
| 299 struct IPC_EXPORT ParamTraits<std::vector<signed char> > { |
| 300 typedef std::vector<signed char> param_type; |
| 301 static void Write(Message* m, const param_type& p); |
| 302 static bool Read(const Message* m, PickleIterator* iter, param_type* r); |
| 303 static void Log(const param_type& p, std::string* l); |
| 304 }; |
| 305 |
| 306 template <> |
299 struct IPC_EXPORT ParamTraits<std::vector<bool> > { | 307 struct IPC_EXPORT ParamTraits<std::vector<bool> > { |
300 typedef std::vector<bool> param_type; | 308 typedef std::vector<bool> param_type; |
301 static void Write(Message* m, const param_type& p); | 309 static void Write(Message* m, const param_type& p); |
302 static bool Read(const Message* m, PickleIterator* iter, param_type* r); | 310 static bool Read(const Message* m, PickleIterator* iter, param_type* r); |
303 static void Log(const param_type& p, std::string* l); | 311 static void Log(const param_type& p, std::string* l); |
304 }; | 312 }; |
305 | 313 |
306 template <class P> | 314 template <class P> |
307 struct ParamTraits<std::vector<P> > { | 315 struct ParamTraits<std::vector<P> > { |
308 typedef std::vector<P> param_type; | 316 typedef std::vector<P> param_type; |
(...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
841 template<typename TA, typename TB, typename TC, typename TD, typename TE> | 849 template<typename TA, typename TB, typename TC, typename TD, typename TE> |
842 static void WriteReplyParams(Message* reply, TA a, TB b, TC c, TD d, TE e) { | 850 static void WriteReplyParams(Message* reply, TA a, TB b, TC c, TD d, TE e) { |
843 ReplyParam p(a, b, c, d, e); | 851 ReplyParam p(a, b, c, d, e); |
844 WriteParam(reply, p); | 852 WriteParam(reply, p); |
845 } | 853 } |
846 }; | 854 }; |
847 | 855 |
848 } // namespace IPC | 856 } // namespace IPC |
849 | 857 |
850 #endif // IPC_IPC_MESSAGE_UTILS_H_ | 858 #endif // IPC_IPC_MESSAGE_UTILS_H_ |
OLD | NEW |