import { PythonPathResult } from '../analyzer/pythonPathUtils' ; import { PythonPlatform } from './configOptions' ; import { PythonVersion } from './pythonVersion' ; export const enum HostKind { FullAccess , LimitedAccess , NoAccess } export interface Host { readonly kind : HostKind ; getPythonSearchPaths ( pythonPath ? , logInfo ? ) : PythonPathResult ; getPythonVersion ( pythonPath ? , logInfo ? ) : PythonVersion | undefined ; getPythonPlatform ( logInfo ? ) : PythonPlatform | undefined ; } export class NoAccessHost implements Host { get kind ( ) : HostKind { return HostKind . NoAccess ; } getPythonSearchPaths ( pythonPath ? , logInfo ? ) { logInfo ?. push ( 'No access to python executable.' ) ; return { paths : [ ] , prefix : '' , } ; } getPythonVersion ( pythonPath ? , logInfo ? ) { return undefined ; } getPythonPlatform ( logInfo ? ) { return undefined ; } } export type HostFactory = ( ) => Host ;