mirror of
https://github.com/finos/SymphonyElectron.git
synced 2025-02-25 18:55:29 -06:00
SDA-3565 Citrix media redirection status API endpoint (#1340)
This commit is contained in:
parent
e028ac0efa
commit
f01312cea7
@ -39,7 +39,6 @@ export const getCitrixMediaRedirectionStatus = async (): Promise<RedirectionStat
|
||||
|
||||
return new Promise((resolve, _reject) => {
|
||||
regKey.get(CITRIX_REGISTRY_KEY_NAME, (err, redirectionSupportItem) => {
|
||||
logger.info('citrix: ', redirectionSupportItem);
|
||||
if (err) {
|
||||
logger.info('citrix-handler: error occurred. Details: ', err);
|
||||
resolve(RedirectionStatus.INACTIVE);
|
||||
|
@ -18,6 +18,7 @@ import { activityDetection } from './activity-detection';
|
||||
import { analytics } from './analytics-handler';
|
||||
import appStateHandler from './app-state-handler';
|
||||
import { autoUpdate } from './auto-update-handler';
|
||||
import { getCitrixMediaRedirectionStatus } from './citrix-handler';
|
||||
import { CloudConfigDataTypes, config, ICloudConfig } from './config-handler';
|
||||
import { downloadHandler } from './download-handler';
|
||||
import { mainEvents } from './main-event-handler';
|
||||
@ -457,6 +458,8 @@ ipcMain.handle(
|
||||
return browserWin.getNativeWindowHandle();
|
||||
}
|
||||
break;
|
||||
case apiCmds.getCitrixMediaRedirectionStatus:
|
||||
return getCitrixMediaRedirectionStatus();
|
||||
}
|
||||
return;
|
||||
},
|
||||
|
@ -62,6 +62,7 @@ export enum apiCmds {
|
||||
handleSwiftSearchMessageEvents = 'handle-shift-search-message-events',
|
||||
onSwiftSearchMessage = 'on-shift-search-message',
|
||||
getNativeWindowHandle = 'get-native-window-handle',
|
||||
getCitrixMediaRedirectionStatus = 'get-citrix-media-redirection-status',
|
||||
}
|
||||
|
||||
export enum apiName {
|
||||
|
@ -283,6 +283,13 @@
|
||||
<input type="text" id="text-window-handle" />
|
||||
<hr />
|
||||
<br />
|
||||
|
||||
<hr />
|
||||
<p>Citrix Media Redirection Status:</p>
|
||||
<button id="get-citrix-media-redir">Get status</button>
|
||||
<input type="text" id="text-citrix-media-redir" />
|
||||
<hr />
|
||||
<br />
|
||||
</body>
|
||||
<script>
|
||||
window.name = 'main';
|
||||
@ -329,6 +336,7 @@
|
||||
restartApp: 'restart-app',
|
||||
autoUpdate: 'auto-update',
|
||||
getNativeWindowHandle: 'get-native-window-handle',
|
||||
getCitrixMediaRedirectionStatus: 'get-citrix-media-redirection-status',
|
||||
};
|
||||
let requestId = 0;
|
||||
|
||||
@ -1202,5 +1210,22 @@
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
document
|
||||
.getElementById('get-citrix-media-redir')
|
||||
.addEventListener('click', () => {
|
||||
const resultCallback = (status) => {
|
||||
document.getElementById('text-citrix-media-redir').value = status;
|
||||
};
|
||||
if (window.ssf) {
|
||||
window.ssf.getCitrixMediaRedirectionStatus().then(resultCallback);
|
||||
} else if (window.manaSSF) {
|
||||
window.manaSSF.getCitrixMediaRedirectionStatus().then(resultCallback);
|
||||
} else {
|
||||
postRequest(apiCmds.getCitrixMediaRedirectionStatus, null, {
|
||||
successCallback: resultCallback,
|
||||
});
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</html>
|
||||
|
@ -89,6 +89,8 @@ if (ssfWindow.ssf) {
|
||||
getZoomLevel: ssfWindow.ssf.getZoomLevel,
|
||||
supportedSettings: ssfWindow.ssf.supportedSettings,
|
||||
getNativeWindowHandle: ssfWindow.ssf.getNativeWindowHandle,
|
||||
getCitrixMediaRedirectionStatus:
|
||||
ssfWindow.ssf.getCitrixMediaRedirectionStatus,
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -5,6 +5,7 @@ import {
|
||||
searchAPIVersion,
|
||||
version,
|
||||
} from '../../package.json';
|
||||
import { RedirectionStatus } from '../app/citrix-handler';
|
||||
import { IDownloadItem } from '../app/download-handler';
|
||||
import {
|
||||
apiCmds,
|
||||
@ -740,6 +741,16 @@ export class SSFApi {
|
||||
cmd: apiCmds.getNativeWindowHandle,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the current status of Citrix' media redirection feature
|
||||
* @returns status
|
||||
*/
|
||||
public getCitrixMediaRedirectionStatus(): Promise<RedirectionStatus> {
|
||||
return ipcRenderer.invoke(apiName.symphonyApi, {
|
||||
cmd: apiCmds.getCitrixMediaRedirectionStatus,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user