OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 [DartPackage="_mojo_for_test_only"] | 5 [DartPackage="_mojo_for_test_only"] |
6 module mojo.test.versioning; | 6 module mojo.test.versioning; |
7 | 7 |
8 // versioning_test_service.mojom and versioning_test_client.mojom contain | 8 // versioning_test_service.mojom and versioning_test_client.mojom contain |
9 // different versions of Mojom definitions for a fictitious human resource | 9 // different versions of Mojom definitions for a fictitious human resource |
10 // management system. They are used to test the versioning mechanism. | 10 // management system. They are used to test the versioning mechanism. |
11 | 11 |
12 enum Department { | 12 enum Department { |
13 SALES, | 13 SALES, |
14 DEV | 14 DEV, |
15 }; | 15 }; |
16 | 16 |
17 struct Employee { | 17 struct Employee { |
18 uint64 employee_id; | 18 uint64 employee_id; |
19 string name; | 19 string name; |
20 Department department; | 20 Department department; |
21 }; | 21 }; |
22 | 22 |
23 [ServiceName="mojo::test::versioning::HumanResourceDatabase"] | 23 [ServiceName="mojo::test::versioning::HumanResourceDatabase"] |
24 interface HumanResourceDatabase { | 24 interface HumanResourceDatabase { |
25 AddEmployee(Employee employee) => (bool success); | 25 AddEmployee(Employee employee) => (bool success); |
26 | 26 |
27 QueryEmployee(uint64 id, [MinVersion=1] bool retrieve_finger_print) | 27 QueryEmployee(uint64 id, [MinVersion=1] bool retrieve_finger_print) |
28 => (Employee? employee, [MinVersion=1] array<uint8>? finger_print); | 28 => (Employee? employee, [MinVersion=1] array<uint8>? finger_print); |
29 | 29 |
30 [MinVersion=1] | 30 [MinVersion=1] |
31 AttachFingerPrint(uint64 id, array<uint8> finger_print) | 31 AttachFingerPrint(uint64 id, array<uint8> finger_print) => (bool success); |
32 => (bool success); | |
33 | 32 |
34 [MinVersion=2] | 33 [MinVersion=2] |
35 ListEmployeeIds() => (array<uint64>? ids); | 34 ListEmployeeIds() => (array<uint64>? ids); |
36 }; | 35 }; |
OLD | NEW |