feat(devicemanager): Introduce a UniversalDevice architecture with composable Feature system; add extensive new device/protocol support and discovery/refactors
This commit is contained in:
142
ts/index.ts
142
ts/index.ts
@@ -1,24 +1,78 @@
|
||||
/**
|
||||
* @push.rocks/devicemanager
|
||||
* A device manager for discovering and communicating with network scanners and printers
|
||||
* A comprehensive device manager for discovering and communicating with network devices
|
||||
* Supports: Scanners, Printers, SNMP devices, UPS, DLNA, Sonos, AirPlay, Chromecast
|
||||
*/
|
||||
|
||||
// Main exports
|
||||
// Main exports from DeviceManager
|
||||
export {
|
||||
DeviceManager,
|
||||
MdnsDiscovery,
|
||||
NetworkScanner,
|
||||
SsdpDiscovery,
|
||||
Scanner,
|
||||
Printer,
|
||||
SnmpDevice,
|
||||
UpsDevice,
|
||||
DlnaRenderer,
|
||||
DlnaServer,
|
||||
Speaker,
|
||||
SonosSpeaker,
|
||||
AirPlaySpeaker,
|
||||
ChromecastSpeaker,
|
||||
SERVICE_TYPES,
|
||||
SSDP_SERVICE_TYPES,
|
||||
} from './devicemanager.classes.devicemanager.js';
|
||||
|
||||
// Abstract/base classes
|
||||
export { Device } from './abstract/device.abstract.js';
|
||||
|
||||
// Protocol implementations
|
||||
export { EsclProtocol, SaneProtocol } from './scanner/scanner.classes.scanner.js';
|
||||
export { IppProtocol } from './printer/printer.classes.printer.js';
|
||||
// Universal Device & Features (new architecture)
|
||||
export { UniversalDevice } from './device/device.classes.device.js';
|
||||
export {
|
||||
Feature,
|
||||
ScanFeature,
|
||||
PrintFeature,
|
||||
PlaybackFeature,
|
||||
VolumeFeature,
|
||||
PowerFeature,
|
||||
SnmpFeature,
|
||||
type TDeviceReference,
|
||||
type IScanFeatureOptions,
|
||||
type IPrintFeatureOptions,
|
||||
type IPlaybackFeatureOptions,
|
||||
type IVolumeFeatureOptions,
|
||||
type IVolumeController,
|
||||
type IPowerFeatureOptions,
|
||||
type ISnmpFeatureOptions,
|
||||
} from './features/index.js';
|
||||
|
||||
// Scanner protocol implementations
|
||||
export { EsclProtocol } from './scanner/scanner.classes.esclprotocol.js';
|
||||
export { SaneProtocol } from './scanner/scanner.classes.saneprotocol.js';
|
||||
|
||||
// Printer protocol
|
||||
export { IppProtocol } from './printer/printer.classes.ippprotocol.js';
|
||||
|
||||
// SNMP protocol
|
||||
export { SnmpProtocol, SNMP_OIDS } from './snmp/snmp.classes.snmpprotocol.js';
|
||||
|
||||
// UPS protocols
|
||||
export { NutProtocol, NUT_COMMANDS, NUT_VARIABLES } from './ups/ups.classes.nutprotocol.js';
|
||||
export { UpsSnmpHandler, UPS_SNMP_OIDS } from './ups/ups.classes.upssnmp.js';
|
||||
|
||||
// DLNA/UPnP protocol
|
||||
export {
|
||||
UpnpSoapClient,
|
||||
UPNP_SERVICE_TYPES,
|
||||
UPNP_DEVICE_TYPES,
|
||||
} from './dlna/dlna.classes.upnp.js';
|
||||
|
||||
// Chromecast app IDs
|
||||
export { CHROMECAST_APPS } from './speaker/speaker.classes.chromecast.js';
|
||||
|
||||
// AirPlay features
|
||||
export { AIRPLAY_FEATURES } from './speaker/speaker.classes.airplay.js';
|
||||
|
||||
// Helpers
|
||||
export { withRetry, createRetryable, defaultRetryOptions } from './helpers/helpers.retry.js';
|
||||
@@ -34,3 +88,81 @@ export {
|
||||
|
||||
// All interfaces and types
|
||||
export * from './interfaces/index.js';
|
||||
|
||||
// SNMP types
|
||||
export type {
|
||||
ISnmpOptions,
|
||||
ISnmpVarbind,
|
||||
TSnmpValueType,
|
||||
} from './snmp/snmp.classes.snmpprotocol.js';
|
||||
export type { ISnmpDeviceInfo } from './snmp/snmp.classes.snmpdevice.js';
|
||||
|
||||
// UPS types
|
||||
export type {
|
||||
TNutStatusFlag,
|
||||
INutUpsInfo,
|
||||
INutVariable,
|
||||
} from './ups/ups.classes.nutprotocol.js';
|
||||
export type {
|
||||
TUpsBatteryStatus,
|
||||
TUpsOutputSource,
|
||||
IUpsSnmpStatus,
|
||||
} from './ups/ups.classes.upssnmp.js';
|
||||
export type {
|
||||
TUpsStatus,
|
||||
TUpsProtocol,
|
||||
IUpsDeviceInfo,
|
||||
IUpsBatteryInfo,
|
||||
IUpsPowerInfo,
|
||||
IUpsFullStatus,
|
||||
} from './ups/ups.classes.upsdevice.js';
|
||||
|
||||
// DLNA types
|
||||
export type {
|
||||
TDlnaTransportState,
|
||||
TDlnaTransportStatus,
|
||||
IDlnaPositionInfo,
|
||||
IDlnaTransportInfo,
|
||||
IDlnaMediaInfo,
|
||||
IDlnaContentItem,
|
||||
IDlnaBrowseResult,
|
||||
} from './dlna/dlna.classes.upnp.js';
|
||||
export type {
|
||||
IDlnaRendererInfo,
|
||||
IDlnaPlaybackState,
|
||||
} from './dlna/dlna.classes.renderer.js';
|
||||
export type {
|
||||
IDlnaServerInfo,
|
||||
IDlnaServerStats,
|
||||
} from './dlna/dlna.classes.server.js';
|
||||
|
||||
// SSDP types
|
||||
export type {
|
||||
ISsdpDevice,
|
||||
ISsdpDeviceDescription,
|
||||
ISsdpService,
|
||||
ISsdpIcon,
|
||||
} from './discovery/discovery.classes.ssdp.js';
|
||||
|
||||
// Speaker types
|
||||
export type {
|
||||
TSpeakerProtocol,
|
||||
TPlaybackState,
|
||||
ITrackInfo,
|
||||
IPlaybackStatus,
|
||||
ISpeakerInfo,
|
||||
} from './speaker/speaker.classes.speaker.js';
|
||||
export type {
|
||||
ISonosZoneInfo,
|
||||
ISonosSpeakerInfo,
|
||||
} from './speaker/speaker.classes.sonos.js';
|
||||
export type {
|
||||
IAirPlaySpeakerInfo,
|
||||
IAirPlayPlaybackInfo,
|
||||
} from './speaker/speaker.classes.airplay.js';
|
||||
export type {
|
||||
TChromecastType,
|
||||
IChromecastSpeakerInfo,
|
||||
IChromecastMediaMetadata,
|
||||
IChromecastMediaStatus,
|
||||
} from './speaker/speaker.classes.chromecast.js';
|
||||
|
||||
Reference in New Issue
Block a user