Vuo  2.4.1
VuoInputEditorSyphonServerDescription.cc
Go to the documentation of this file.
1
11
12extern "C"
13{
14 #include "VuoSyphon.h"
15}
16
21{
23}
24
29{
30 VuoInputEditorMenuItem *optionsTree = new VuoInputEditorMenuItem("root");
31
32 optionsTree->addItem(new VuoInputEditorMenuItem("First available server", NULL));
33 optionsTree->addSeparator();
34 optionsTree->addItem(new VuoInputEditorMenuItem("Specific server (by name)", NULL, NULL, false));
35
37 unsigned long deviceCount = VuoListGetCount_VuoSyphonServerDescription(devices);
38 set<string> uniqueServerNames, uniqueApplicationNames;
39 for (unsigned long i = 1; i <= deviceCount; ++i)
40 {
42 if (device.serverName && strlen(device.serverName))
43 uniqueServerNames.insert(device.serverName);
44 if (device.applicationName && strlen(device.applicationName))
45 uniqueApplicationNames.insert(device.applicationName);
46 }
47
48 if (!uniqueServerNames.empty())
49 for (set<string>::iterator it = uniqueServerNames.begin(); it != uniqueServerNames.end(); ++it)
51 else
52 optionsTree->addItem(new VuoInputEditorMenuItem(" (no servers found)", NULL, NULL, false));
53
54 optionsTree->addSeparator();
55 optionsTree->addItem(new VuoInputEditorMenuItem("Specific server (by app)", NULL, NULL, false));
56
57 if (!uniqueApplicationNames.empty())
58 for (set<string>::iterator it = uniqueApplicationNames.begin(); it != uniqueApplicationNames.end(); ++it)
60 else
61 optionsTree->addItem(new VuoInputEditorMenuItem(" (no servers found)", NULL, NULL, false));
62
63 return optionsTree;
64}
65
66extern "C"
67{
68
70
75const void * vuoCopyCompositionStateFromThreadLocalStorage(void) { return NULL; }
76uint64_t vuoGetCompositionUniqueIdentifier(const struct VuoCompositionState *compositionState) { return 0; }
78
79}