FreeRDP
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Modules Pages
TestClientChannels.c
1
2#include <stdio.h>
3#include <winpr/crt.h>
4#include <winpr/windows.h>
5
6#include <freerdp/client/channels.h>
7#include <freerdp/channels/rdpsnd.h>
8
9int TestClientChannels(int argc, char* argv[])
10{
11 DWORD dwFlags = 0;
12 FREERDP_ADDIN** ppAddins = NULL;
13
14 WINPR_UNUSED(argc);
15 WINPR_UNUSED(argv);
16 dwFlags = FREERDP_ADDIN_DYNAMIC;
17
18 printf("Enumerate all\n");
19 ppAddins = freerdp_channels_list_addins(NULL, NULL, NULL, dwFlags);
20
21 for (size_t index = 0; ppAddins[index] != NULL; index++)
22 {
23 FREERDP_ADDIN* pAddin = ppAddins[index];
24
25 printf("Addin: Name: %s Subsystem: %s Type: %s\n", pAddin->cName, pAddin->cSubsystem,
26 pAddin->cType);
27 }
28
29 freerdp_channels_addin_list_free(ppAddins);
30
31 printf("Enumerate rdpsnd\n");
32 ppAddins = freerdp_channels_list_addins(RDPSND_CHANNEL_NAME, NULL, NULL, dwFlags);
33
34 for (size_t index = 0; ppAddins[index] != NULL; index++)
35 {
36 FREERDP_ADDIN* pAddin = ppAddins[index];
37
38 printf("Addin: Name: %s Subsystem: %s Type: %s\n", pAddin->cName, pAddin->cSubsystem,
39 pAddin->cType);
40 }
41
42 freerdp_channels_addin_list_free(ppAddins);
43
44#if defined(CHANNEL_TSMF_CLIENT)
45 printf("Enumerate tsmf video\n");
46 ppAddins = freerdp_channels_list_addins("tsmf", NULL, "video", dwFlags);
47
48 for (size_t index = 0; ppAddins[index] != NULL; index++)
49 {
50 FREERDP_ADDIN* pAddin = ppAddins[index];
51
52 printf("Addin: Name: %s Subsystem: %s Type: %s\n", pAddin->cName, pAddin->cSubsystem,
53 pAddin->cType);
54 }
55
56 freerdp_channels_addin_list_free(ppAddins);
57#endif
58
59 ppAddins = freerdp_channels_list_addins("unknown", NULL, NULL, dwFlags);
60
61 for (size_t index = 0; ppAddins[index] != NULL; index++)
62 {
63 FREERDP_ADDIN* pAddin = ppAddins[index];
64
65 printf("Addin: Name: %s Subsystem: %s Type: %s\n", pAddin->cName, pAddin->cSubsystem,
66 pAddin->cType);
67 }
68
69 freerdp_channels_addin_list_free(ppAddins);
70
71 printf("Enumerate static addins\n");
72
73 dwFlags = FREERDP_ADDIN_STATIC;
74 ppAddins = freerdp_channels_list_addins(NULL, NULL, NULL, dwFlags);
75
76 for (size_t index = 0; ppAddins[index] != NULL; index++)
77 {
78 FREERDP_ADDIN* pAddin = ppAddins[index];
79
80 printf("Addin: Name: %s Subsystem: %s Type: %s\n", pAddin->cName, pAddin->cSubsystem,
81 pAddin->cType);
82 }
83
84 freerdp_channels_addin_list_free(ppAddins);
85
86 return 0;
87}