diff --git a/src/plugins/base64togallery.ts b/src/plugins/base64togallery.ts new file mode 100644 index 000000000..0c48f1af0 --- /dev/null +++ b/src/plugins/base64togallery.ts @@ -0,0 +1,31 @@ +import {Plugin, Cordova} from './plugin' +/** + * @name Base64 To Gallery + * @description This plugin allows you to save base64 data as a png image into the device + * @platforms Android, iOS, Windows Phone + * @usage + * ```ts + * Base64ToGallery.base64ToGallery(base64Data, 'img_').then( + * res => console.log("Saved image to gallery ", res), + * err => console.log("Error saving image to gallery ", err) + * ); + * ``` + */ +@Plugin({ + plugin: 'cordova-base64-to-gallery', + pluginRef: 'cordova', + repo: 'https://github.com/Nexxa/cordova-base64-to-gallery' +}) +export class Base64ToGallery { + + /** + * + * @param data + * @param prefix + */ + @Cordova() + base64ToGallery(data : string , prefix? : string ) : Promise { + return + } + +} \ No newline at end of file diff --git a/src/plugins/dbmeter.ts b/src/plugins/dbmeter.ts new file mode 100644 index 000000000..00fd2afd8 --- /dev/null +++ b/src/plugins/dbmeter.ts @@ -0,0 +1,67 @@ +import {Plugin, Cordova} from './plugin' +import {Observable} from "rxjs/Observable"; +/** + * @name DB Meter + * @description This plugin defines a global DBMeter object, which permits to get the decibel values from the microphone. + * @platforms Android, iOS + * @usage + * ```ts + * // Start listening + * let subscription = DBMeter.start().subscribe( + * data => console.log(data) + * ); + * + * // Check if we are listening + * DBMeter.isListening().then( + * (isListening : boolean) => console.log(isListening) + * ); + * + * // Stop listening + * subscription.unsubscribe(); + * + * // Delete DBMeter instance from memory + * DBMeter.delete().then( + * () => console.log("Deleted DB Meter instance"), + * error => console.log("Error occurred while deleting DB Meter instance") + * ); + * ``` + */ +@Plugin({ + plugin: 'cordova-plugin-dbmeter', + pluginRef: 'DBMeter', + repo: 'https://github.com/akofman/cordova-plugin-dbmeter' +}) +export class DBMeter { + + /** + * Starts listening + * @return {Observable} Returns an observable. Subscribe to start listening. Unsubscribe to stop listening. + */ + @Cordova({ + observable: true, + clearFunction: 'stop' + }) + static start () : Observable {return} + + /** + * Stops listening + * @private + */ + @Cordova() + static stop () : Promise {return} + + /** + * Check if the DB Meter is listening + * @return {Promise} Returns a promise that resolves with a boolean that tells us whether the DB meter is listening + */ + @Cordova() + static isListening() : Promise {return} + + /** + * Delete the DB Meter instance + * @return {Promise} Returns a promise that will resolve if the instance has been deleted, and rejects if errors occur. + */ + @Cordova() + static delete() : Promise {return} + +} \ No newline at end of file diff --git a/src/plugins/hotspot.ts b/src/plugins/hotspot.ts new file mode 100644 index 000000000..89106b1be --- /dev/null +++ b/src/plugins/hotspot.ts @@ -0,0 +1,100 @@ +import {Plugin, Cordova} from './plugin' + +/** + * @name Hotspot + * @description + * @platforms Android + * @usage + */ +@Plugin({ + plugin: 'cordova-plugin-hotspot', + pluginRef: 'cordova.plugnis.hotspot', + repo: 'https://github.com/hypery2k/cordova-hotspot-plugin' +}) +export class Hotspot { + + @Cordova() + static isAvailable() : Promise {return} + + @Cordova() + static toggleWifi() : Promise {return} + + @Cordova() + static createHotspot(ssid : string, mode : string, password : string) : Promise {return} + + @Cordova() + static startHotspot() : Promise {return} + + @Cordova() + static configureHotspot(ssid : string, mode : string, password : string) : Promise {return} + + @Cordova() + static stopHotspot() : Promise {return} + + @Cordova() + static isHotspotEnabled() : Promise {return} + + @Cordova() + static getAllHotspotDevices() : Promise {return} + + @Cordova() + static connectToHotspot(ssid, password) : Promise {return} + + @Cordova() + static connectToWifiAuthEncrypt(ssid, password, authentication, encryption) : Promise {return} + + @Cordova() + static addWifiNetwork(ssid, mode, password) : Promise {return} + + @Cordova() + static removeWifiNetwork(ssid) : Promise {return} + + @Cordova() + static isConnectedToInternet() : Promise {return} + + @Cordova() + static isConnectedToInternetViaWifi() : Promise {return} + + @Cordova() + static isWifiOn() : Promise {return} + + @Cordova() + static isWifiSupported() : Promise {return} + + @Cordova() + static isWifiDirectSupported() : Promise {return} + + @Cordova() + static scanWifi() : Promise {return} + + @Cordova() + static scanWifiByLevel() : Promise {return} + + @Cordova() + static startPeriodicallyScan(interval, duration) : Promise {return} + + @Cordova() + static stopPeriodicallyScan() : Promise {return} + + @Cordova() + static getNetConfig() : Promise {return} + + @Cordova() + static getConnectionInfo() : Promise {return} + + @Cordova() + static pingHost(ip) : Promise {return} + + @Cordova() + static getMacAddressOfHost(ip) : Promise {return} + + @Cordova() + static isDnsLive(ip) : Promise {return} + + @Cordova() + static isPortLife(ip) : Promise {return} + + @Cordova() + static isRooted() : Promise {return} + +} \ No newline at end of file diff --git a/src/plugins/keyboard.ts b/src/plugins/keyboard.ts new file mode 100644 index 000000000..d44915406 --- /dev/null +++ b/src/plugins/keyboard.ts @@ -0,0 +1,50 @@ +import {Cordova, Plugin} from './plugin' +import {Observable} from "rxjs/Observable"; + +@Plugin({ + plugin: 'ionic-plugin-keyboard', + pluginRef: 'cordova.plugins.Keyboard', + repo: 'https://github.com/driftyco/ionic-plugin-keyboard' +}) +export class Keyboard { + + /** + * Hide the keyboard accessory bar with the next, previous and done buttons. + * @param hide {boolean} + */ + @Cordova({ + sync: true + }) + static hideKeyboardAccessoryBar(hide : boolean) : void {} + + /** + * Close the keyboard if open + */ + @Cordova({ + sync: true + }) + static close() : void {} + + @Cordova({ + sync: true + }) + static disableScroll(disable : boolean) : void {} + + @Cordova({ + sync: true + }) + static show() : void {} + + @Cordova({ + sync: true + }) + static close() : void {} + + //static onKeyboardShow() : Observable { + // return new Observable( + // observer => { + // + // } + // ); + //} +} \ No newline at end of file diff --git a/src/plugins/splashscreen.ts b/src/plugins/splashscreen.ts new file mode 100644 index 000000000..0069d163b --- /dev/null +++ b/src/plugins/splashscreen.ts @@ -0,0 +1,36 @@ +import {Plugin, Cordova} from './plugin' + +/** + * @name Splashscreen + * @description This plugin displays and hides a splash screen during application launch. The methods below allows showing and hiding the splashscreen after the app has loaded. + * @usage + * ```ts + * Splashscreen.show(); + * + * Splashscreen.hide(); + * ``` + */ +@Plugin({ + plugin: 'cordova-plugin-splashscreen', + pluginRef: 'navigator.splashscreen', + repo: 'https://github.com/apache/cordova-plugin-splashscreen' +}) +export class Splashscreen { + + /** + * Shows the splashscreen + */ + @Cordova({ + sync: true + }) + static show() : void {} + + /** + * Hides the splashscreen + */ + @Cordova({ + sync: true + }) + static hide() : void {} + +} \ No newline at end of file