Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
uuid.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2023 Roc Streaming authors
3  *
4  * This Source Code Form is subject to the terms of the Mozilla Public
5  * License, v. 2.0. If a copy of the MPL was not distributed with this
6  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
7  */
8 
9 //! @file roc_core/uuid.h
10 //! @brief UUID generation.
11 
12 #ifndef ROC_CORE_UUID_H_
13 #define ROC_CORE_UUID_H_
14 
15 #include "roc_core/stddefs.h"
16 
17 namespace roc {
18 namespace core {
19 
20 enum {
21  //! Number of characters in UUID string.
22  UuidLen = 36
23 };
24 
25 //! Generate UUID string into given buffer.
26 //! @note
27 //! Generated string has UuidLen characters + null terminator.
28 //! Panics if @p buf is null or @p buf_sz is less than UuidLen + 1.
29 bool uuid_generare(char* buf, size_t buf_sz);
30 
31 } // namespace core
32 } // namespace roc
33 
34 #endif // ROC_CORE_UUID_H_
bool uuid_generare(char *buf, size_t buf_sz)
Generate UUID string into given buffer.
@ UuidLen
Number of characters in UUID string.
Definition: uuid.h:22
Root namespace.
Commonly used types and functions.