public void Start( ) { if (ThumbnailWatcher == null) { Logger.Debug("Watcher", "Initialize ThumbnailWatcher"); ThumbnailWatcher = new FileSystemWatcher(Path, "*-thumbnail.jpg"); Logger.Debug("Watcher", $"Watching: {ThumbnailWatcher.Path}::{ThumbnailWatcher.Filter}"); ThumbnailWatcher.IncludeSubdirectories = true; ThumbnailWatcher.Created += ThumbnailWatcher_Created; ThumbnailWatcher.Deleted += ThumbnailWatcher_Deleted; ThumbnailWatcher.Renamed += ThumbnailWatcher_Renamed; ThumbnailWatcher.Changed += ThumbnailWatcher_Changed; ThumbnailWatcher.Error += ThumbnailWatcher_Error; } if (DotThumbnailWatcher == null) { Logger.Debug("Watcher", "Initialize DotThumbnailWatcher"); DotThumbnailWatcher = new FileSystemWatcher(System.IO.Path.Combine(Path, ".Thumbnails"), "*.jpg"); Logger.Debug("Watcher", $"Watching: {DotThumbnailWatcher.Path}::{DotThumbnailWatcher.Filter}"); DotThumbnailWatcher.IncludeSubdirectories = true; DotThumbnailWatcher.Created += ThumbnailWatcher_Created; DotThumbnailWatcher.Deleted += ThumbnailWatcher_Deleted; DotThumbnailWatcher.Renamed += ThumbnailWatcher_Renamed; DotThumbnailWatcher.Changed += ThumbnailWatcher_Changed; DotThumbnailWatcher.Error += ThumbnailWatcher_Error; } if (MP4Watcher == null) { Logger.Debug("Watcher", "Initialize MP4Watcher"); MP4Watcher = new FileSystemWatcher(Path, "*.mp4"); Logger.Debug("Watcher", $"Watching: {MP4Watcher.Path}::{MP4Watcher.Filter}"); MP4Watcher.IncludeSubdirectories = false; MP4Watcher.Created += MP4Watcher_Created; } ThumbnailWatcher.EnableRaisingEvents = true; MP4Watcher.EnableRaisingEvents = true; DotThumbnailWatcher.EnableRaisingEvents = true; MonitorStart?.Invoke(this, new EventArgs( )); }
MonitorStart NewMonitorStartRequest_CallViaDevice(DeviceID deviceId) { var result = new MonitorStart { monitorObject = new MonitorObject { Item = deviceId }, monitorType = MonitorType.call, monitorTypeSpecified = true, requestedMonitorFilter = new MonitorFilter { //physicalDeviceFeature = new PhysicalDeviceFeatureEvents //{ // buttonInformation = true, // buttonInformationSpecified = true, // displayUpdated = true, // displayUpdatedSpecified = true, // hookswitch = true, // hookswitchSpecified = true, // lampMode = true, // lampModeSpecified = true, // ringerStatus = true, // ringerStatusSpecified = true, // speakerMute = true, // speakerMuteSpecified = true //}, callcontrol = new CallControlEvents { //These should probably be configured centrally callCleared = true, callClearedSpecified = true, conferenced = true, conferencedSpecified = true, connectionCleared = true, connectionClearedSpecified = true, delivered = true, deliveredSpecified = true, diverted = true, divertedSpecified = true, established = true, establishedSpecified = true, failed = true, failedSpecified = true, held = true, heldSpecified = true, networkReached = true, networkReachedSpecified = true, originated = true, originatedSpecified = true, queued = true, queuedSpecified = true, retrieved = true, retrievedSpecified = true, serviceInitiated = true, serviceInitiatedSpecified = true, transferred = true, transferredSpecified = true, }, logicalDeviceFeature = new LogicalDeviceFeatureEvents { //agentLoggedOff = true, //agentLoggedOffSpecified = true, //agentLoggedOn = true, //agentLoggedOnSpecified = true, //agentReady = true, //agentReadySpecified = true, //agentNotReady = true, //agentNotReadySpecified = true, //agentWorkingAfterCall = true, //agentWorkingAfterCallSpecified = true, //doNotDisturb = true, //doNotDisturbSpecified = true, //forwarding = true, //forwardingSpecified = true, } }, extensions = new CSTACommonArguments { privateData = new CSTAPrivateData { Item = new CSTAPrivateDataPrivate { Any = new XmlElement[] { NewBasicAvayaEvent(), } } } } }; return(result); }
MonitorStart NewMonitorStartRequest_Standard(DeviceID deviceId) { var result = new MonitorStart { monitorObject = new MonitorObject { Item = deviceId }, monitorType = MonitorType.device, requestedMonitorFilter = new MonitorFilter { physicalDeviceFeature = new PhysicalDeviceFeatureEvents { buttonInformation = true, buttonInformationSpecified = true, displayUpdated = true, displayUpdatedSpecified = true, hookswitch = true, hookswitchSpecified = true, lampMode = true, lampModeSpecified = true, ringerStatus = true, ringerStatusSpecified = true, speakerMute = true, speakerMuteSpecified = true }, callcontrol = new CallControlEvents { //These should probably be configured centrally conferenced = true, conferencedSpecified = true, connectionCleared = true, connectionClearedSpecified = true, delivered = true, deliveredSpecified = true, established = true, establishedSpecified = true, failed = true, failedSpecified = true, originated = true, originatedSpecified = true, retrieved = true, retrievedSpecified = true, transferred = true, transferredSpecified = true, }, logicalDeviceFeature = new LogicalDeviceFeatureEvents { } }, extensions = new CSTACommonArguments { privateData = new CSTAPrivateData { Item = new CSTAPrivateDataPrivate { Any = new XmlElement[] { NewBasicAvayaEvent() } } } } }; return(result); }