|
@@ -79,22 +79,15 @@ enum NotificationTypeEnum {
|
|
|
StartCourseHeartRateToDeviceNotification,
|
|
|
ExecuteResultNotification,
|
|
|
ProgressBarNotification,
|
|
|
- GetDICOMFileFormatNotification,
|
|
|
- SetDICOMFileFormatNotification,
|
|
|
- SetImageStorageServerSettingsNotification,
|
|
|
- GetImageStorageServerSettingsNotification,
|
|
|
- GetInstalledFunctionalityNotification,
|
|
|
- SetInstalledFunctionalityNotification,
|
|
|
- SendDICOMFileFormatNotification,
|
|
|
- SendImageStorageServerSettingsNotification,
|
|
|
- SendInstalledFunctionalityNotification,
|
|
|
+ SendCommandToDeviceNotification,
|
|
|
+ SendResultToClientNotification,
|
|
|
PushDevicePatchToDeviceNotification,
|
|
|
DeviceDownloadPatchProgressToUserNotification,
|
|
|
- GetTestImageStorageServerNotification,
|
|
|
- SendTestImageStorageServerNotification,
|
|
|
DevicePrinterResultNotification,
|
|
|
DevicePrinterRequestNotification,
|
|
|
GetRemoteConnectStatusToDeviceNotification,
|
|
|
+ RestartDeviceNotification,
|
|
|
+ CancelLogDownloadNotification,
|
|
|
}
|
|
|
|
|
|
class NotificationDTO {
|
|
@@ -126,396 +119,124 @@ class NotificationDTO {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-class GetDICOMFileFormatNotification extends NotificationDTO{
|
|
|
- String? sender;
|
|
|
-
|
|
|
- GetDICOMFileFormatNotification({
|
|
|
- NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
|
|
|
- this.sender,
|
|
|
- String? code,
|
|
|
- bool isResponse = false,
|
|
|
- }) : super(
|
|
|
- notificationType: notificationType,
|
|
|
- code: code,
|
|
|
- isResponse: isResponse,
|
|
|
- );
|
|
|
-
|
|
|
- factory GetDICOMFileFormatNotification.fromJson(Map<String, dynamic> map) {
|
|
|
- return GetDICOMFileFormatNotification(
|
|
|
- notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
|
|
|
- sender: map['Sender'],
|
|
|
- code: map['Code'],
|
|
|
- isResponse: map['IsResponse'],
|
|
|
- );
|
|
|
- }
|
|
|
-
|
|
|
- Map<String, dynamic> toJson() {
|
|
|
- final map = super.toJson();
|
|
|
- if(sender != null)
|
|
|
- map['Sender'] = sender;
|
|
|
- return map;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-class GetImageStorageServerSettingsNotification extends NotificationDTO{
|
|
|
- String? sender;
|
|
|
-
|
|
|
- GetImageStorageServerSettingsNotification({
|
|
|
- NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
|
|
|
- this.sender,
|
|
|
- String? code,
|
|
|
- bool isResponse = false,
|
|
|
- }) : super(
|
|
|
- notificationType: notificationType,
|
|
|
- code: code,
|
|
|
- isResponse: isResponse,
|
|
|
- );
|
|
|
-
|
|
|
- factory GetImageStorageServerSettingsNotification.fromJson(Map<String, dynamic> map) {
|
|
|
- return GetImageStorageServerSettingsNotification(
|
|
|
- notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
|
|
|
- sender: map['Sender'],
|
|
|
- code: map['Code'],
|
|
|
- isResponse: map['IsResponse'],
|
|
|
- );
|
|
|
- }
|
|
|
-
|
|
|
- Map<String, dynamic> toJson() {
|
|
|
- final map = super.toJson();
|
|
|
- if(sender != null)
|
|
|
- map['Sender'] = sender;
|
|
|
- return map;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-class GetInstalledFunctionalityNotification extends NotificationDTO{
|
|
|
- String? commonResult;
|
|
|
- String? sender;
|
|
|
-
|
|
|
- GetInstalledFunctionalityNotification({
|
|
|
- NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
|
|
|
- this.commonResult,
|
|
|
- this.sender,
|
|
|
- String? code,
|
|
|
- bool isResponse = false,
|
|
|
- }) : super(
|
|
|
- notificationType: notificationType,
|
|
|
- code: code,
|
|
|
- isResponse: isResponse,
|
|
|
- );
|
|
|
-
|
|
|
- factory GetInstalledFunctionalityNotification.fromJson(Map<String, dynamic> map) {
|
|
|
- return GetInstalledFunctionalityNotification(
|
|
|
- notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
|
|
|
- commonResult: map['CommonResult'],
|
|
|
- sender: map['Sender'],
|
|
|
- code: map['Code'],
|
|
|
- isResponse: map['IsResponse'],
|
|
|
- );
|
|
|
- }
|
|
|
-
|
|
|
- Map<String, dynamic> toJson() {
|
|
|
- final map = super.toJson();
|
|
|
- if(commonResult != null)
|
|
|
- map['CommonResult'] = commonResult;
|
|
|
- if(sender != null)
|
|
|
- map['Sender'] = sender;
|
|
|
- return map;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-class GetTestImageStorageServerNotification extends NotificationDTO{
|
|
|
- String? sender;
|
|
|
-
|
|
|
- GetTestImageStorageServerNotification({
|
|
|
- NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
|
|
|
- this.sender,
|
|
|
- String? code,
|
|
|
- bool isResponse = false,
|
|
|
- }) : super(
|
|
|
- notificationType: notificationType,
|
|
|
- code: code,
|
|
|
- isResponse: isResponse,
|
|
|
- );
|
|
|
-
|
|
|
- factory GetTestImageStorageServerNotification.fromJson(Map<String, dynamic> map) {
|
|
|
- return GetTestImageStorageServerNotification(
|
|
|
- notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
|
|
|
- sender: map['Sender'],
|
|
|
- code: map['Code'],
|
|
|
- isResponse: map['IsResponse'],
|
|
|
- );
|
|
|
- }
|
|
|
-
|
|
|
- Map<String, dynamic> toJson() {
|
|
|
- final map = super.toJson();
|
|
|
- if(sender != null)
|
|
|
- map['Sender'] = sender;
|
|
|
- return map;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-class SendDICOMFileFormatNotification extends NotificationDTO{
|
|
|
- String? sender;
|
|
|
- Map<String,String>? fileFormats;
|
|
|
- String? selectedFileFormat;
|
|
|
- Map<String,String>? compressionModes;
|
|
|
- String? selectedCompressionMode;
|
|
|
-
|
|
|
- SendDICOMFileFormatNotification({
|
|
|
- NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
|
|
|
- this.sender,
|
|
|
- this.fileFormats,
|
|
|
- this.selectedFileFormat,
|
|
|
- this.compressionModes,
|
|
|
- this.selectedCompressionMode,
|
|
|
- String? code,
|
|
|
- bool isResponse = false,
|
|
|
- }) : super(
|
|
|
- notificationType: notificationType,
|
|
|
- code: code,
|
|
|
- isResponse: isResponse,
|
|
|
- );
|
|
|
-
|
|
|
- factory SendDICOMFileFormatNotification.fromJson(Map<String, dynamic> map) {
|
|
|
- return SendDICOMFileFormatNotification(
|
|
|
- notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
|
|
|
- sender: map['Sender'],
|
|
|
- fileFormats: map['FileFormats'] != null ? map['FileFormats'].cast<String,String>() : null,
|
|
|
- selectedFileFormat: map['SelectedFileFormat'],
|
|
|
- compressionModes: map['CompressionModes'] != null ? map['CompressionModes'].cast<String,String>() : null,
|
|
|
- selectedCompressionMode: map['SelectedCompressionMode'],
|
|
|
- code: map['Code'],
|
|
|
- isResponse: map['IsResponse'],
|
|
|
- );
|
|
|
- }
|
|
|
-
|
|
|
- Map<String, dynamic> toJson() {
|
|
|
- final map = super.toJson();
|
|
|
- if(sender != null)
|
|
|
- map['Sender'] = sender;
|
|
|
- if(fileFormats != null)
|
|
|
- map['FileFormats'] = fileFormats;
|
|
|
- if(selectedFileFormat != null)
|
|
|
- map['SelectedFileFormat'] = selectedFileFormat;
|
|
|
- if(compressionModes != null)
|
|
|
- map['CompressionModes'] = compressionModes;
|
|
|
- if(selectedCompressionMode != null)
|
|
|
- map['SelectedCompressionMode'] = selectedCompressionMode;
|
|
|
- return map;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-class SendImageStorageServerSettingsNotification extends NotificationDTO{
|
|
|
- String? sender;
|
|
|
- bool isImageServerEnabled;
|
|
|
- String? serverAET;
|
|
|
- String? serverIPAddress;
|
|
|
- int serverPort;
|
|
|
-
|
|
|
- SendImageStorageServerSettingsNotification({
|
|
|
- NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
|
|
|
- this.sender,
|
|
|
- this.isImageServerEnabled = false,
|
|
|
- this.serverAET,
|
|
|
- this.serverIPAddress,
|
|
|
- this.serverPort = 0,
|
|
|
- String? code,
|
|
|
- bool isResponse = false,
|
|
|
- }) : super(
|
|
|
- notificationType: notificationType,
|
|
|
- code: code,
|
|
|
- isResponse: isResponse,
|
|
|
- );
|
|
|
-
|
|
|
- factory SendImageStorageServerSettingsNotification.fromJson(Map<String, dynamic> map) {
|
|
|
- return SendImageStorageServerSettingsNotification(
|
|
|
- notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
|
|
|
- sender: map['Sender'],
|
|
|
- isImageServerEnabled: map['IsImageServerEnabled'],
|
|
|
- serverAET: map['ServerAET'],
|
|
|
- serverIPAddress: map['ServerIPAddress'],
|
|
|
- serverPort: map['ServerPort'],
|
|
|
- code: map['Code'],
|
|
|
- isResponse: map['IsResponse'],
|
|
|
- );
|
|
|
- }
|
|
|
-
|
|
|
- Map<String, dynamic> toJson() {
|
|
|
- final map = super.toJson();
|
|
|
- if(sender != null)
|
|
|
- map['Sender'] = sender;
|
|
|
- map['IsImageServerEnabled'] = isImageServerEnabled;
|
|
|
- if(serverAET != null)
|
|
|
- map['ServerAET'] = serverAET;
|
|
|
- if(serverIPAddress != null)
|
|
|
- map['ServerIPAddress'] = serverIPAddress;
|
|
|
- map['ServerPort'] = serverPort;
|
|
|
- return map;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-enum FunctionalityStatusEnum {
|
|
|
- DemoMode,
|
|
|
- Activity,
|
|
|
-}
|
|
|
-
|
|
|
-class FunctionalityInfo {
|
|
|
- String? functionalityName;
|
|
|
- FunctionalityStatusEnum functionalityStatus;
|
|
|
+class NameItemSettingInfoDTO {
|
|
|
+ String? name;
|
|
|
+ String? key;
|
|
|
|
|
|
- FunctionalityInfo({
|
|
|
- this.functionalityName,
|
|
|
- this.functionalityStatus = FunctionalityStatusEnum.DemoMode,
|
|
|
+ NameItemSettingInfoDTO({
|
|
|
+ this.name,
|
|
|
+ this.key,
|
|
|
});
|
|
|
|
|
|
- factory FunctionalityInfo.fromJson(Map<String, dynamic> map) {
|
|
|
- return FunctionalityInfo(
|
|
|
- functionalityName: map['FunctionalityName'],
|
|
|
- functionalityStatus: FunctionalityStatusEnum.values.firstWhere((e) => e.index == map['FunctionalityStatus']),
|
|
|
+ factory NameItemSettingInfoDTO.fromJson(Map<String, dynamic> map) {
|
|
|
+ return NameItemSettingInfoDTO(
|
|
|
+ name: map['Name'],
|
|
|
+ key: map['Key'],
|
|
|
);
|
|
|
}
|
|
|
|
|
|
Map<String, dynamic> toJson() {
|
|
|
final map = Map<String, dynamic>();
|
|
|
- if(functionalityName != null)
|
|
|
- map['FunctionalityName'] = functionalityName;
|
|
|
- map['FunctionalityStatus'] = functionalityStatus.index;
|
|
|
+ if(name != null)
|
|
|
+ map['Name'] = name;
|
|
|
+ if(key != null)
|
|
|
+ map['Key'] = key;
|
|
|
return map;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-class SendInstalledFunctionalityNotification extends NotificationDTO{
|
|
|
- String? commonResult;
|
|
|
- String? sender;
|
|
|
- List<FunctionalityInfo >? functionalities;
|
|
|
+class GroupSettingInfoDTO extends NameItemSettingInfoDTO{
|
|
|
+ List<NameItemSettingInfoDTO >? items;
|
|
|
|
|
|
- SendInstalledFunctionalityNotification({
|
|
|
- NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
|
|
|
- this.commonResult,
|
|
|
- this.sender,
|
|
|
- this.functionalities,
|
|
|
- String? code,
|
|
|
- bool isResponse = false,
|
|
|
+ GroupSettingInfoDTO({
|
|
|
+ this.items,
|
|
|
+ String? name,
|
|
|
+ String? key,
|
|
|
}) : super(
|
|
|
- notificationType: notificationType,
|
|
|
- code: code,
|
|
|
- isResponse: isResponse,
|
|
|
+ name: name,
|
|
|
+ key: key,
|
|
|
);
|
|
|
|
|
|
- factory SendInstalledFunctionalityNotification.fromJson(Map<String, dynamic> map) {
|
|
|
- return SendInstalledFunctionalityNotification(
|
|
|
- notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
|
|
|
- commonResult: map['CommonResult'],
|
|
|
- sender: map['Sender'],
|
|
|
- functionalities: map['Functionalities'] != null ? (map['Functionalities'] as List).map((e)=>FunctionalityInfo.fromJson(e as Map<String,dynamic>)).toList() : null,
|
|
|
- code: map['Code'],
|
|
|
- isResponse: map['IsResponse'],
|
|
|
+ factory GroupSettingInfoDTO.fromJson(Map<String, dynamic> map) {
|
|
|
+ return GroupSettingInfoDTO(
|
|
|
+ items: map['Items'] != null ? (map['Items'] as List).map((e)=>NameItemSettingInfoDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
|
|
|
+ name: map['Name'],
|
|
|
+ key: map['Key'],
|
|
|
);
|
|
|
}
|
|
|
|
|
|
Map<String, dynamic> toJson() {
|
|
|
final map = super.toJson();
|
|
|
- if(commonResult != null)
|
|
|
- map['CommonResult'] = commonResult;
|
|
|
- if(sender != null)
|
|
|
- map['Sender'] = sender;
|
|
|
- if(functionalities != null)
|
|
|
- map['Functionalities'] = functionalities;
|
|
|
+ if(items != null)
|
|
|
+ map['Items'] = items;
|
|
|
return map;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-class SendTestImageStorageServerNotification extends NotificationDTO{
|
|
|
- bool isSuccess;
|
|
|
- String? sender;
|
|
|
+class ListPageSettingInfoDTO extends NameItemSettingInfoDTO{
|
|
|
+ List<GroupSettingInfoDTO >? groups;
|
|
|
|
|
|
- SendTestImageStorageServerNotification({
|
|
|
- NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
|
|
|
- this.isSuccess = false,
|
|
|
- this.sender,
|
|
|
- String? code,
|
|
|
- bool isResponse = false,
|
|
|
+ ListPageSettingInfoDTO({
|
|
|
+ this.groups,
|
|
|
+ String? name,
|
|
|
+ String? key,
|
|
|
}) : super(
|
|
|
- notificationType: notificationType,
|
|
|
- code: code,
|
|
|
- isResponse: isResponse,
|
|
|
+ name: name,
|
|
|
+ key: key,
|
|
|
);
|
|
|
|
|
|
- factory SendTestImageStorageServerNotification.fromJson(Map<String, dynamic> map) {
|
|
|
- return SendTestImageStorageServerNotification(
|
|
|
- notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
|
|
|
- isSuccess: map['IsSuccess'],
|
|
|
- sender: map['Sender'],
|
|
|
- code: map['Code'],
|
|
|
- isResponse: map['IsResponse'],
|
|
|
+ factory ListPageSettingInfoDTO.fromJson(Map<String, dynamic> map) {
|
|
|
+ return ListPageSettingInfoDTO(
|
|
|
+ groups: map['Groups'] != null ? (map['Groups'] as List).map((e)=>GroupSettingInfoDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
|
|
|
+ name: map['Name'],
|
|
|
+ key: map['Key'],
|
|
|
);
|
|
|
}
|
|
|
|
|
|
Map<String, dynamic> toJson() {
|
|
|
final map = super.toJson();
|
|
|
- map['IsSuccess'] = isSuccess;
|
|
|
- if(sender != null)
|
|
|
- map['Sender'] = sender;
|
|
|
+ if(groups != null)
|
|
|
+ map['Groups'] = groups;
|
|
|
return map;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-class SetDICOMFileFormatNotification extends NotificationDTO{
|
|
|
- String? sender;
|
|
|
- String? fileFormat;
|
|
|
- String? compressionMode;
|
|
|
+class SystemSettingInfoDTO {
|
|
|
+ List<ListPageSettingInfoDTO >? listPages;
|
|
|
+ String? applyLicenseResult;
|
|
|
|
|
|
- SetDICOMFileFormatNotification({
|
|
|
- NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
|
|
|
- this.sender,
|
|
|
- this.fileFormat,
|
|
|
- this.compressionMode,
|
|
|
- String? code,
|
|
|
- bool isResponse = false,
|
|
|
- }) : super(
|
|
|
- notificationType: notificationType,
|
|
|
- code: code,
|
|
|
- isResponse: isResponse,
|
|
|
- );
|
|
|
+ SystemSettingInfoDTO({
|
|
|
+ this.listPages,
|
|
|
+ this.applyLicenseResult,
|
|
|
+ });
|
|
|
|
|
|
- factory SetDICOMFileFormatNotification.fromJson(Map<String, dynamic> map) {
|
|
|
- return SetDICOMFileFormatNotification(
|
|
|
- notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
|
|
|
- sender: map['Sender'],
|
|
|
- fileFormat: map['FileFormat'],
|
|
|
- compressionMode: map['CompressionMode'],
|
|
|
- code: map['Code'],
|
|
|
- isResponse: map['IsResponse'],
|
|
|
+ factory SystemSettingInfoDTO.fromJson(Map<String, dynamic> map) {
|
|
|
+ return SystemSettingInfoDTO(
|
|
|
+ listPages: map['ListPages'] != null ? (map['ListPages'] as List).map((e)=>ListPageSettingInfoDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
|
|
|
+ applyLicenseResult: map['ApplyLicenseResult'],
|
|
|
);
|
|
|
}
|
|
|
|
|
|
Map<String, dynamic> toJson() {
|
|
|
- final map = super.toJson();
|
|
|
- if(sender != null)
|
|
|
- map['Sender'] = sender;
|
|
|
- if(fileFormat != null)
|
|
|
- map['FileFormat'] = fileFormat;
|
|
|
- if(compressionMode != null)
|
|
|
- map['CompressionMode'] = compressionMode;
|
|
|
+ final map = Map<String, dynamic>();
|
|
|
+ if(listPages != null)
|
|
|
+ map['ListPages'] = listPages;
|
|
|
+ if(applyLicenseResult != null)
|
|
|
+ map['ApplyLicenseResult'] = applyLicenseResult;
|
|
|
return map;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-class SetImageStorageServerSettingsNotification extends NotificationDTO{
|
|
|
+class SendCommandToDeviceNotification extends NotificationDTO{
|
|
|
+ String? actionType;
|
|
|
+ SystemSettingInfoDTO? settings;
|
|
|
String? sender;
|
|
|
- bool isImageServerEnabled;
|
|
|
- String? serverAET;
|
|
|
- String? serverIPAddress;
|
|
|
- int serverPort;
|
|
|
|
|
|
- SetImageStorageServerSettingsNotification({
|
|
|
+ SendCommandToDeviceNotification({
|
|
|
NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
|
|
|
+ this.actionType,
|
|
|
+ this.settings,
|
|
|
this.sender,
|
|
|
- this.isImageServerEnabled = false,
|
|
|
- this.serverAET,
|
|
|
- this.serverIPAddress,
|
|
|
- this.serverPort = 0,
|
|
|
String? code,
|
|
|
bool isResponse = false,
|
|
|
}) : super(
|
|
@@ -524,14 +245,12 @@ class SetImageStorageServerSettingsNotification extends NotificationDTO{
|
|
|
isResponse: isResponse,
|
|
|
);
|
|
|
|
|
|
- factory SetImageStorageServerSettingsNotification.fromJson(Map<String, dynamic> map) {
|
|
|
- return SetImageStorageServerSettingsNotification(
|
|
|
+ factory SendCommandToDeviceNotification.fromJson(Map<String, dynamic> map) {
|
|
|
+ return SendCommandToDeviceNotification(
|
|
|
notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
|
|
|
+ actionType: map['ActionType'],
|
|
|
+ settings: map['Settings'] != null ? SystemSettingInfoDTO.fromJson(map['Settings']) : null,
|
|
|
sender: map['Sender'],
|
|
|
- isImageServerEnabled: map['IsImageServerEnabled'],
|
|
|
- serverAET: map['ServerAET'],
|
|
|
- serverIPAddress: map['ServerIPAddress'],
|
|
|
- serverPort: map['ServerPort'],
|
|
|
code: map['Code'],
|
|
|
isResponse: map['IsResponse'],
|
|
|
);
|
|
@@ -539,25 +258,23 @@ class SetImageStorageServerSettingsNotification extends NotificationDTO{
|
|
|
|
|
|
Map<String, dynamic> toJson() {
|
|
|
final map = super.toJson();
|
|
|
+ if(actionType != null)
|
|
|
+ map['ActionType'] = actionType;
|
|
|
+ if(settings != null)
|
|
|
+ map['Settings'] = settings;
|
|
|
if(sender != null)
|
|
|
map['Sender'] = sender;
|
|
|
- map['IsImageServerEnabled'] = isImageServerEnabled;
|
|
|
- if(serverAET != null)
|
|
|
- map['ServerAET'] = serverAET;
|
|
|
- if(serverIPAddress != null)
|
|
|
- map['ServerIPAddress'] = serverIPAddress;
|
|
|
- map['ServerPort'] = serverPort;
|
|
|
return map;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-class SetInstalledFunctionalityNotification extends NotificationDTO{
|
|
|
- String? licenseCode;
|
|
|
+class SendResultToClientNotification extends NotificationDTO{
|
|
|
+ SystemSettingInfoDTO? settings;
|
|
|
String? sender;
|
|
|
|
|
|
- SetInstalledFunctionalityNotification({
|
|
|
+ SendResultToClientNotification({
|
|
|
NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
|
|
|
- this.licenseCode,
|
|
|
+ this.settings,
|
|
|
this.sender,
|
|
|
String? code,
|
|
|
bool isResponse = false,
|
|
@@ -567,10 +284,10 @@ class SetInstalledFunctionalityNotification extends NotificationDTO{
|
|
|
isResponse: isResponse,
|
|
|
);
|
|
|
|
|
|
- factory SetInstalledFunctionalityNotification.fromJson(Map<String, dynamic> map) {
|
|
|
- return SetInstalledFunctionalityNotification(
|
|
|
+ factory SendResultToClientNotification.fromJson(Map<String, dynamic> map) {
|
|
|
+ return SendResultToClientNotification(
|
|
|
notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
|
|
|
- licenseCode: map['LicenseCode'],
|
|
|
+ settings: map['Settings'] != null ? SystemSettingInfoDTO.fromJson(map['Settings']) : null,
|
|
|
sender: map['Sender'],
|
|
|
code: map['Code'],
|
|
|
isResponse: map['IsResponse'],
|
|
@@ -579,8 +296,8 @@ class SetInstalledFunctionalityNotification extends NotificationDTO{
|
|
|
|
|
|
Map<String, dynamic> toJson() {
|
|
|
final map = super.toJson();
|
|
|
- if(licenseCode != null)
|
|
|
- map['LicenseCode'] = licenseCode;
|
|
|
+ if(settings != null)
|
|
|
+ map['Settings'] = settings;
|
|
|
if(sender != null)
|
|
|
map['Sender'] = sender;
|
|
|
return map;
|
|
@@ -1301,16 +1018,60 @@ class UpgradeVersionNotification extends NotificationDTO{
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+class CancelLogDownloadNotification extends NotificationDTO{
|
|
|
+ String? controlUserCode;
|
|
|
+
|
|
|
+ CancelLogDownloadNotification({
|
|
|
+ NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
|
|
|
+ this.controlUserCode,
|
|
|
+ String? code,
|
|
|
+ bool isResponse = false,
|
|
|
+ }) : super(
|
|
|
+ notificationType: notificationType,
|
|
|
+ code: code,
|
|
|
+ isResponse: isResponse,
|
|
|
+ );
|
|
|
+
|
|
|
+ factory CancelLogDownloadNotification.fromJson(Map<String, dynamic> map) {
|
|
|
+ return CancelLogDownloadNotification(
|
|
|
+ notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
|
|
|
+ controlUserCode: map['ControlUserCode'],
|
|
|
+ code: map['Code'],
|
|
|
+ isResponse: map['IsResponse'],
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ Map<String, dynamic> toJson() {
|
|
|
+ final map = super.toJson();
|
|
|
+ if(controlUserCode != null)
|
|
|
+ map['ControlUserCode'] = controlUserCode;
|
|
|
+ return map;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+enum RemoteDeviceStateEnum {
|
|
|
+ Unknown,
|
|
|
+ Success,
|
|
|
+ Fail,
|
|
|
+ DownloadPatchFail,
|
|
|
+ CancelDownloadPatch,
|
|
|
+ LogDownloaddFail,
|
|
|
+ DeviceCancelLogDownload,
|
|
|
+ DeviceDisconnect,
|
|
|
+}
|
|
|
+
|
|
|
class DeviceDownloadPatchProgressToUserNotification extends NotificationDTO{
|
|
|
double progress;
|
|
|
String? patchCode;
|
|
|
String? deviceCode;
|
|
|
+ RemoteDeviceStateEnum remoteDeviceState;
|
|
|
|
|
|
DeviceDownloadPatchProgressToUserNotification({
|
|
|
NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
|
|
|
this.progress = 0,
|
|
|
this.patchCode,
|
|
|
this.deviceCode,
|
|
|
+ this.remoteDeviceState = RemoteDeviceStateEnum.Unknown,
|
|
|
String? code,
|
|
|
bool isResponse = false,
|
|
|
}) : super(
|
|
@@ -1325,6 +1086,7 @@ class DeviceDownloadPatchProgressToUserNotification extends NotificationDTO{
|
|
|
progress: double.parse(map['Progress'].toString()),
|
|
|
patchCode: map['PatchCode'],
|
|
|
deviceCode: map['DeviceCode'],
|
|
|
+ remoteDeviceState: RemoteDeviceStateEnum.values.firstWhere((e) => e.index == map['RemoteDeviceState']),
|
|
|
code: map['Code'],
|
|
|
isResponse: map['IsResponse'],
|
|
|
);
|
|
@@ -1337,6 +1099,7 @@ class DeviceDownloadPatchProgressToUserNotification extends NotificationDTO{
|
|
|
map['PatchCode'] = patchCode;
|
|
|
if(deviceCode != null)
|
|
|
map['DeviceCode'] = deviceCode;
|
|
|
+ map['RemoteDeviceState'] = remoteDeviceState.index;
|
|
|
return map;
|
|
|
}
|
|
|
}
|
|
@@ -1606,12 +1369,14 @@ class DevicePrinterResultNotification extends NotificationDTO{
|
|
|
String? deviceCode;
|
|
|
DevicePrinterEnum setPrinterEnum;
|
|
|
List<DevicePrinterParameterDTO >? devicePrinterList;
|
|
|
+ RemoteDeviceStateEnum remoteDeviceState;
|
|
|
|
|
|
DevicePrinterResultNotification({
|
|
|
NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
|
|
|
this.deviceCode,
|
|
|
this.setPrinterEnum = DevicePrinterEnum.GetInstalledPrinters,
|
|
|
this.devicePrinterList,
|
|
|
+ this.remoteDeviceState = RemoteDeviceStateEnum.Unknown,
|
|
|
String? code,
|
|
|
bool isResponse = false,
|
|
|
}) : super(
|
|
@@ -1626,6 +1391,7 @@ class DevicePrinterResultNotification extends NotificationDTO{
|
|
|
deviceCode: map['DeviceCode'],
|
|
|
setPrinterEnum: DevicePrinterEnum.values.firstWhere((e) => e.index == map['SetPrinterEnum']),
|
|
|
devicePrinterList: map['DevicePrinterList'] != null ? (map['DevicePrinterList'] as List).map((e)=>DevicePrinterParameterDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
|
|
|
+ remoteDeviceState: RemoteDeviceStateEnum.values.firstWhere((e) => e.index == map['RemoteDeviceState']),
|
|
|
code: map['Code'],
|
|
|
isResponse: map['IsResponse'],
|
|
|
);
|
|
@@ -1638,6 +1404,7 @@ class DevicePrinterResultNotification extends NotificationDTO{
|
|
|
map['SetPrinterEnum'] = setPrinterEnum.index;
|
|
|
if(devicePrinterList != null)
|
|
|
map['DevicePrinterList'] = devicePrinterList;
|
|
|
+ map['RemoteDeviceState'] = remoteDeviceState.index;
|
|
|
return map;
|
|
|
}
|
|
|
}
|
|
@@ -1646,12 +1413,14 @@ class GetRemoteLogToClientNotification extends NotificationDTO{
|
|
|
String? deviceCode;
|
|
|
String? logFileToken;
|
|
|
int rate;
|
|
|
+ RemoteDeviceStateEnum remoteDeviceState;
|
|
|
|
|
|
GetRemoteLogToClientNotification({
|
|
|
NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
|
|
|
this.deviceCode,
|
|
|
this.logFileToken,
|
|
|
this.rate = 0,
|
|
|
+ this.remoteDeviceState = RemoteDeviceStateEnum.Unknown,
|
|
|
String? code,
|
|
|
bool isResponse = false,
|
|
|
}) : super(
|
|
@@ -1666,6 +1435,7 @@ class GetRemoteLogToClientNotification extends NotificationDTO{
|
|
|
deviceCode: map['DeviceCode'],
|
|
|
logFileToken: map['LogFileToken'],
|
|
|
rate: map['Rate'],
|
|
|
+ remoteDeviceState: RemoteDeviceStateEnum.values.firstWhere((e) => e.index == map['RemoteDeviceState']),
|
|
|
code: map['Code'],
|
|
|
isResponse: map['IsResponse'],
|
|
|
);
|
|
@@ -1678,6 +1448,7 @@ class GetRemoteLogToClientNotification extends NotificationDTO{
|
|
|
if(logFileToken != null)
|
|
|
map['LogFileToken'] = logFileToken;
|
|
|
map['Rate'] = rate;
|
|
|
+ map['RemoteDeviceState'] = remoteDeviceState.index;
|
|
|
return map;
|
|
|
}
|
|
|
}
|
|
@@ -1777,6 +1548,37 @@ class PushDevicePatchToDeviceNotification extends NotificationDTO{
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+class RestartDeviceNotification extends NotificationDTO{
|
|
|
+ String? controlUserCode;
|
|
|
+
|
|
|
+ RestartDeviceNotification({
|
|
|
+ NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
|
|
|
+ this.controlUserCode,
|
|
|
+ String? code,
|
|
|
+ bool isResponse = false,
|
|
|
+ }) : super(
|
|
|
+ notificationType: notificationType,
|
|
|
+ code: code,
|
|
|
+ isResponse: isResponse,
|
|
|
+ );
|
|
|
+
|
|
|
+ factory RestartDeviceNotification.fromJson(Map<String, dynamic> map) {
|
|
|
+ return RestartDeviceNotification(
|
|
|
+ notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
|
|
|
+ controlUserCode: map['ControlUserCode'],
|
|
|
+ code: map['Code'],
|
|
|
+ isResponse: map['IsResponse'],
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ Map<String, dynamic> toJson() {
|
|
|
+ final map = super.toJson();
|
|
|
+ if(controlUserCode != null)
|
|
|
+ map['ControlUserCode'] = controlUserCode;
|
|
|
+ return map;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
class CloseLiveToDeviceNotification extends NotificationDTO{
|
|
|
String? liveRoomCode;
|
|
|
|
|
@@ -1812,12 +1614,14 @@ class ConnectStatusToClientNotification extends NotificationDTO{
|
|
|
String? deviceCode;
|
|
|
String? deviceName;
|
|
|
ControlDeviceParameterEnum controlType;
|
|
|
+ RemoteDeviceStateEnum remoteDeviceState;
|
|
|
|
|
|
ConnectStatusToClientNotification({
|
|
|
NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
|
|
|
this.deviceCode,
|
|
|
this.deviceName,
|
|
|
this.controlType = ControlDeviceParameterEnum.Start,
|
|
|
+ this.remoteDeviceState = RemoteDeviceStateEnum.Unknown,
|
|
|
String? code,
|
|
|
bool isResponse = false,
|
|
|
}) : super(
|
|
@@ -1832,6 +1636,7 @@ class ConnectStatusToClientNotification extends NotificationDTO{
|
|
|
deviceCode: map['DeviceCode'],
|
|
|
deviceName: map['DeviceName'],
|
|
|
controlType: ControlDeviceParameterEnum.values.firstWhere((e) => e.index == map['ControlType']),
|
|
|
+ remoteDeviceState: RemoteDeviceStateEnum.values.firstWhere((e) => e.index == map['RemoteDeviceState']),
|
|
|
code: map['Code'],
|
|
|
isResponse: map['IsResponse'],
|
|
|
);
|
|
@@ -1844,6 +1649,7 @@ class ConnectStatusToClientNotification extends NotificationDTO{
|
|
|
if(deviceName != null)
|
|
|
map['DeviceName'] = deviceName;
|
|
|
map['ControlType'] = controlType.index;
|
|
|
+ map['RemoteDeviceState'] = remoteDeviceState.index;
|
|
|
return map;
|
|
|
}
|
|
|
}
|