| 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 15 matching lines...) Expand all Loading... |
| 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) |
| 36 => (bool success); | 36 => (bool success); |
| 37 | 37 |
| 38 // Registers an app to receive nfc messages. Upon receiving an nfc message | 38 // 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 | 39 // the app will be connected to. If the app exposes a NfcReceiver interface |
| 40 // it will be called with the message received. | 40 // it will be called with the message received. |
| 41 Register(); | 41 Register(); |
| 42 | 42 |
| 43 // Unregisters an app previously registered via |Register()|. | 43 // Unregisters an app previously registered via |Register()|. |
| 44 Unregister(); | 44 Unregister(); |
| 45 }; | 45 }; |
| OLD | NEW |