BALTECH SDK wrapper functions reference
platform.h
Go to the documentation of this file.
1 
12 #ifndef __PLATFORM_H__
13 #define __PLATFORM_H__
14 
15 
16 
17 #include "common.h"
18 
19 
20 #ifdef _WIN32
21  #if ! defined(PATH_MAX)
22  #define PATH_MAX _MAX_PATH
23  #endif
24 #else
25  #include <limits.h>
26 #endif
27 
28 
34 BRP_LIB brp_time brp_get_time(void);
35 
36 
37 
41 BRP_LIB bool brp_get_random
42 (
43  brp_buf buf,
44  size_t len
45 );
46 
47 
53 BRP_LIB bool brp_get_home_dir
54 (
55  char * result
56 );
59 
60 
66 BRP_LIB bool brp_get_process_name
67 (
68  char * result
69 );
72 
73 
80 BRP_LIB bool brp_create_directory_recursive(const char *path);
81 
82 
89 BRP_LIB bool brp_directory_exists(const char *path);
90 
91 
106 BRP_LIB bool brp_getenv(const char *name, char *result, size_t len);
107 
108 
109 #endif
110  // end of defgroup brp_lib
unsigned long brp_time
absolute/relative timeout/delay in ms.
Definition: common.h:67
BRP_LIB bool brp_getenv(const char *name, char *result, size_t len)
Retrieves the value of an environment variable.
BRP_LIB brp_time brp_get_time(void)
Retrieves a monotonic timer since powerup.
BRP_LIB bool brp_get_home_dir(char *result)
Retrieves the HOME directory of the current user.
BRP_LIB bool brp_create_directory_recursive(const char *path)
Creates a directory recursively, creating intermediate directories as needed.
BRP_LIB bool brp_directory_exists(const char *path)
Checks if a directory exists at the given path.
Contains the basic defines that are required throughout the BRP library.
BRP_LIB bool brp_get_random(brp_buf buf, size_t len)
Retrieve random data and store it into a buffer.
unsigned char * brp_buf
represents a pointer to a protocol data buffer.
Definition: common.h:61
BRP_LIB bool brp_get_process_name(char *result)
Retrieves the (file-)name of the current process.