2018-10-02 00:21:48 +00:00
|
|
|
module.exports = function(s,config){
|
|
|
|
////// USER //////
|
2018-11-22 15:47:43 +00:00
|
|
|
s.onSocketAuthenticationExtensions = []
|
|
|
|
s.onSocketAuthentication = function(callback){
|
|
|
|
s.onSocketAuthenticationExtensions.push(callback)
|
|
|
|
}
|
|
|
|
//
|
2018-12-04 16:34:43 +00:00
|
|
|
s.loadGroupExtensions = []
|
|
|
|
s.loadGroupExtender = function(callback){
|
|
|
|
s.loadGroupExtensions.push(callback)
|
|
|
|
}
|
|
|
|
//
|
2018-10-02 00:21:48 +00:00
|
|
|
s.loadGroupAppExtensions = []
|
|
|
|
s.loadGroupAppExtender = function(callback){
|
|
|
|
s.loadGroupAppExtensions.push(callback)
|
|
|
|
}
|
|
|
|
//
|
|
|
|
s.unloadGroupAppExtensions = []
|
|
|
|
s.unloadGroupAppExtender = function(callback){
|
|
|
|
s.unloadGroupAppExtensions.push(callback)
|
|
|
|
}
|
|
|
|
//
|
|
|
|
s.cloudDisksLoaded = []
|
|
|
|
s.cloudDisksLoader = function(storageType){
|
|
|
|
s.cloudDisksLoaded.push(storageType)
|
|
|
|
}
|
|
|
|
//
|
|
|
|
s.onAccountSaveExtensions = []
|
|
|
|
s.onAccountSave = function(callback){
|
|
|
|
s.onAccountSaveExtensions.push(callback)
|
|
|
|
}
|
|
|
|
//
|
|
|
|
s.beforeAccountSaveExtensions = []
|
|
|
|
s.beforeAccountSave = function(callback){
|
|
|
|
s.beforeAccountSaveExtensions.push(callback)
|
|
|
|
}
|
|
|
|
//
|
|
|
|
s.onTwoFactorAuthCodeNotificationExtensions = []
|
|
|
|
s.onTwoFactorAuthCodeNotification = function(callback){
|
|
|
|
s.onTwoFactorAuthCodeNotificationExtensions.push(callback)
|
|
|
|
}
|
|
|
|
//
|
2019-02-28 22:07:14 +00:00
|
|
|
s.onStalePurgeLockExtensions = []
|
|
|
|
s.onStalePurgeLock = function(callback){
|
|
|
|
s.onStalePurgeLockExtensions.push(callback)
|
|
|
|
}
|
|
|
|
//
|
2018-10-02 00:21:48 +00:00
|
|
|
s.cloudDiskUseStartupExtensions = {}
|
2020-06-15 14:53:08 +00:00
|
|
|
s.cloudDiskUseOnGetVideoDataExtensions = {}
|
2018-10-02 00:21:48 +00:00
|
|
|
|
|
|
|
////// EVENTS //////
|
|
|
|
s.onEventTriggerExtensions = []
|
|
|
|
s.onEventTrigger = function(callback){
|
|
|
|
s.onEventTriggerExtensions.push(callback)
|
|
|
|
}
|
|
|
|
s.onEventTriggerBeforeFilterExtensions = []
|
|
|
|
s.onEventTriggerBeforeFilter = function(callback){
|
|
|
|
s.onEventTriggerBeforeFilterExtensions.push(callback)
|
|
|
|
}
|
|
|
|
s.onFilterEventExtensions = []
|
|
|
|
s.onFilterEvent = function(callback){
|
|
|
|
s.onFilterEventExtensions.push(callback)
|
|
|
|
}
|
2018-10-03 00:52:49 +00:00
|
|
|
|
|
|
|
////// MONITOR //////
|
2018-10-16 02:40:26 +00:00
|
|
|
s.onMonitorInitExtensions = []
|
|
|
|
s.onMonitorInit = function(callback){
|
|
|
|
s.onMonitorInitExtensions.push(callback)
|
|
|
|
}
|
2018-11-22 15:47:43 +00:00
|
|
|
//
|
2018-12-12 22:56:29 +00:00
|
|
|
s.onMonitorStartExtensions = []
|
|
|
|
s.onMonitorStart = function(callback){
|
|
|
|
s.onMonitorStartExtensions.push(callback)
|
|
|
|
}
|
|
|
|
//
|
|
|
|
s.onMonitorStopExtensions = []
|
|
|
|
s.onMonitorStop = function(callback){
|
|
|
|
s.onMonitorStopExtensions.push(callback)
|
|
|
|
}
|
|
|
|
//
|
2019-02-20 03:29:12 +00:00
|
|
|
s.onMonitorSaveExtensions = []
|
|
|
|
s.onMonitorSave = function(callback){
|
|
|
|
s.onMonitorSaveExtensions.push(callback)
|
|
|
|
}
|
|
|
|
//
|
2018-12-12 22:56:29 +00:00
|
|
|
s.onMonitorUnexpectedExitExtensions = []
|
|
|
|
s.onMonitorUnexpectedExit = function(callback){
|
|
|
|
s.onMonitorUnexpectedExitExtensions.push(callback)
|
|
|
|
}
|
|
|
|
//
|
2018-10-03 00:52:49 +00:00
|
|
|
s.onDetectorNoTriggerTimeoutExtensions = []
|
|
|
|
s.onDetectorNoTriggerTimeout = function(callback){
|
|
|
|
s.onDetectorNoTriggerTimeoutExtensions.push(callback)
|
|
|
|
}
|
2018-11-22 15:47:43 +00:00
|
|
|
//
|
|
|
|
s.onFfmpegCameraStringCreationExtensions = []
|
|
|
|
s.onFfmpegCameraStringCreation = function(callback){
|
|
|
|
s.onFfmpegCameraStringCreationExtensions.push(callback)
|
|
|
|
}
|
|
|
|
//
|
2018-12-12 22:56:29 +00:00
|
|
|
s.onMonitorPingFailedExtensions = []
|
|
|
|
s.onMonitorPingFailed = function(callback){
|
|
|
|
s.onMonitorPingFailedExtensions.push(callback)
|
|
|
|
}
|
2019-01-31 18:51:35 +00:00
|
|
|
//
|
|
|
|
s.onMonitorDiedExtensions = []
|
|
|
|
s.onMonitorDied = function(callback){
|
|
|
|
s.onMonitorDiedExtensions.push(callback)
|
|
|
|
}
|
2018-12-12 22:56:29 +00:00
|
|
|
|
|
|
|
///////// SYSTEM ////////
|
|
|
|
s.onProcessReadyExtensions = []
|
|
|
|
s.onProcessReady = function(callback){
|
|
|
|
s.onProcessReadyExtensions.push(callback)
|
|
|
|
}
|
|
|
|
//
|
2018-12-17 00:54:06 +00:00
|
|
|
s.onProcessExitExtensions = []
|
|
|
|
s.onProcessExit = function(callback){
|
|
|
|
s.onProcessExitExtensions.push(callback)
|
|
|
|
}
|
|
|
|
//
|
|
|
|
s.onBeforeDatabaseLoadExtensions = []
|
|
|
|
s.onBeforeDatabaseLoad = function(callback){
|
|
|
|
s.onBeforeDatabaseLoadExtensions.push(callback)
|
|
|
|
}
|
|
|
|
//
|
|
|
|
s.onFFmpegLoadedExtensions = []
|
|
|
|
s.onFFmpegLoaded = function(callback){
|
|
|
|
s.onFFmpegLoadedExtensions.push(callback)
|
|
|
|
}
|
|
|
|
//
|
2019-02-23 06:59:06 +00:00
|
|
|
s.beforeMonitorsLoadedOnStartupExtensions = []
|
|
|
|
s.beforeMonitorsLoadedOnStartup = function(callback){
|
|
|
|
s.beforeMonitorsLoadedOnStartupExtensions.push(callback)
|
|
|
|
}
|
|
|
|
//
|
2019-03-06 00:22:04 +00:00
|
|
|
s.onWebSocketConnectionExtensions = []
|
|
|
|
s.onWebSocketConnection = function(callback){
|
|
|
|
s.onWebSocketConnectionExtensions.push(callback)
|
|
|
|
}
|
|
|
|
//
|
|
|
|
s.onWebSocketDisconnectionExtensions = []
|
|
|
|
s.onWebSocketDisconnection = function(callback){
|
|
|
|
s.onWebSocketDisconnectionExtensions.push(callback)
|
|
|
|
}
|
|
|
|
//
|
2020-03-07 20:03:33 +00:00
|
|
|
s.onWebsocketMessageSendExtensions = []
|
|
|
|
s.onWebsocketMessageSend = function(callback){
|
|
|
|
s.onWebsocketMessageSendExtensions.push(callback)
|
|
|
|
}
|
|
|
|
//
|
2019-04-14 00:36:00 +00:00
|
|
|
s.onGetCpuUsageExtensions = []
|
|
|
|
s.onGetCpuUsage = function(callback){
|
|
|
|
s.onGetCpuUsageExtensions.push(callback)
|
|
|
|
}
|
|
|
|
//
|
|
|
|
s.onGetRamUsageExtensions = []
|
|
|
|
s.onGetRamUsage = function(callback){
|
|
|
|
s.onGetRamUsageExtensions.push(callback)
|
|
|
|
}
|
|
|
|
//
|
2019-05-05 20:30:07 +00:00
|
|
|
/////// VIDEOS ////////
|
|
|
|
s.insertCompletedVideoExtensions = []
|
|
|
|
s.insertCompletedVideoExtender = function(callback){
|
|
|
|
s.insertCompletedVideoExtensions.push(callback)
|
|
|
|
}
|
2019-08-14 17:41:28 +00:00
|
|
|
s.onBeforeInsertCompletedVideoExtensions = []
|
|
|
|
s.onBeforeInsertCompletedVideo = function(callback){
|
|
|
|
s.onBeforeInsertCompletedVideoExtensions.push(callback)
|
|
|
|
}
|
2019-05-05 20:30:07 +00:00
|
|
|
/////// TIMELAPSE ////////
|
|
|
|
s.onInsertTimelapseFrameExtensions = []
|
|
|
|
s.onInsertTimelapseFrame = function(callback){
|
|
|
|
s.onInsertTimelapseFrameExtensions.push(callback)
|
|
|
|
}
|
2018-10-02 00:21:48 +00:00
|
|
|
}
|