(trunk) first draft of changing the FreeSpace API to behave as https://trac.transmissionbt.com/ticket/4076#comment:25 -- libT, rpc, qt, and gtk implementations.

This commit is contained in:
Jordan Lee
2013-02-09 04:05:03 +00:00
parent 794a0c1d80
commit cd09204a6e
31 changed files with 552 additions and 190 deletions

View File

@@ -42,9 +42,20 @@ const char * tr_getTorrentDir (const tr_session *);
/** @brief return the directory where the Web Client's web ui files are kept */
const char * tr_getWebClientDir (const tr_session *);
struct tr_device_info
{
char * path;
char * device;
char * fstype;
};
struct tr_device_info * tr_device_info_create (const char * path);
/** If the disk quota is enabled and readable, this returns how much is available in the quota.
Otherwise, it returns how much is available on the disk, or -1 on error. */
int64_t tr_getFreeSpace (const char * path, char * device, char * fstype);
int64_t tr_device_info_get_free_space (const struct tr_device_info * info);
void tr_device_info_free (struct tr_device_info * info);
/** @} */