mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2026-04-13 00:00:10 +08:00
Merge in v5 code
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
declare var serial: any;
|
||||
@@ -69,7 +69,9 @@ export class Serial extends IonicNativePlugin {
|
||||
successIndex: 1,
|
||||
errorIndex: 2
|
||||
})
|
||||
requestPermission(options?: SerialPermissionOptions): Promise<any> { return; }
|
||||
requestPermission(options?: SerialPermissionOptions): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Open connection to a serial device
|
||||
@@ -78,7 +80,9 @@ export class Serial extends IonicNativePlugin {
|
||||
* @return {Promise<any>} Returns a promise that resolves when the serial connection is opened
|
||||
*/
|
||||
@Cordova()
|
||||
open(options: SerialOpenOptions): Promise<any> { return; }
|
||||
open(options: SerialOpenOptions): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Write to a serial connection
|
||||
@@ -87,7 +91,9 @@ export class Serial extends IonicNativePlugin {
|
||||
* @return {Promise<any>} Returns a promise that resolves when the write is complete
|
||||
*/
|
||||
@Cordova()
|
||||
write(data: any): Promise<any> { return; }
|
||||
write(data: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Write hex to a serial connection
|
||||
@@ -96,7 +102,9 @@ export class Serial extends IonicNativePlugin {
|
||||
* @return {Promise<any>} Returns a promise that resolves when the write is complete
|
||||
*/
|
||||
@Cordova()
|
||||
writeHex(data: any): Promise<any> { return; }
|
||||
writeHex(data: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Read from a serial connection
|
||||
@@ -104,7 +112,9 @@ export class Serial extends IonicNativePlugin {
|
||||
* @return {Promise<any>} Returns a promise that resolves with data read from the serial connection
|
||||
*/
|
||||
@Cordova()
|
||||
read(): Promise<any> { return; }
|
||||
read(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Watch the incoming data from the serial connection. Clear the watch by unsubscribing from the observable
|
||||
@@ -114,7 +124,9 @@ export class Serial extends IonicNativePlugin {
|
||||
@Cordova({
|
||||
observable: true
|
||||
})
|
||||
registerReadCallback(): Observable<any> { return; }
|
||||
registerReadCallback(): Observable<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Close the serial connection
|
||||
@@ -122,6 +134,8 @@ export class Serial extends IonicNativePlugin {
|
||||
* @return {Promise<any>} Returns a promise that resolves when the serial connection is closed
|
||||
*/
|
||||
@Cordova()
|
||||
close(): Promise<any> { return; }
|
||||
close(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user