file
share_8h
[ ]
define
FALSE
0
define
TRUE
(!FALSE)
define
MIN
(a < b ? a : b)
define
MAX
(a > b ? a : b)
define
PRINT_RUSAGE
define
PRINT_ERROR
sherr(_err, _msg)
define
INADDR_LOOPBACK
0x7f000001
define
MAX_SHARE_NAME_LENGTH
136
define
MAX_SHARE_PASS_LENGTH
136
define
MAX_SHARE_HASH_LENGTH
136
define
SHARE_PAGE_SIZE
8192
define
SHARE_DEFAULT_EXPIRE_TIME
1514743200
A shtime_t representation of 01/01/60 UTC.
define
MAX_SHARE_SESSION_TIME
10368000
typedef
typedef uint64_t shsize_t
A specification of byte size.
Note
This type is typically only used for disk storage or socket communications. A regular size_t is used when the bitsize of a number being reference is not restricted.
typedef
typedef long double shnum_t
A large floating-point number.
function
char* get_libshare_email
(void)
An email address where bug reports can be submitted.
function
char* get_libshare_version
(void)
The current libshare library version.
function
char* get_libshare_title
(void)
The libshare library package name.
function
const char* get_libshare_path
(void)
Unix: /var/lib/share or ~/.share Windows: C:\.share Mac: ~/Library/Application Support/.share.
Return Value
The directory where share library persistent data is stored.
Note
This value can be overwritten with a shared preference.
function
const char* get_libshare_account_name
(void)
function
uint64_t get_libshare_account_id
(void)
function
int shnum_prec
(shnum_t fval)
Calculates the usable floating point precision (E notation).
function
shnum_t shnum_prec_dim
(shnum_t fval, int prec)
Reduce the precision of a large number to specific E exponent.
function
void shnum_set
(shnum_t val, uint64_t *bin_p)
Fills a uint64_t with a compatch version of a large number in network-byte order.
function
shnum_t shnum_get
(uint64_t val_bin)
Obtains a large number from a compact uint64_t value in host-byte order.
function
double shnum_getf
(uint64_t val_bin)
Obtain a double representation from a compact shnum_t value.
function
int shnum_sign
(shnum_t v)
function
int shclose
(int fd)
Close the file descriptor of a socket created by a libshare connection.
See
shconnect() group__libshare__net_1ga95e7f7ab4c827b012d3e94f0e0deaa12 member