import { I18N, Filter, BundleId, BundleManifestJson, Framework, Bundle, FrameworkEvent, ServiceEvent, ServiceInstance, ServiceProperties, ServiceRegistration, ServiceReference, BundleEventListener, EventHandle, FrameworkEventListener, ServiceEventListener, ExecutionEnvironment } from '../api/index.js'; import { InternalBundleController, Statistics, InternalBundle, InternalFramework } from '../api/internal.js'; import 'apprt-core/Types'; interface BundleControllerConstructorOptions { statistics?: Statistics | undefined; } declare function setChangeRequire(change: boolean): void; declare class BundleControllerImpl implements InternalBundleController { private _bundles; private _bundleNamesToIds; private _bundleState; private _serviceCounter; private _services; private _globalI18n; private _statistics; private _defaultStartLevel; _globalI18nInstance: I18N; constructor(opts?: BundleControllerConstructorOptions); createFilter(filter: string | Filter): Filter; getMaxStartLevel(): number; getBundles(): InternalBundle[]; filterBundles(filter: string | Filter | ((b: InternalBundle) => boolean)): InternalBundle[]; getBundleById(id: BundleId): InternalBundle | undefined; getBundleByName(name: string | undefined): InternalBundle | undefined; getBundle(filter: string | Filter): InternalBundle | undefined; getSystemBundle(): InternalFramework; installFramework(location: string | undefined, manifest: BundleManifestJson): Framework; installBundle(location: string | undefined, manifest: BundleManifestJson): Bundle; _installBundle(location: string | undefined, manifestJSON: BundleManifestJson): InternalBundle; uninstallBundle(bundle: Bundle): Promise; private _uninstallBundle; startBundle(bundle: Bundle, recursiveStartList?: Record): Promise; private _resolveBundle; private _startBundle; private _triggerActivatorStart; stopBundle(bundle: Bundle, recursiveStopList?: Record): Promise; private _stopBundle; private _triggerActivatorStop; fireFrameworkChanged(evt: FrameworkEvent): void; fireServiceChanged(evt: ServiceEvent): void; private _fireEvt; private _cleanUpBundle; releaseAllServices(bundle: Bundle): void; registerService(bundle: Bundle, clazzes: string | string[], service: ServiceInstance, properties?: ServiceProperties): ServiceRegistration; unregisterService(registration: ServiceRegistration): void; getServicesInUse(bundle: Bundle): ServiceReference[]; getRegisteredServices(bundle: Bundle): ServiceReference[]; getServiceReferences(bundle: Bundle, interfaceName?: string, filter?: string | Filter): ServiceReference[]; /** * @deprecated */ getServiceReferencesProvidedByRequiredBundles(bundle: Bundle, interfaceName?: string, filterString?: string): ServiceReference[]; isServiceCreated(bundle: Bundle, reference: ServiceReference): boolean; isServiceUsed(bundle: Bundle, reference: ServiceReference): boolean; getService(bundle: Bundle, reference: ServiceReference): T | undefined; ungetService(bundle: Bundle, reference: ServiceReference): boolean; addBundleListener(sourceBundle: Bundle, cb: BundleEventListener | string, scope: undefined): EventHandle; removeBundleListener(sourceBundle: Bundle, handle: EventHandle | EventHandle[]): void; addFrameworkListener(sourceBundle: Bundle, cb: FrameworkEventListener | string, scope: any): EventHandle; removeFrameworkListener(sourceBundle: Bundle, handle: EventHandle | EventHandle[]): void; addServiceListener(sourceBundle: Bundle, filter: string | Filter, cb: ServiceEventListener | string, scope: any): EventHandle; removeServiceListener(sourceBundle: Bundle, handle: EventHandle | EventHandle[]): void; private _filterServiceEvent; private _fireErrorIfEventHandlerThrows; private _addHandle; private _removeHandle; private _getBundleId; private _getBundleState; private _isBundleInState; private _checkBundleNotInState; _requireBundleClass(bundle: Bundle, clazzName: string | undefined): any | Promise; private isOneOfExecutionEnvironmentSupported; getExecutionEnvironment(): ExecutionEnvironment; private _lookupInScope; _checkGlobalI18N(bundle: InternalBundle): void; } type AnyFunc = (...args: any[]) => any; declare function bind(scope: any, fn: string | AnyFunc): AnyFunc; export { bind, BundleControllerImpl as default, setChangeRequire }; export type { BundleControllerConstructorOptions };