Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions include/lsl/streaminfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,14 @@ extern LIBLSL_C_API double lsl_get_created_at(lsl_streaminfo info);
*/
extern LIBLSL_C_API const char *lsl_get_uid(lsl_streaminfo info);

/**
* Reset the UID of the stream info to a new random value.
*
* This can be used to generate a UID if one doesn't exist.
* @return An immutable library-owned pointer to the new string value. @sa lsl_destroy_string()
*/
extern LIBLSL_C_API const char *lsl_reset_uid(lsl_streaminfo info);

/**
* Session ID for the given stream.
*
Expand Down
4 changes: 4 additions & 0 deletions src/lsl_streaminfo_c.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ LIBLSL_C_API const char *lsl_get_source_id(lsl_streaminfo info) {
LIBLSL_C_API int32_t lsl_get_version(lsl_streaminfo info) { return info->version(); }
LIBLSL_C_API double lsl_get_created_at(lsl_streaminfo info) { return info->created_at(); }
LIBLSL_C_API const char *lsl_get_uid(lsl_streaminfo info) { return info->uid().c_str(); }
LIBLSL_C_API const char *lsl_reset_uid(lsl_streaminfo info) {
return info->reset_uid().c_str();

}
LIBLSL_C_API const char *lsl_get_session_id(lsl_streaminfo info) {
return info->session_id().c_str();
}
Expand Down
Loading