Add methods to get the hostname and network interfaces.

This commit is contained in:
Peter Johnson
2016-11-18 11:44:25 -08:00
parent e1f4e3d2d7
commit 5fecc57e8a
7 changed files with 103 additions and 0 deletions

View File

@@ -297,6 +297,11 @@ void CS_FreeEnumPropertyChoices(char** choices, int count);
void CS_FreeEnumeratedProperties(CS_Property* properties, int count);
void CS_FreeEnumeratedVideoModes(CS_VideoMode* modes, int count);
char* CS_GetHostname();
char** CS_GetNetworkInterfaces(int* count);
void CS_FreeNetworkInterfaces(char** interfaces, int count);
#ifdef __cplusplus
}
#endif

View File

@@ -275,6 +275,10 @@ llvm::ArrayRef<CS_Source> EnumerateSourceHandles(
llvm::ArrayRef<CS_Sink> EnumerateSinkHandles(
llvm::SmallVectorImpl<CS_Sink>& vec, CS_Status* status);
std::string GetHostname();
std::vector<std::string> GetNetworkInterfaces();
} // namespace cs
#endif // CSCORE_CPP_H_