/// <reference path="./sigApi.ApiBase.d.ts" />
/// <reference path="./sigApi.View.d.ts" />

declare namespace SigApi {
    interface ApiViewSelection extends ApiBase {
        /**
         * Gets an array of all views
         * 
         * @returns {View[]} An array of all views
         */
        getViews(): View[]
        /**
         * Gets the current view
         * 
         * @returns {View}
         */
        getCurrentView(): View | null | undefined
        /**
         * Gets the display height
         * 
         * @returns {string}
         */
        displayHeight(): string
        /**
         * Gets the display width
         * 
         * @returns {string}
         */
        displayWidth(): string
        /**
         * Gets the aspect ratio of the display
         * 
         * @returns {number}
         */
        aspectRatio(): number
        /**
         * @returns {Promise<string>} resolve({string})
         */
        ipAddress(): Promise<string>
        /**
         * Requests the clientId from the Dataservice
         * 
         * @returns {Promise<number>} resolve({number}), reject({string})
         */
        clientId(): Promise<number>
        /**
         * Requests the clientId from the Dataservice
         * 
         * clientId is local when in range 0x0200 - 0x03FF
         * 
         * @returns {Promise<boolean>} resolve({boolean}), reject({string})
         */
        clientIsLocal(): Promise<boolean>
        /**
         * Requests the clientId from the Dataservice
         * 
         * clientId is remote when in range 0x0500 - 0x3FFF
         * 
         * @returns {Promise<boolean>} resolve({boolean}), reject({string})
         */
        clientIsRemote(): Promise<boolean>
        /**
         * Gets the browser name
         * 
         * @returns {string}
         */
        browserName(): string
        /**
         * Gets the browser isMobile flag
         * 
         * @returns {boolean}
         */
        isMobile(): boolean
        /**
         * Gets the browser orientation
         * 
         * @returns {string} undefined|'landscape'|'portrait'
         */
        orientation(): string | undefined
        /**
         * Function to check if parameter object is a instanceof View.
         * This function can be used without importing the type View to be used with the instanceof operator.
         * @param {*} object Any object to type check
         * @returns {boolean} Returns true if parameter object is instanceof View, else false
         */
        instanceofView(object: any): boolean
    }
}
