| 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_services"] | 5 [DartPackage="mojo_services"] |
| 6 module nfc; | 6 module nfc; |
| 7 | 7 |
| 8 struct NfcData { | 8 struct NfcData { |
| 9 array<uint8>? data; | 9 array<uint8>? data; |
| 10 }; | 10 }; |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 // Received data is passed to all registered NfcReceivers. | 25 // Received data is passed to all registered NfcReceivers. |
| 26 [ServiceName="nfc::Nfc"] | 26 [ServiceName="nfc::Nfc"] |
| 27 interface Nfc { | 27 interface Nfc { |
| 28 // Puts the MojoShell in a state where it will transmit |nfc_data| to the next | 28 // Puts the MojoShell in a state where it will transmit |nfc_data| to the next |
| 29 // Android device to connect to this one via NFC. This transmission state | 29 // Android device to connect to this one via NFC. This transmission state |
| 30 // will remain active until cancelled via |transmission| or a |success| | 30 // will remain active until cancelled via |transmission| or a |success| |
| 31 // response is received indicating whether the transmission was successful | 31 // response is received indicating whether the transmission was successful |
| 32 // (true) or not (false). If the Android device transmitted to does not have | 32 // (true) or not (false). If the Android device transmitted to does not have |
| 33 // MojoShell installed it will be directed to the Play Store to download | 33 // MojoShell installed it will be directed to the Play Store to download |
| 34 // MojoShell. | 34 // MojoShell. |
| 35 TransmitOnNextConnection(NfcData nfc_data, NfcTransmission&? transmission) | 35 TransmitOnNextConnection(NfcData nfc_data, NfcTransmission&? transmission) =>
(bool success); |
| 36 => (bool success); | |
| 37 | 36 |
| 38 // Registers an app to receive nfc messages. Upon receiving an nfc message | 37 // Registers an app to receive nfc messages. Upon receiving an nfc message |
| 39 // the app will be connected to. If the app exposes a NfcReceiver interface | 38 // the app will be connected to. If the app exposes a NfcReceiver interface |
| 40 // it will be called with the message received. | 39 // it will be called with the message received. |
| 41 Register(); | 40 Register(); |
| 42 | 41 |
| 43 // Unregisters an app previously registered via |Register()|. | 42 // Unregisters an app previously registered via |Register()|. |
| 44 Unregister(); | 43 Unregister(); |
| 45 }; | 44 }; |
| OLD | NEW |