Updates version of android sdk and api installed and creates ARM and x86 AVD's.
[chromium-blink-merge.git] / ppapi / proxy / pepper_file_messages.cc
blob53b4fcb363602895436d91a8973bfe6be1346679
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
3 // found in the LICENSE file.
6 // Get basic type definitions.
7 #define IPC_MESSAGE_IMPL
8 #include "ppapi/proxy/pepper_file_messages.h"
10 // Generate constructors.
11 #include "ipc/struct_constructor_macros.h"
12 #include "ppapi/proxy/pepper_file_messages.h"
14 // Generate destructors.
15 #include "ipc/struct_destructor_macros.h"
16 #include "ppapi/proxy/pepper_file_messages.h"
18 // Generate param traits write methods.
19 #include "ipc/param_traits_write_macros.h"
20 namespace IPC {
21 #include "ppapi/proxy/pepper_file_messages.h"
22 } // namespace IPC
24 // Generate param traits read methods.
25 #include "ipc/param_traits_read_macros.h"
26 namespace IPC {
27 #include "ppapi/proxy/pepper_file_messages.h"
28 } // namespace IPC
30 // Generate param traits log methods.
31 #include "ipc/param_traits_log_macros.h"
32 namespace IPC {
33 #include "ppapi/proxy/pepper_file_messages.h"
34 } // namespace IPC
36 namespace IPC {
38 void ParamTraits<ppapi::PepperFilePath>::Write(Message* m,
39 const param_type& p) {
40 WriteParam(m, static_cast<unsigned>(p.domain()));
41 WriteParam(m, p.path());
44 bool ParamTraits<ppapi::PepperFilePath>::Read(const Message* m,
45 PickleIterator* iter,
46 param_type* p) {
47 unsigned domain;
48 FilePath path;
49 if (!ReadParam(m, iter, &domain) || !ReadParam(m, iter, &path))
50 return false;
51 if (domain > ppapi::PepperFilePath::DOMAIN_MAX_VALID)
52 return false;
54 *p = ppapi::PepperFilePath(
55 static_cast<ppapi::PepperFilePath::Domain>(domain), path);
56 return true;
59 void ParamTraits<ppapi::PepperFilePath>::Log(const param_type& p,
60 std::string* l) {
61 l->append("(");
62 LogParam(static_cast<unsigned>(p.domain()), l);
63 l->append(", ");
64 LogParam(p.path(), l);
65 l->append(")");
68 } // namespace IPC