OLD | NEW |
| (Empty) |
1 // Copyright 2013 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. | |
4 | |
5 #ifndef MOJO_GENERATED_BINDINGS_SAMPLE_SERVICE_SERIALIZATION_H_ | |
6 #define MOJO_GENERATED_BINDINGS_SAMPLE_SERVICE_SERIALIZATION_H_ | |
7 | |
8 #include <string.h> | |
9 | |
10 #include "mojo/public/bindings/lib/bindings_serialization.h" | |
11 #include "mojo/public/bindings/sample/generated/sample_service.h" | |
12 | |
13 namespace mojo { | |
14 namespace internal { | |
15 | |
16 template <> | |
17 class ObjectTraits<sample::Bar> { | |
18 public: | |
19 static size_t ComputeSizeOf(const sample::Bar* bar); | |
20 static sample::Bar* Clone(const sample::Bar* bar, Buffer* buf); | |
21 static void EncodePointersAndHandles(sample::Bar* bar, | |
22 std::vector<mojo::Handle>* handles); | |
23 static bool DecodePointersAndHandles(sample::Bar* bar, | |
24 const mojo::Message& message); | |
25 }; | |
26 | |
27 template <> | |
28 class ObjectTraits<sample::Foo> { | |
29 public: | |
30 static size_t ComputeSizeOf(const sample::Foo* foo); | |
31 static sample::Foo* Clone(const sample::Foo* foo, Buffer* buf); | |
32 static void EncodePointersAndHandles(sample::Foo* foo, | |
33 std::vector<mojo::Handle>* handles); | |
34 static bool DecodePointersAndHandles(sample::Foo* foo, | |
35 const mojo::Message& message); | |
36 }; | |
37 | |
38 } // namespace internal | |
39 } // namespace mojo | |
40 | |
41 #endif // MOJO_GENERATED_BINDINGS_SAMPLE_SERVICE_SERIALIZATION_H_ | |
OLD | NEW |