增加摄像头列表增、改、删的本地化存储支持
This commit is contained in:
@@ -2,17 +2,27 @@
|
||||
|
||||
public interface IStorageService
|
||||
{
|
||||
// 1. 基础属性:让外界知道当前是几号进程
|
||||
// 1. 基础属性
|
||||
int ProcessId { get; }
|
||||
|
||||
// 2. 设备配置相关的空架子
|
||||
Task SaveDevicesAsync(object configs); // 这里先用 object 占位,或者用您的 List<VideoSourceConfig>
|
||||
|
||||
Task<object> LoadDevicesAsync();
|
||||
// 2. 设备配置管理
|
||||
// 保存:接收 VideoSourceConfig 集合
|
||||
Task SaveDevicesAsync(IEnumerable<VideoSourceConfig> configs);
|
||||
|
||||
// 3. 系统日志相关的空架子
|
||||
// 加载:返回 VideoSourceConfig 列表
|
||||
Task<List<VideoSourceConfig>> LoadDevicesAsync();
|
||||
|
||||
// 3. 系统日志
|
||||
// 记录系统操作 (如 POST /api/cameras)
|
||||
Task AppendSystemLogAsync(string action, string ip, string path);
|
||||
|
||||
// 4. 设备审计日志相关的空架子
|
||||
Task AppendDeviceLogAsync(long deviceId, string message);
|
||||
// 获取系统日志
|
||||
Task<List<string>> GetSystemLogsAsync(int count);
|
||||
|
||||
// 4. 设备审计日志
|
||||
// 记录单设备日志 (统一使用 int deviceId)
|
||||
Task AppendDeviceLogAsync(int deviceId, string message);
|
||||
|
||||
// 获取单设备日志
|
||||
Task<List<string>> GetDeviceLogsAsync(int deviceId, int count);
|
||||
}
|
||||
@@ -35,6 +35,7 @@ public class VideoSourceConfig
|
||||
public string Password { get; set; } = string.Empty;
|
||||
|
||||
/// <summary> 渲染句柄(可选):用于硬解码时直接绑定显示窗口,提升渲染性能 </summary>
|
||||
[JsonIgnore]
|
||||
public IntPtr RenderHandle { get; set; } = IntPtr.Zero;
|
||||
|
||||
/// <summary> 物理通道号(IPC 通常为 1;NVR 对应接入的摄像头通道索引) </summary>
|
||||
|
||||
Reference in New Issue
Block a user