mirror of https://github.com/oxen-io/lokinet
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
828 B
C
38 lines
828 B
C
#pragma once
|
|
#include "lokinet_export.h"
|
|
#ifdef __cplusplus
|
|
extern "C"
|
|
{
|
|
#endif
|
|
|
|
/// change our network id globally across all contexts
|
|
void EXPORT
|
|
lokinet_set_netid(const char*);
|
|
|
|
/// get our current netid
|
|
/// must be free()'d after use
|
|
const char* EXPORT
|
|
lokinet_get_netid();
|
|
|
|
/// set log level
|
|
/// possible values: trace, debug, info, warn, error, none
|
|
/// return 0 on success
|
|
/// return non zero on fail
|
|
int EXPORT
|
|
lokinet_log_level(const char*);
|
|
|
|
typedef void (*lokinet_logger_func)(const char*, void*);
|
|
|
|
/// set a custom logger function
|
|
void EXPORT
|
|
lokinet_set_logger(lokinet_logger_func func, void* user);
|
|
|
|
/// @brief take in hex and turn it into base32z
|
|
/// @return value must be free()'d later
|
|
char* EXPORT
|
|
lokinet_hex_to_base32z(const char* hex);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|