refractor(background-mode): refractor interfaces names to avoid duplicates

This commit is contained in:
Ibby 2016-12-06 08:45:44 -05:00
parent 59a382d6df
commit 4abb6ec78e

View File

@ -2,6 +2,38 @@ import { Cordova, CordovaFunctionOverride, Plugin } from './plugin';
import { Observable } from 'rxjs/Observable';
/**
* Configurations items that can be updated.
*/
export interface BackgroundModeConfiguration {
/**
* Title of the background task
*/
title?: String;
/**
* The text that scrolls itself on statusbar
*/
ticker?: String;
/**
* Description of background task
*/
text?: String;
/**
* if true plugin will not display a notification. Default is false.
*/
silent?: boolean;
/**
* By default the app will come to foreground when taping on the notification. If false, plugin wont come to foreground when tapped.
*/
resume?: boolean;
}
/**
* @name Background Mode
* @description
@ -13,19 +45,9 @@ import { Observable } from 'rxjs/Observable';
*
* BackgroundMode.enable();
* ```
*
* @advanced
*
* Configuration options
*
* | Property | Type | Description |
* |----------|-----------|------------------------------------------------------------------------------|
* | title | `string` | Title of the background task. Optional |
* | ticker | `string` | The text that scrolls itself on the statusbar. Optional |
* | text | `string` | Description of the background task. Optional |
* | silent | `boolean` | If the plugin will display a notification or not. Default is false. Optional |
* | resume | `boolean` | Bring the app into the foreground if the notification is tapped. Optional |
*
*
* @interfaces
* BackgroundModeConfiguration
*/
@Plugin({
pluginName: 'BackgroundMode',
@ -74,7 +96,7 @@ export class BackgroundMode {
@Cordova({
platforms: ['Android']
})
static setDefaults(options?: Configure): Promise<any> { return; }
static setDefaults(options?: BackgroundModeConfiguration): Promise<any> { return; }
/**
* Modify the displayed information.
@ -84,7 +106,7 @@ export class BackgroundMode {
@Cordova({
platforms: ['Android']
})
static configure(options?: Configure): Promise<any> { return; }
static configure(options?: BackgroundModeConfiguration): Promise<any> { return; }
/**
* Called when background mode is activated.
@ -108,35 +130,3 @@ export class BackgroundMode {
static onfailure(): Observable<any> { return; };
}
/**
* Configurations items that can be updated.
*/
export interface Configure {
/**
*Title of the background task
*/
title?: String;
/**
*The text that scrolls itself on statusbar
*/
ticker?: String;
/**
*Description of background task
*/
text?: String;
/**
*Boolean, if true plugin will not display a notification. Default is false.
*/
silent?: boolean;
/**
*Boolean. By default the app will come to foreground when taping on the notification. If false, plugin wont come to foreground when tapped.
*/
resume?: boolean;
}