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