Browse Source

1、更新rpc

bakamaka.guan 2 years ago
parent
commit
8b1d64b6d4

+ 7 - 2
lib/services/authentication.m.dart

@@ -1052,8 +1052,8 @@ enum CustomerRpcCode {
 	ExpertCodeIsEmpty,
 	ExpertNotExisted,
 	UserNotConnected,
-	placeHolder_858,
-	placeHolder_859,
+	EmergencyDeviceNotFound,
+	EmergencyExpertNotFound,
 	placeHolder_860,
 	placeHolder_861,
 	placeHolder_862,
@@ -7281,14 +7281,17 @@ class ValidateTokenResult {
 
 class ValidateTokenRequest {
 	String? token;
+	String? methodName;
 
 	ValidateTokenRequest({
 		this.token,
+		this.methodName,
 	});
 
 	factory ValidateTokenRequest.fromJson(Map<String, dynamic> map) {
 		return ValidateTokenRequest( 
 			token: map['Token'],
+			methodName: map['MethodName'],
 		);
 	}
 
@@ -7296,6 +7299,8 @@ class ValidateTokenRequest {
 		final map = Map<String, dynamic>();
 		if(token != null)
 			map['Token'] = token;
+		if(methodName != null)
+			map['MethodName'] = methodName;
 		return map;
 	}
 }

+ 29 - 52
lib/services/device.dart

@@ -43,6 +43,7 @@ class DeviceService extends JsonRpcClientBase {
 		FJsonConvert.setDecoder((map) => DevicePrinterVersionDTO.fromJson(map));
 		FJsonConvert.setDecoder((map) => PageResult<DevicePrinterDTO>.fromJson(map));
 		FJsonConvert.setDecoder((map) => DevicePrinterDTO.fromJson(map));
+		FJsonConvert.setDecoder((map) => DeviceConnectStateResult.fromJson(map));
 	}
 
 	Future<bool> heartRateAsync(TokenRequest request) async {
@@ -391,93 +392,69 @@ class DeviceService extends JsonRpcClientBase {
 		return rpcRst;
 	}
 
-	Future<bool> modifyEmergencyDeviceCodeAsync(ModifyEmergencyDeviceCodeRequest request) async {
-		var rpcRst = await call("ModifyEmergencyDeviceCodeAsync", request);
-		return rpcRst;
-	}
-
-	Future<bool> getDICOMFileFormatNotificationAsync(GetDICOMFileFormatNotificationRequest request) async {
-		var rpcRst = await call("GetDICOMFileFormatNotificationAsync", request);
-		return rpcRst;
-	}
-
-	Future<bool> getImageStorageServerSettingsNotificationAsync(GetImageStorageServerSettingsNotificationRequest request) async {
-		var rpcRst = await call("GetImageStorageServerSettingsNotificationAsync", request);
+	Future<bool> restartDeviceAsync(RestartDeviceRequest request) async {
+		var rpcRst = await call("RestartDeviceAsync", request);
 		return rpcRst;
 	}
 
-	Future<bool> setDICOMFileFormatNotificationAsync(SetDICOMFileFormatNotificationRequest request) async {
-		var rpcRst = await call("SetDICOMFileFormatNotificationAsync", request);
-		return rpcRst;
-	}
-
-	Future<bool> setImageStorageServerSettingsNotificationAsync(SetImageStorageServerSettingsNotificationRequest request) async {
-		var rpcRst = await call("SetImageStorageServerSettingsNotificationAsync", request);
-		return rpcRst;
-	}
-
-	Future<bool> getInstalledFunctionalityNotificationAsync(GetInstalledFunctionalityNotificationRequest request) async {
-		var rpcRst = await call("GetInstalledFunctionalityNotificationAsync", request);
-		return rpcRst;
-	}
-
-	Future<bool> setInstalledFunctionalityNotificationAsync(SetInstalledFunctionalityNotificationRequest request) async {
-		var rpcRst = await call("SetInstalledFunctionalityNotificationAsync", request);
+	Future<bool> modifyEmergencyDeviceCodeAsync(ModifyEmergencyDeviceCodeRequest request) async {
+		var rpcRst = await call("ModifyEmergencyDeviceCodeAsync", request);
 		return rpcRst;
 	}
 
-	Future<bool> sendInstalledFunctionalityNotificationAsync(SendInstalledFunctionalityNotificationRequest request) async {
-		var rpcRst = await call("SendInstalledFunctionalityNotificationAsync", request);
+	Future<bool> sendCommandToDeviceAsync(SendCommandToDeviceRequest request) async {
+		var rpcRst = await call("SendCommandToDeviceAsync", request);
 		return rpcRst;
 	}
 
-	Future<bool> sendDICOMFileFormatNotificationAsync(SendDICOMFileFormatNotificationRequest request) async {
-		var rpcRst = await call("SendDICOMFileFormatNotificationAsync", request);
+	Future<bool> sendResultToClientAsync(SendResultToClientRequest request) async {
+		var rpcRst = await call("SendResultToClientAsync", request);
 		return rpcRst;
 	}
 
-	Future<bool> sendImageStorageServerSettingsNotificationAsync(SendImageStorageServerSettingsNotificationRequest request) async {
-		var rpcRst = await call("SendImageStorageServerSettingsNotificationAsync", request);
+	Future<bool> disconnectRemoteControl(RemoteConnectStautsRequest request) async {
+		var rpcRst = await call("DisconnectRemoteControl", request);
 		return rpcRst;
 	}
 
-	Future<bool> getTestImageStorageServerNotificationAsync(GetTestImageStorageServerNotificationRequest request) async {
-		var rpcRst = await call("GetTestImageStorageServerNotificationAsync", request);
+	Future<bool> remoteConnectHeartRateAsync(RemoteConnectHeartRateRequest request) async {
+		var rpcRst = await call("RemoteConnectHeartRateAsync", request);
 		return rpcRst;
 	}
 
-	Future<bool> sendTestImageStorageServerNotificationAsync(SendTestImageStorageServerNotificationRequest request) async {
-		var rpcRst = await call("SendTestImageStorageServerNotificationAsync", request);
+	Future<bool> checkDeviceIsIdleAsync(GetDeviceRequest request) async {
+		var rpcRst = await call("CheckDeviceIsIdleAsync", request);
 		return rpcRst;
 	}
 
-	Future<bool> disconnectRemoteControl(RemoteConnectStautsRequest request) async {
-		var rpcRst = await call("DisconnectRemoteControl", request);
+	Future<String> checkUserIsExistRoomIdAsync(GetDeviceRequest request) async {
+		var rpcRst = await call("CheckUserIsExistRoomIdAsync", request);
 		return rpcRst;
 	}
 
-	Future<bool> remoteConnectHeartRateAsync(RemoteConnectHeartRateRequest request) async {
-		var rpcRst = await call("RemoteConnectHeartRateAsync", request);
+	Future<bool> addUserRemoteConnectAsync(AddUserRemoteConnectRequest request) async {
+		var rpcRst = await call("AddUserRemoteConnectAsync", request);
 		return rpcRst;
 	}
 
-	Future<bool> checkDeviceIsIdle(GetDeviceRequest request) async {
-		var rpcRst = await call("CheckDeviceIsIdle", request);
+	Future<bool> closeUserRemoteConnectAsync(GetDeviceRequest request) async {
+		var rpcRst = await call("CloseUserRemoteConnectAsync", request);
 		return rpcRst;
 	}
 
-	Future<String> checkUserIsExistRoomId(TokenRequest request) async {
-		var rpcRst = await call("CheckUserIsExistRoomId", request);
+	Future<bool> userCancelLogDownloadAsync(GetDeviceRequest request) async {
+		var rpcRst = await call("UserCancelLogDownloadAsync", request);
 		return rpcRst;
 	}
 
-	Future<bool> addUserRemoteConnect(AddUserRemoteConnectRequest request) async {
-		var rpcRst = await call("AddUserRemoteConnect", request);
-		return rpcRst;
+	Future<List<DeviceConnectStateResult>> getDeviceStateListByTokenAsync(GetDeviceStateListRequest request) async {
+		var rpcRst = await call("GetDeviceStateListByTokenAsync", request);
+		var result = (rpcRst as List).map((e)=>DeviceConnectStateResult.fromJson(e as Map<String, dynamic>)).toList();
+		return result;
 	}
 
-	Future<bool> closeUserRemoteConnect(TokenRequest request) async {
-		var rpcRst = await call("CloseUserRemoteConnect", request);
+	Future<bool> deviceCancelLogDownloadAsync(DeivceCancelLogDownloadRequest request) async {
+		var rpcRst = await call("DeviceCancelLogDownloadAsync", request);
 		return rpcRst;
 	}
 

+ 121 - 304
lib/services/device.m.dart

@@ -1986,11 +1986,13 @@ class RemoteLogResponseRequest extends TokenRequest{
 	String? userCode;
 	String? logFileToken;
 	int rate;
+	RemoteDeviceStateEnum remoteDeviceState;
 
 	RemoteLogResponseRequest({
 		this.userCode,
 		this.logFileToken,
 		this.rate = 0,
+		this.remoteDeviceState = RemoteDeviceStateEnum.Unknown,
 		String? token,
 	}) : super(
 			token: token,
@@ -2001,6 +2003,7 @@ class RemoteLogResponseRequest extends TokenRequest{
 			userCode: map['UserCode'],
 			logFileToken: map['LogFileToken'],
 			rate: map['Rate'],
+			remoteDeviceState: RemoteDeviceStateEnum.values.firstWhere((e) => e.index == map['RemoteDeviceState']),
 			token: map['Token'],
 		);
 	}
@@ -2012,6 +2015,7 @@ class RemoteLogResponseRequest extends TokenRequest{
 		if(logFileToken != null)
 			map['LogFileToken'] = logFileToken;
 		map['Rate'] = rate;
+		map['RemoteDeviceState'] = remoteDeviceState.index;
 		return map;
 	}
 }
@@ -2483,11 +2487,13 @@ class UploadDeviceDownloadPatchProgressToUserRequest extends TokenRequest{
 	int progress;
 	String? userCode;
 	String? patchCode;
+	RemoteDeviceStateEnum remoteDeviceState;
 
 	UploadDeviceDownloadPatchProgressToUserRequest({
 		this.progress = 0,
 		this.userCode,
 		this.patchCode,
+		this.remoteDeviceState = RemoteDeviceStateEnum.Unknown,
 		String? token,
 	}) : super(
 			token: token,
@@ -2498,6 +2504,7 @@ class UploadDeviceDownloadPatchProgressToUserRequest extends TokenRequest{
 			progress: map['Progress'],
 			userCode: map['UserCode'],
 			patchCode: map['PatchCode'],
+			remoteDeviceState: RemoteDeviceStateEnum.values.firstWhere((e) => e.index == map['RemoteDeviceState']),
 			token: map['Token'],
 		);
 	}
@@ -2509,6 +2516,7 @@ class UploadDeviceDownloadPatchProgressToUserRequest extends TokenRequest{
 			map['UserCode'] = userCode;
 		if(patchCode != null)
 			map['PatchCode'] = patchCode;
+		map['RemoteDeviceState'] = remoteDeviceState.index;
 		return map;
 	}
 }
@@ -2952,11 +2960,13 @@ class UploadDevicePrinterRequest extends TokenRequest{
 	String? userCode;
 	DevicePrinterEnum setPrinterEnum;
 	List<DevicePrinterParameterDTO >? devicePrinterList;
+	RemoteDeviceStateEnum remoteDeviceState;
 
 	UploadDevicePrinterRequest({
 		this.userCode,
 		this.setPrinterEnum = DevicePrinterEnum.GetInstalledPrinters,
 		this.devicePrinterList,
+		this.remoteDeviceState = RemoteDeviceStateEnum.Unknown,
 		String? token,
 	}) : super(
 			token: token,
@@ -2967,6 +2977,7 @@ class UploadDevicePrinterRequest extends TokenRequest{
 			userCode: map['UserCode'],
 			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']),
 			token: map['Token'],
 		);
 	}
@@ -2978,407 +2989,266 @@ class UploadDevicePrinterRequest extends TokenRequest{
 		map['SetPrinterEnum'] = setPrinterEnum.index;
 		if(devicePrinterList != null)
 			map['DevicePrinterList'] = devicePrinterList;
+		map['RemoteDeviceState'] = remoteDeviceState.index;
 		return map;
 	}
 }
 
-class ModifyEmergencyDeviceCodeRequest extends TokenRequest{
-	String? emergencyDeviceCode;
-
-	ModifyEmergencyDeviceCodeRequest({
-		this.emergencyDeviceCode,
-		String? token,
-	}) : super(
-			token: token,
-		);
-
-	factory ModifyEmergencyDeviceCodeRequest.fromJson(Map<String, dynamic> map) {
-		return ModifyEmergencyDeviceCodeRequest( 
-			emergencyDeviceCode: map['EmergencyDeviceCode'],
-			token: map['Token'],
-		);
-	}
-
-	Map<String, dynamic> toJson() {
-		final map = super.toJson();
-		if(emergencyDeviceCode != null)
-			map['EmergencyDeviceCode'] = emergencyDeviceCode;
-		return map;
-	}
-}
-
-class GetDICOMFileFormatNotificationRequest extends TokenRequest{
-	String? receiverId;
-
-	GetDICOMFileFormatNotificationRequest({
-		this.receiverId,
-		String? token,
-	}) : super(
-			token: token,
-		);
-
-	factory GetDICOMFileFormatNotificationRequest.fromJson(Map<String, dynamic> map) {
-		return GetDICOMFileFormatNotificationRequest( 
-			receiverId: map['ReceiverId'],
-			token: map['Token'],
-		);
-	}
-
-	Map<String, dynamic> toJson() {
-		final map = super.toJson();
-		if(receiverId != null)
-			map['ReceiverId'] = receiverId;
-		return map;
-	}
-}
-
-class GetImageStorageServerSettingsNotificationRequest extends TokenRequest{
-	String? receiverId;
-
-	GetImageStorageServerSettingsNotificationRequest({
-		this.receiverId,
-		String? token,
-	}) : super(
-			token: token,
-		);
-
-	factory GetImageStorageServerSettingsNotificationRequest.fromJson(Map<String, dynamic> map) {
-		return GetImageStorageServerSettingsNotificationRequest( 
-			receiverId: map['ReceiverId'],
-			token: map['Token'],
-		);
-	}
-
-	Map<String, dynamic> toJson() {
-		final map = super.toJson();
-		if(receiverId != null)
-			map['ReceiverId'] = receiverId;
-		return map;
-	}
-}
-
-class SetDICOMFileFormatNotificationRequest extends TokenRequest{
-	String? fileFormat;
-	String? compressionMode;
-	String? receiverId;
+class RestartDeviceRequest extends TokenRequest{
+	String? deviceCode;
 
-	SetDICOMFileFormatNotificationRequest({
-		this.fileFormat,
-		this.compressionMode,
-		this.receiverId,
+	RestartDeviceRequest({
+		this.deviceCode,
 		String? token,
 	}) : super(
 			token: token,
 		);
 
-	factory SetDICOMFileFormatNotificationRequest.fromJson(Map<String, dynamic> map) {
-		return SetDICOMFileFormatNotificationRequest( 
-			fileFormat: map['FileFormat'],
-			compressionMode: map['CompressionMode'],
-			receiverId: map['ReceiverId'],
+	factory RestartDeviceRequest.fromJson(Map<String, dynamic> map) {
+		return RestartDeviceRequest( 
+			deviceCode: map['DeviceCode'],
 			token: map['Token'],
 		);
 	}
 
 	Map<String, dynamic> toJson() {
 		final map = super.toJson();
-		if(fileFormat != null)
-			map['FileFormat'] = fileFormat;
-		if(compressionMode != null)
-			map['CompressionMode'] = compressionMode;
-		if(receiverId != null)
-			map['ReceiverId'] = receiverId;
+		if(deviceCode != null)
+			map['DeviceCode'] = deviceCode;
 		return map;
 	}
 }
 
-class SetImageStorageServerSettingsNotificationRequest extends TokenRequest{
-	bool isImageServerEnabled;
-	String? serverAET;
-	String? serverIPAddress;
-	int serverPort;
-	String? receiverId;
+class ModifyEmergencyDeviceCodeRequest extends TokenRequest{
+	String? emergencyDeviceCode;
 
-	SetImageStorageServerSettingsNotificationRequest({
-		this.isImageServerEnabled = false,
-		this.serverAET,
-		this.serverIPAddress,
-		this.serverPort = 0,
-		this.receiverId,
+	ModifyEmergencyDeviceCodeRequest({
+		this.emergencyDeviceCode,
 		String? token,
 	}) : super(
 			token: token,
 		);
 
-	factory SetImageStorageServerSettingsNotificationRequest.fromJson(Map<String, dynamic> map) {
-		return SetImageStorageServerSettingsNotificationRequest( 
-			isImageServerEnabled: map['IsImageServerEnabled'],
-			serverAET: map['ServerAET'],
-			serverIPAddress: map['ServerIPAddress'],
-			serverPort: map['ServerPort'],
-			receiverId: map['ReceiverId'],
+	factory ModifyEmergencyDeviceCodeRequest.fromJson(Map<String, dynamic> map) {
+		return ModifyEmergencyDeviceCodeRequest( 
+			emergencyDeviceCode: map['EmergencyDeviceCode'],
 			token: map['Token'],
 		);
 	}
 
 	Map<String, dynamic> toJson() {
 		final map = super.toJson();
-		map['IsImageServerEnabled'] = isImageServerEnabled;
-		if(serverAET != null)
-			map['ServerAET'] = serverAET;
-		if(serverIPAddress != null)
-			map['ServerIPAddress'] = serverIPAddress;
-		map['ServerPort'] = serverPort;
-		if(receiverId != null)
-			map['ReceiverId'] = receiverId;
+		if(emergencyDeviceCode != null)
+			map['EmergencyDeviceCode'] = emergencyDeviceCode;
 		return map;
 	}
 }
 
-class GetInstalledFunctionalityNotificationRequest extends TokenRequest{
-	String? receiverId;
+class SendCommandToDeviceRequest extends TokenRequest{
+	String? deviceCode;
+	String? actionType;
+	SystemSettingInfoDTO? settings;
 
-	GetInstalledFunctionalityNotificationRequest({
-		this.receiverId,
+	SendCommandToDeviceRequest({
+		this.deviceCode,
+		this.actionType,
+		this.settings,
 		String? token,
 	}) : super(
 			token: token,
 		);
 
-	factory GetInstalledFunctionalityNotificationRequest.fromJson(Map<String, dynamic> map) {
-		return GetInstalledFunctionalityNotificationRequest( 
-			receiverId: map['ReceiverId'],
+	factory SendCommandToDeviceRequest.fromJson(Map<String, dynamic> map) {
+		return SendCommandToDeviceRequest( 
+			deviceCode: map['DeviceCode'],
+			actionType: map['ActionType'],
+			settings: map['Settings'] != null ? SystemSettingInfoDTO.fromJson(map['Settings']) : null,
 			token: map['Token'],
 		);
 	}
 
 	Map<String, dynamic> toJson() {
 		final map = super.toJson();
-		if(receiverId != null)
-			map['ReceiverId'] = receiverId;
+		if(deviceCode != null)
+			map['DeviceCode'] = deviceCode;
+		if(actionType != null)
+			map['ActionType'] = actionType;
+		if(settings != null)
+			map['Settings'] = settings;
 		return map;
 	}
 }
 
-class SetInstalledFunctionalityNotificationRequest extends TokenRequest{
-	String? licenseCode;
-	String? receiverId;
+class SendResultToClientRequest extends TokenRequest{
+	String? userCode;
+	SystemSettingInfoDTO? settings;
 
-	SetInstalledFunctionalityNotificationRequest({
-		this.licenseCode,
-		this.receiverId,
+	SendResultToClientRequest({
+		this.userCode,
+		this.settings,
 		String? token,
 	}) : super(
 			token: token,
 		);
 
-	factory SetInstalledFunctionalityNotificationRequest.fromJson(Map<String, dynamic> map) {
-		return SetInstalledFunctionalityNotificationRequest( 
-			licenseCode: map['LicenseCode'],
-			receiverId: map['ReceiverId'],
+	factory SendResultToClientRequest.fromJson(Map<String, dynamic> map) {
+		return SendResultToClientRequest( 
+			userCode: map['UserCode'],
+			settings: map['Settings'] != null ? SystemSettingInfoDTO.fromJson(map['Settings']) : null,
 			token: map['Token'],
 		);
 	}
 
 	Map<String, dynamic> toJson() {
 		final map = super.toJson();
-		if(licenseCode != null)
-			map['LicenseCode'] = licenseCode;
-		if(receiverId != null)
-			map['ReceiverId'] = receiverId;
+		if(userCode != null)
+			map['UserCode'] = userCode;
+		if(settings != null)
+			map['Settings'] = settings;
 		return map;
 	}
 }
 
-class SendInstalledFunctionalityNotificationRequest extends TokenRequest{
-	String? receiverId;
-	String? commonResult;
-	List<FunctionalityInfo >? functionalities;
+class RemoteConnectStautsRequest extends TokenRequest{
+	String? userCode;
 
-	SendInstalledFunctionalityNotificationRequest({
-		this.receiverId,
-		this.commonResult,
-		this.functionalities,
+	RemoteConnectStautsRequest({
+		this.userCode,
 		String? token,
 	}) : super(
 			token: token,
 		);
 
-	factory SendInstalledFunctionalityNotificationRequest.fromJson(Map<String, dynamic> map) {
-		return SendInstalledFunctionalityNotificationRequest( 
-			receiverId: map['ReceiverId'],
-			commonResult: map['CommonResult'],
-			functionalities: map['Functionalities'] != null ? (map['Functionalities'] as List).map((e)=>FunctionalityInfo.fromJson(e as Map<String,dynamic>)).toList() : null,
+	factory RemoteConnectStautsRequest.fromJson(Map<String, dynamic> map) {
+		return RemoteConnectStautsRequest( 
+			userCode: map['UserCode'],
 			token: map['Token'],
 		);
 	}
 
 	Map<String, dynamic> toJson() {
 		final map = super.toJson();
-		if(receiverId != null)
-			map['ReceiverId'] = receiverId;
-		if(commonResult != null)
-			map['CommonResult'] = commonResult;
-		if(functionalities != null)
-			map['Functionalities'] = functionalities;
+		if(userCode != null)
+			map['UserCode'] = userCode;
 		return map;
 	}
 }
 
-class SendDICOMFileFormatNotificationRequest extends TokenRequest{
-	Map<String,String>? fileFormats;
-	String? selectedFileFormat;
-	Map<String,String>? compressionModes;
-	String? selectedCompressionMode;
-	String? receiverId;
+class RemoteConnectHeartRateRequest extends TokenRequest{
+	List<String >? deviceCodes;
 
-	SendDICOMFileFormatNotificationRequest({
-		this.fileFormats,
-		this.selectedFileFormat,
-		this.compressionModes,
-		this.selectedCompressionMode,
-		this.receiverId,
+	RemoteConnectHeartRateRequest({
+		this.deviceCodes,
 		String? token,
 	}) : super(
 			token: token,
 		);
 
-	factory SendDICOMFileFormatNotificationRequest.fromJson(Map<String, dynamic> map) {
-		return SendDICOMFileFormatNotificationRequest( 
-			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'],
-			receiverId: map['ReceiverId'],
+	factory RemoteConnectHeartRateRequest.fromJson(Map<String, dynamic> map) {
+		return RemoteConnectHeartRateRequest( 
+			deviceCodes: map['DeviceCodes'] != null ? map['DeviceCodes'].cast<String>().toList() : null,
 			token: map['Token'],
 		);
 	}
 
 	Map<String, dynamic> toJson() {
 		final map = super.toJson();
-		if(fileFormats != null)
-			map['FileFormats'] = fileFormats;
-		if(selectedFileFormat != null)
-			map['SelectedFileFormat'] = selectedFileFormat;
-		if(compressionModes != null)
-			map['CompressionModes'] = compressionModes;
-		if(selectedCompressionMode != null)
-			map['SelectedCompressionMode'] = selectedCompressionMode;
-		if(receiverId != null)
-			map['ReceiverId'] = receiverId;
+		if(deviceCodes != null)
+			map['DeviceCodes'] = deviceCodes;
 		return map;
 	}
 }
 
-class SendImageStorageServerSettingsNotificationRequest extends TokenRequest{
-	bool isImageServerEnabled;
-	String? serverAET;
-	String? serverIPAddress;
-	int serverPort;
-	String? receiverId;
+class AddUserRemoteConnectRequest extends GetDeviceRequest{
+	String? roomId;
 
-	SendImageStorageServerSettingsNotificationRequest({
-		this.isImageServerEnabled = false,
-		this.serverAET,
-		this.serverIPAddress,
-		this.serverPort = 0,
-		this.receiverId,
+	AddUserRemoteConnectRequest({
+		this.roomId,
+		String? deviceCode,
 		String? token,
 	}) : super(
+			deviceCode: deviceCode,
 			token: token,
 		);
 
-	factory SendImageStorageServerSettingsNotificationRequest.fromJson(Map<String, dynamic> map) {
-		return SendImageStorageServerSettingsNotificationRequest( 
-			isImageServerEnabled: map['IsImageServerEnabled'],
-			serverAET: map['ServerAET'],
-			serverIPAddress: map['ServerIPAddress'],
-			serverPort: map['ServerPort'],
-			receiverId: map['ReceiverId'],
+	factory AddUserRemoteConnectRequest.fromJson(Map<String, dynamic> map) {
+		return AddUserRemoteConnectRequest( 
+			roomId: map['RoomId'],
+			deviceCode: map['DeviceCode'],
 			token: map['Token'],
 		);
 	}
 
 	Map<String, dynamic> toJson() {
 		final map = super.toJson();
-		map['IsImageServerEnabled'] = isImageServerEnabled;
-		if(serverAET != null)
-			map['ServerAET'] = serverAET;
-		if(serverIPAddress != null)
-			map['ServerIPAddress'] = serverIPAddress;
-		map['ServerPort'] = serverPort;
-		if(receiverId != null)
-			map['ReceiverId'] = receiverId;
+		if(roomId != null)
+			map['RoomId'] = roomId;
 		return map;
 	}
 }
 
-class GetTestImageStorageServerNotificationRequest extends TokenRequest{
-	String? receiverId;
+class DeviceConnectStateResult {
+	String? deviceCode;
+	bool isConnect;
 
-	GetTestImageStorageServerNotificationRequest({
-		this.receiverId,
-		String? token,
-	}) : super(
-			token: token,
-		);
+	DeviceConnectStateResult({
+		this.deviceCode,
+		this.isConnect = false,
+	});
 
-	factory GetTestImageStorageServerNotificationRequest.fromJson(Map<String, dynamic> map) {
-		return GetTestImageStorageServerNotificationRequest( 
-			receiverId: map['ReceiverId'],
-			token: map['Token'],
+	factory DeviceConnectStateResult.fromJson(Map<String, dynamic> map) {
+		return DeviceConnectStateResult( 
+			deviceCode: map['DeviceCode'],
+			isConnect: map['IsConnect'],
 		);
 	}
 
 	Map<String, dynamic> toJson() {
-		final map = super.toJson();
-		if(receiverId != null)
-			map['ReceiverId'] = receiverId;
+		final map = Map<String, dynamic>();
+		if(deviceCode != null)
+			map['DeviceCode'] = deviceCode;
+		map['IsConnect'] = isConnect;
 		return map;
 	}
 }
 
-class SendTestImageStorageServerNotificationRequest extends TokenRequest{
-	bool isSuccess;
-	String? receiverId;
+class GetDeviceStateListRequest extends TokenRequest{
+	List<String >? deviceCodes;
 
-	SendTestImageStorageServerNotificationRequest({
-		this.isSuccess = false,
-		this.receiverId,
+	GetDeviceStateListRequest({
+		this.deviceCodes,
 		String? token,
 	}) : super(
 			token: token,
 		);
 
-	factory SendTestImageStorageServerNotificationRequest.fromJson(Map<String, dynamic> map) {
-		return SendTestImageStorageServerNotificationRequest( 
-			isSuccess: map['IsSuccess'],
-			receiverId: map['ReceiverId'],
+	factory GetDeviceStateListRequest.fromJson(Map<String, dynamic> map) {
+		return GetDeviceStateListRequest( 
+			deviceCodes: map['DeviceCodes'] != null ? map['DeviceCodes'].cast<String>().toList() : null,
 			token: map['Token'],
 		);
 	}
 
 	Map<String, dynamic> toJson() {
 		final map = super.toJson();
-		map['IsSuccess'] = isSuccess;
-		if(receiverId != null)
-			map['ReceiverId'] = receiverId;
+		if(deviceCodes != null)
+			map['DeviceCodes'] = deviceCodes;
 		return map;
 	}
 }
 
-class RemoteConnectStautsRequest extends TokenRequest{
+class DeivceCancelLogDownloadRequest extends TokenRequest{
 	String? userCode;
 
-	RemoteConnectStautsRequest({
+	DeivceCancelLogDownloadRequest({
 		this.userCode,
 		String? token,
 	}) : super(
 			token: token,
 		);
 
-	factory RemoteConnectStautsRequest.fromJson(Map<String, dynamic> map) {
-		return RemoteConnectStautsRequest( 
+	factory DeivceCancelLogDownloadRequest.fromJson(Map<String, dynamic> map) {
+		return DeivceCancelLogDownloadRequest( 
 			userCode: map['UserCode'],
 			token: map['Token'],
 		);
@@ -3392,57 +3262,4 @@ class RemoteConnectStautsRequest extends TokenRequest{
 	}
 }
 
-class RemoteConnectHeartRateRequest extends TokenRequest{
-	String? deviceCode;
-
-	RemoteConnectHeartRateRequest({
-		this.deviceCode,
-		String? token,
-	}) : super(
-			token: token,
-		);
-
-	factory RemoteConnectHeartRateRequest.fromJson(Map<String, dynamic> map) {
-		return RemoteConnectHeartRateRequest( 
-			deviceCode: map['DeviceCode'],
-			token: map['Token'],
-		);
-	}
-
-	Map<String, dynamic> toJson() {
-		final map = super.toJson();
-		if(deviceCode != null)
-			map['DeviceCode'] = deviceCode;
-		return map;
-	}
-}
-
-class AddUserRemoteConnectRequest extends GetDeviceRequest{
-	String? roomId;
-
-	AddUserRemoteConnectRequest({
-		this.roomId,
-		String? deviceCode,
-		String? token,
-	}) : super(
-			deviceCode: deviceCode,
-			token: token,
-		);
-
-	factory AddUserRemoteConnectRequest.fromJson(Map<String, dynamic> map) {
-		return AddUserRemoteConnectRequest( 
-			roomId: map['RoomId'],
-			deviceCode: map['DeviceCode'],
-			token: map['Token'],
-		);
-	}
-
-	Map<String, dynamic> toJson() {
-		final map = super.toJson();
-		if(roomId != null)
-			map['RoomId'] = roomId;
-		return map;
-	}
-}
-
 

+ 176 - 370
lib/services/notification.m.dart

@@ -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;
 	}
 }

+ 10 - 31
lib/services/notificationdecoder.dart

@@ -19,38 +19,11 @@ class NotificationDecoder {
 
 	static void setup() {
 		/** Register notification model builders here */
-		_builders.add(NotificationTypeEnum.GetDICOMFileFormatNotification,
-				(map) => GetDICOMFileFormatNotification.fromJson(map));
+		_builders.add(NotificationTypeEnum.SendCommandToDeviceNotification,
+				(map) => SendCommandToDeviceNotification.fromJson(map));
 
-		_builders.add(NotificationTypeEnum.GetImageStorageServerSettingsNotification,
-				(map) => GetImageStorageServerSettingsNotification.fromJson(map));
-
-		_builders.add(NotificationTypeEnum.GetInstalledFunctionalityNotification,
-				(map) => GetInstalledFunctionalityNotification.fromJson(map));
-
-		_builders.add(NotificationTypeEnum.GetTestImageStorageServerNotification,
-				(map) => GetTestImageStorageServerNotification.fromJson(map));
-
-		_builders.add(NotificationTypeEnum.GetDICOMFileFormatNotification,
-				(map) => SendDICOMFileFormatNotification.fromJson(map));
-
-		_builders.add(NotificationTypeEnum.GetImageStorageServerSettingsNotification,
-				(map) => SendImageStorageServerSettingsNotification.fromJson(map));
-
-		_builders.add(NotificationTypeEnum.SendInstalledFunctionalityNotification,
-				(map) => SendInstalledFunctionalityNotification.fromJson(map));
-
-		_builders.add(NotificationTypeEnum.SendTestImageStorageServerNotification,
-				(map) => SendTestImageStorageServerNotification.fromJson(map));
-
-		_builders.add(NotificationTypeEnum.SetDICOMFileFormatNotification,
-				(map) => SetDICOMFileFormatNotification.fromJson(map));
-
-		_builders.add(NotificationTypeEnum.SetImageStorageServerSettingsNotification,
-				(map) => SetImageStorageServerSettingsNotification.fromJson(map));
-
-		_builders.add(NotificationTypeEnum.SetInstalledFunctionalityNotification,
-				(map) => SetInstalledFunctionalityNotification.fromJson(map));
+		_builders.add(NotificationTypeEnum.SendResultToClientNotification,
+				(map) => SendResultToClientNotification.fromJson(map));
 
 		_builders.add(NotificationTypeEnum.AnnouncementPublishNotification,
 				(map) => AnnouncementNotification.fromJson(map));
@@ -97,6 +70,9 @@ class NotificationDecoder {
 		_builders.add(NotificationTypeEnum.VersionUpgradeNotification,
 				(map) => UpgradeVersionNotification.fromJson(map));
 
+		_builders.add(NotificationTypeEnum.CancelLogDownloadNotification,
+				(map) => CancelLogDownloadNotification.fromJson(map));
+
 		_builders.add(NotificationTypeEnum.DeviceDownloadPatchProgressToUserNotification,
 				(map) => DeviceDownloadPatchProgressToUserNotification.fromJson(map));
 
@@ -115,6 +91,9 @@ class NotificationDecoder {
 		_builders.add(NotificationTypeEnum.PushDevicePatchToDeviceNotification,
 				(map) => PushDevicePatchToDeviceNotification.fromJson(map));
 
+		_builders.add(NotificationTypeEnum.RestartDeviceNotification,
+				(map) => RestartDeviceNotification.fromJson(map));
+
 		_builders.add(NotificationTypeEnum.CloseLiveToDeviceNotification,
 				(map) => CloseLiveToDeviceNotification.fromJson(map));
 

+ 327 - 0
lib/services/other.m.dart

@@ -1836,6 +1836,31 @@ class TransportAfterSalesCommonRequest {
 	}
 }
 
+class GetDICOMFileFormatNotificationRequest extends TokenRequest{
+	String? receiverId;
+
+	GetDICOMFileFormatNotificationRequest({
+		this.receiverId,
+		String? token,
+	}) : super(
+			token: token,
+		);
+
+	factory GetDICOMFileFormatNotificationRequest.fromJson(Map<String, dynamic> map) {
+		return GetDICOMFileFormatNotificationRequest( 
+			receiverId: map['ReceiverId'],
+			token: map['Token'],
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = super.toJson();
+		if(receiverId != null)
+			map['ReceiverId'] = receiverId;
+		return map;
+	}
+}
+
 class ConfirmAssociatedWithAccountRequest extends TokenRequest{
 	String? emailAddress;
 	String? verifyCode;
@@ -8020,6 +8045,11 @@ enum FollowUpVisitStatusEnum {
 	VisitCompleted,
 }
 
+enum FunctionalityStatusEnum {
+	DemoMode,
+	Activity,
+}
+
 enum GestationalAgeOriginEnum {
 	GestationalAge,
 	IVF,
@@ -15391,6 +15421,278 @@ class NetworkPrinterParameterDTO extends DevicePrinterParameterDTO{
 	}
 }
 
+class CommandSettingInfoDTO extends NameItemSettingInfoDTO{
+	String? commandDescription;
+
+	CommandSettingInfoDTO({
+		this.commandDescription,
+		String? name,
+		String? key,
+	}) : super(
+			name: name,
+			key: key,
+		);
+
+	factory CommandSettingInfoDTO.fromJson(Map<String, dynamic> map) {
+		return CommandSettingInfoDTO( 
+			commandDescription: map['CommandDescription'],
+			name: map['Name'],
+			key: map['Key'],
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = super.toJson();
+		if(commandDescription != null)
+			map['CommandDescription'] = commandDescription;
+		return map;
+	}
+}
+
+class ExtendCommandSettingInfoDTO extends CommandSettingInfoDTO{
+	String? additionalDescription;
+	String? value;
+
+	ExtendCommandSettingInfoDTO({
+		this.additionalDescription,
+		this.value,
+		String? commandDescription,
+		String? name,
+		String? key,
+	}) : super(
+			commandDescription: commandDescription,
+			name: name,
+			key: key,
+		);
+
+	factory ExtendCommandSettingInfoDTO.fromJson(Map<String, dynamic> map) {
+		return ExtendCommandSettingInfoDTO( 
+			additionalDescription: map['AdditionalDescription'],
+			value: map['Value'],
+			commandDescription: map['CommandDescription'],
+			name: map['Name'],
+			key: map['Key'],
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = super.toJson();
+		if(additionalDescription != null)
+			map['AdditionalDescription'] = additionalDescription;
+		if(value != null)
+			map['Value'] = value;
+		return map;
+	}
+}
+
+class CommandResultInfoDTO extends NameItemSettingInfoDTO{
+	String? result;
+
+	CommandResultInfoDTO({
+		this.result,
+		String? name,
+		String? key,
+	}) : super(
+			name: name,
+			key: key,
+		);
+
+	factory CommandResultInfoDTO.fromJson(Map<String, dynamic> map) {
+		return CommandResultInfoDTO( 
+			result: map['Result'],
+			name: map['Name'],
+			key: map['Key'],
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = super.toJson();
+		if(result != null)
+			map['Result'] = result;
+		return map;
+	}
+}
+
+class FeatureItemInfoDTO extends NameItemSettingInfoDTO{
+	String? details;
+	String? status;
+
+	FeatureItemInfoDTO({
+		this.details,
+		this.status,
+		String? name,
+		String? key,
+	}) : super(
+			name: name,
+			key: key,
+		);
+
+	factory FeatureItemInfoDTO.fromJson(Map<String, dynamic> map) {
+		return FeatureItemInfoDTO( 
+			details: map['Details'],
+			status: map['Status'],
+			name: map['Name'],
+			key: map['Key'],
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = super.toJson();
+		if(details != null)
+			map['Details'] = details;
+		if(status != null)
+			map['Status'] = status;
+		return map;
+	}
+}
+
+class ApplyLicenseInfoDTO extends NameItemSettingInfoDTO{
+	String? applyLicenseDescription;
+
+	ApplyLicenseInfoDTO({
+		this.applyLicenseDescription,
+		String? name,
+		String? key,
+	}) : super(
+			name: name,
+			key: key,
+		);
+
+	factory ApplyLicenseInfoDTO.fromJson(Map<String, dynamic> map) {
+		return ApplyLicenseInfoDTO( 
+			applyLicenseDescription: map['ApplyLicenseDescription'],
+			name: map['Name'],
+			key: map['Key'],
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = super.toJson();
+		if(applyLicenseDescription != null)
+			map['ApplyLicenseDescription'] = applyLicenseDescription;
+		return map;
+	}
+}
+
+class BoolParameterInfoDTO extends NameItemSettingInfoDTO{
+	bool value;
+
+	BoolParameterInfoDTO({
+		this.value = false,
+		String? name,
+		String? key,
+	}) : super(
+			name: name,
+			key: key,
+		);
+
+	factory BoolParameterInfoDTO.fromJson(Map<String, dynamic> map) {
+		return BoolParameterInfoDTO( 
+			value: map['Value'],
+			name: map['Name'],
+			key: map['Key'],
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = super.toJson();
+		map['Value'] = value;
+		return map;
+	}
+}
+
+class StringParameterInfoDTO extends NameItemSettingInfoDTO{
+	String? value;
+
+	StringParameterInfoDTO({
+		this.value,
+		String? name,
+		String? key,
+	}) : super(
+			name: name,
+			key: key,
+		);
+
+	factory StringParameterInfoDTO.fromJson(Map<String, dynamic> map) {
+		return StringParameterInfoDTO( 
+			value: map['Value'],
+			name: map['Name'],
+			key: map['Key'],
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = super.toJson();
+		if(value != null)
+			map['Value'] = value;
+		return map;
+	}
+}
+
+class ChoiceParameterInfoDTO extends NameItemSettingInfoDTO{
+	String? value;
+	List<String >? items;
+
+	ChoiceParameterInfoDTO({
+		this.value,
+		this.items,
+		String? name,
+		String? key,
+	}) : super(
+			name: name,
+			key: key,
+		);
+
+	factory ChoiceParameterInfoDTO.fromJson(Map<String, dynamic> map) {
+		return ChoiceParameterInfoDTO( 
+			value: map['Value'],
+			items: map['Items'] != null ? map['Items'].cast<String>().toList() : null,
+			name: map['Name'],
+			key: map['Key'],
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = super.toJson();
+		if(value != null)
+			map['Value'] = value;
+		if(items != null)
+			map['Items'] = items;
+		return map;
+	}
+}
+
+class CommandResultPageSettingInfoDTO extends ListPageSettingInfoDTO{
+	String? result;
+
+	CommandResultPageSettingInfoDTO({
+		this.result,
+		List<GroupSettingInfoDTO >? groups,
+		String? name,
+		String? key,
+	}) : super(
+			groups: groups,
+			name: name,
+			key: key,
+		);
+
+	factory CommandResultPageSettingInfoDTO.fromJson(Map<String, dynamic> map) {
+		return CommandResultPageSettingInfoDTO( 
+			result: map['Result'],
+			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();
+		if(result != null)
+			map['Result'] = result;
+		return map;
+	}
+}
+
 class BoardPointDTO {
 	double x;
 	double y;
@@ -16037,6 +16339,31 @@ class UserDefinedCommentsDTO {
 	}
 }
 
+class FunctionalityInfo {
+	String? functionalityName;
+	FunctionalityStatusEnum functionalityStatus;
+
+	FunctionalityInfo({
+		this.functionalityName,
+		this.functionalityStatus = FunctionalityStatusEnum.DemoMode,
+	});
+
+	factory FunctionalityInfo.fromJson(Map<String, dynamic> map) {
+		return FunctionalityInfo( 
+			functionalityName: map['FunctionalityName'],
+			functionalityStatus: FunctionalityStatusEnum.values.firstWhere((e) => e.index == map['FunctionalityStatus']),
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = Map<String, dynamic>();
+		if(functionalityName != null)
+			map['FunctionalityName'] = functionalityName;
+		map['FunctionalityStatus'] = functionalityStatus.index;
+		return map;
+	}
+}
+
 class AdminStatisticDTO extends BaseDTO{
 	String? adminStatisticCode;
 	String? name;