summaryrefslogtreecommitdiffstats
path: root/client/common/test/TestClientChannels.c
diff options
context:
space:
mode:
Diffstat (limited to 'client/common/test/TestClientChannels.c')
-rw-r--r--client/common/test/TestClientChannels.c87
1 files changed, 87 insertions, 0 deletions
diff --git a/client/common/test/TestClientChannels.c b/client/common/test/TestClientChannels.c
new file mode 100644
index 0000000..b15a734
--- /dev/null
+++ b/client/common/test/TestClientChannels.c
@@ -0,0 +1,87 @@
+
+#include <stdio.h>
+#include <winpr/crt.h>
+#include <winpr/windows.h>
+
+#include <freerdp/client/channels.h>
+#include <freerdp/channels/rdpsnd.h>
+
+int TestClientChannels(int argc, char* argv[])
+{
+ DWORD dwFlags = 0;
+ FREERDP_ADDIN** ppAddins = NULL;
+
+ WINPR_UNUSED(argc);
+ WINPR_UNUSED(argv);
+ dwFlags = FREERDP_ADDIN_DYNAMIC;
+
+ printf("Enumerate all\n");
+ ppAddins = freerdp_channels_list_addins(NULL, NULL, NULL, dwFlags);
+
+ for (size_t index = 0; ppAddins[index] != NULL; index++)
+ {
+ FREERDP_ADDIN* pAddin = ppAddins[index];
+
+ printf("Addin: Name: %s Subsystem: %s Type: %s\n", pAddin->cName, pAddin->cSubsystem,
+ pAddin->cType);
+ }
+
+ freerdp_channels_addin_list_free(ppAddins);
+
+ printf("Enumerate rdpsnd\n");
+ ppAddins = freerdp_channels_list_addins(RDPSND_CHANNEL_NAME, NULL, NULL, dwFlags);
+
+ for (size_t index = 0; ppAddins[index] != NULL; index++)
+ {
+ FREERDP_ADDIN* pAddin = ppAddins[index];
+
+ printf("Addin: Name: %s Subsystem: %s Type: %s\n", pAddin->cName, pAddin->cSubsystem,
+ pAddin->cType);
+ }
+
+ freerdp_channels_addin_list_free(ppAddins);
+
+#if defined(CHANNEL_TSMF_CLIENT)
+ printf("Enumerate tsmf video\n");
+ ppAddins = freerdp_channels_list_addins("tsmf", NULL, "video", dwFlags);
+
+ for (size_t index = 0; ppAddins[index] != NULL; index++)
+ {
+ FREERDP_ADDIN* pAddin = ppAddins[index];
+
+ printf("Addin: Name: %s Subsystem: %s Type: %s\n", pAddin->cName, pAddin->cSubsystem,
+ pAddin->cType);
+ }
+
+ freerdp_channels_addin_list_free(ppAddins);
+#endif
+
+ ppAddins = freerdp_channels_list_addins("unknown", NULL, NULL, dwFlags);
+
+ for (size_t index = 0; ppAddins[index] != NULL; index++)
+ {
+ FREERDP_ADDIN* pAddin = ppAddins[index];
+
+ printf("Addin: Name: %s Subsystem: %s Type: %s\n", pAddin->cName, pAddin->cSubsystem,
+ pAddin->cType);
+ }
+
+ freerdp_channels_addin_list_free(ppAddins);
+
+ printf("Enumerate static addins\n");
+
+ dwFlags = FREERDP_ADDIN_STATIC;
+ ppAddins = freerdp_channels_list_addins(NULL, NULL, NULL, dwFlags);
+
+ for (size_t index = 0; ppAddins[index] != NULL; index++)
+ {
+ FREERDP_ADDIN* pAddin = ppAddins[index];
+
+ printf("Addin: Name: %s Subsystem: %s Type: %s\n", pAddin->cName, pAddin->cSubsystem,
+ pAddin->cType);
+ }
+
+ freerdp_channels_addin_list_free(ppAddins);
+
+ return 0;
+}