blob: 8c798ebf6f0c545c242fb895804dc20dcf2aad06 [file] [log] [blame]
James Kuszmaul28cc8252021-01-17 11:32:21 -08001#pragma once
2#include "code.h"
3
4/// Translate a rawrtc return code to a string.
5char const* rawrtc_code_to_str(enum rawrtc_code const code);
6
7/// Translate an re error to a rawrtc code.
8enum rawrtc_code rawrtc_error_to_code(const int code);
9
10/// Duplicate a string.
11/// `*destinationp` will be set to a copy of `source` and must be
12/// unreferenced.
13enum rawrtc_code rawrtc_strdup(
14 char** const destinationp, // de-referenced
15 char const* const source);
16
17/// Print a formatted string to a dynamically allocated buffer.
18/// `*destinationp` must be unreferenced.
19enum rawrtc_code rawrtc_sdprintf(char** const destinationp, char* const formatter, ...);