lavva.exalushome
Version:
Library implementing communication and abstraction layers for ExalusHome system
39 lines (38 loc) • 1.13 kB
TypeScript
import { IEvent } from "../Event";
import { IDIService } from "../IDIService";
import { ITypedEvent } from "../TypedEvent";
export interface IAppStateService extends IDIService {
get CurrentAppState(): AppState;
Suspend(): void;
ReturnFromSuspension(): void;
EnterLowPowerMode(): void;
ExitLowPowerMode(): void;
IsWorkingInWebView(): boolean;
IsActive(): boolean;
ReturnedFromSuspension(): boolean;
IsInBackground(): boolean;
IsHibernationAllowed(): boolean;
DisallowHibernation(): void;
AllowHibernation(): void;
OnReturnedFromSuspension(): IEvent;
OnSuspended(): IEvent;
OnEnterLowPowerMode(): IEvent;
OnExitLowPowerMode(): IEvent;
OnBackButtonPressed(): IEvent;
OnForwardButtonPressed(): IEvent;
OnAppStateChanged(): ITypedEvent<AppState>;
}
export declare enum AppState {
Suspended = 1,
ReturnedFromSuspension = 2,
EnteredLowPowerMode = 3,
ExitedLowPowerMode = 4,
LoggedIn = 5,
LoggedOut = 6,
Connected = 7,
Disconnected = 8,
FailedToConnect = 9,
Connecting = 10,
Disconnecting = 11,
Reconnecting = 12
}