moved public link definitions into publiclinks.h, no clear namespace here though...
This commit is contained in:
parent
8bad4912f0
commit
5bb00db4f7
|
|
@ -45,6 +45,7 @@
|
|||
#include "ptools.h"
|
||||
#include "pstatus.h"
|
||||
#include "pfoldersync.h"
|
||||
#include "publiclinks.h"
|
||||
|
||||
typedef uint64_t psync_userid_t;
|
||||
typedef uint64_t psync_shareid_t;
|
||||
|
|
@ -422,34 +423,6 @@ typedef struct {
|
|||
psync_notification_t notifications[];
|
||||
} psync_notification_list_t;
|
||||
|
||||
typedef struct {
|
||||
uint64_t linkid;
|
||||
const char *name;
|
||||
const char *code;
|
||||
const char *comment;
|
||||
const char *fulllink;
|
||||
uint64_t traffic;
|
||||
uint64_t maxspace;
|
||||
uint64_t downloads;
|
||||
uint64_t created;
|
||||
uint64_t modified;
|
||||
uint64_t itemid;
|
||||
uint8_t isfolder;
|
||||
uint8_t isupload;
|
||||
uint8_t icon;
|
||||
uint64_t parentfolderid;
|
||||
uint8_t haspassword;
|
||||
uint8_t type;
|
||||
uint64_t views;
|
||||
uint64_t expire;
|
||||
uint8_t enableuploadforeveryone;
|
||||
uint8_t enableuploadforchosenusers;
|
||||
} link_info_t;
|
||||
|
||||
typedef struct {
|
||||
uint32_t entrycnt;
|
||||
link_info_t entries[];
|
||||
} plink_info_list_t;
|
||||
|
||||
typedef enum {
|
||||
Dev_Types_UsbRemovableDisk = 1,
|
||||
|
|
@ -490,20 +463,6 @@ typedef struct {
|
|||
plogged_device_t devices[];
|
||||
} plogged_device_list_t;
|
||||
|
||||
typedef struct {
|
||||
const char *name;
|
||||
uint64_t created;
|
||||
uint64_t modified;
|
||||
uint8_t isfolder;
|
||||
uint64_t itemid;
|
||||
uint8_t icon;
|
||||
} link_cont_t;
|
||||
|
||||
typedef struct {
|
||||
uint32_t entrycnt;
|
||||
link_cont_t entries[];
|
||||
} plink_contents_t;
|
||||
|
||||
typedef struct {
|
||||
uint64_t teamid;
|
||||
const char *mail;
|
||||
|
|
@ -516,30 +475,6 @@ typedef struct {
|
|||
contact_info_t entries[];
|
||||
} pcontacts_list_t;
|
||||
|
||||
typedef struct {
|
||||
uint64_t recieverid;
|
||||
const char *mail;
|
||||
} reciever_info_t;
|
||||
|
||||
typedef struct {
|
||||
size_t entrycnt;
|
||||
reciever_info_t entries[];
|
||||
} preciever_list_t;
|
||||
|
||||
typedef struct {
|
||||
const char *link;
|
||||
const char *name;
|
||||
const char *code;
|
||||
const char *description;
|
||||
uint64_t created;
|
||||
uint8_t locationid;
|
||||
} bookmark_info_t;
|
||||
|
||||
typedef struct {
|
||||
size_t entrycnt;
|
||||
bookmark_info_t entries[];
|
||||
} bookmarks_list_t;
|
||||
|
||||
typedef struct {
|
||||
const char *email;
|
||||
const char *currency;
|
||||
|
|
|
|||
|
|
@ -30,77 +30,105 @@
|
|||
#ifndef _PUBLIC_LINKS_H
|
||||
#define _PUBLIC_LINKS_H
|
||||
|
||||
#include "psynclib.h"
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
int64_t do_psync_file_public_link(const char *path, int64_t *plinkid /*OUT*/,
|
||||
char **link /*OUT*/, char **err /*OUT*/,
|
||||
/*OUT*/ uint64_t expire, int maxdownloads,
|
||||
int maxtraffic);
|
||||
int64_t do_psync_screenshot_public_link(const char *path, int hasdelay,
|
||||
uint64_t delay, char **link /*OUT*/,
|
||||
char **err /*OUT*/);
|
||||
int64_t do_psync_folder_public_link(const char *path, char **link /*OUT*/,
|
||||
char **err /*OUT*/, uint64_t expire,
|
||||
#include "pfoldersync.h"
|
||||
|
||||
typedef struct {
|
||||
uint64_t linkid;
|
||||
const char *name;
|
||||
const char *code;
|
||||
const char *comment;
|
||||
const char *fulllink;
|
||||
uint64_t traffic;
|
||||
uint64_t maxspace;
|
||||
uint64_t downloads;
|
||||
uint64_t created;
|
||||
uint64_t modified;
|
||||
uint64_t itemid;
|
||||
uint8_t isfolder;
|
||||
uint8_t isupload;
|
||||
uint8_t icon;
|
||||
uint64_t parentfolderid;
|
||||
uint8_t haspassword;
|
||||
uint8_t type;
|
||||
uint64_t views;
|
||||
uint64_t expire;
|
||||
uint8_t enableuploadforeveryone;
|
||||
uint8_t enableuploadforchosenusers;
|
||||
} link_info_t;
|
||||
|
||||
typedef struct {
|
||||
uint32_t entrycnt;
|
||||
link_info_t entries[];
|
||||
} plink_info_list_t;
|
||||
|
||||
typedef struct {
|
||||
const char *name;
|
||||
uint64_t created;
|
||||
uint64_t modified;
|
||||
uint8_t isfolder;
|
||||
uint64_t itemid;
|
||||
uint8_t icon;
|
||||
} link_cont_t;
|
||||
|
||||
typedef struct {
|
||||
uint32_t entrycnt;
|
||||
link_cont_t entries[];
|
||||
} plink_contents_t;
|
||||
|
||||
typedef struct {
|
||||
uint64_t recieverid;
|
||||
const char *mail;
|
||||
} reciever_info_t;
|
||||
|
||||
typedef struct {
|
||||
size_t entrycnt;
|
||||
reciever_info_t entries[];
|
||||
} preciever_list_t;
|
||||
|
||||
typedef struct {
|
||||
const char *link;
|
||||
const char *name;
|
||||
const char *code;
|
||||
const char *description;
|
||||
uint64_t created;
|
||||
uint8_t locationid;
|
||||
} bookmark_info_t;
|
||||
|
||||
typedef struct {
|
||||
size_t entrycnt;
|
||||
bookmark_info_t entries[];
|
||||
} bookmarks_list_t;
|
||||
|
||||
int64_t do_psync_file_public_link(const char *path, int64_t *plinkid /*OUT*/, char **link /*OUT*/, char **err /*OUT*/, /*OUT*/ uint64_t expire, int maxdownloads, int maxtraffic);
|
||||
int64_t do_psync_screenshot_public_link(const char *path, int hasdelay, uint64_t delay, char **link /*OUT*/, char **err /*OUT*/);
|
||||
int64_t do_psync_folder_public_link(const char *path, char **link /*OUT*/, char **err /*OUT*/, uint64_t expire,
|
||||
int maxdownloads, int maxtraffic);
|
||||
int64_t do_psync_folder_updownlink_link(int canupload,
|
||||
unsigned long long folderid,
|
||||
const char *mail, char **err /*OUT*/);
|
||||
int64_t do_psync_folder_public_link_full(const char *path, char **link /*OUT*/,
|
||||
char **err /*OUT*/, uint64_t expire,
|
||||
int maxdownloads, int maxtraffic,
|
||||
const char *password);
|
||||
int64_t do_ptree_public_link(const char *linkname, const char *root,
|
||||
char **folders, int numfolders, char **files,
|
||||
int numfiles, char **link /*OUT*/,
|
||||
char **err /*OUT*/, uint64_t expire,
|
||||
int maxdownloads, int maxtraffic);
|
||||
int64_t do_psync_folder_updownlink_link(int canupload, unsigned long long folderid, const char *mail, char **err /*OUT*/);
|
||||
int64_t do_psync_folder_public_link_full(const char *path, char **link /*OUT*/, char **err /*OUT*/, uint64_t expire, int maxdownloads, int maxtraffic, const char *password);
|
||||
int64_t do_ptree_public_link(const char *linkname, const char *root, char **folders, int numfolders, char **files, int numfiles, char **link /*OUT*/, char **err /*OUT*/, uint64_t expire, int maxdownloads, int maxtraffic);
|
||||
plink_info_list_t *do_psync_list_links(char **err /*OUT*/);
|
||||
int do_psync_delete_link(int64_t linkid, char **err /*OUT*/);
|
||||
int64_t do_psync_upload_link(const char *path, const char *comment,
|
||||
char **link /*OUT*/, char **err /*OUT*/,
|
||||
uint64_t expire, int maxspace, int maxfiles);
|
||||
int64_t do_psync_upload_link(const char *path, const char *comment, char **link /*OUT*/, char **err /*OUT*/, uint64_t expire, int maxspace, int maxfiles);
|
||||
int do_psync_delete_upload_link(int64_t uploadlinkid, char **err /*OUT*/);
|
||||
int do_psync_change_link(unsigned long long linkid, unsigned long long expire,
|
||||
int delete_expire, const char *linkpassword,
|
||||
int delete_password, unsigned long long maxtraffic,
|
||||
unsigned long long maxdownloads,
|
||||
int enableuploadforeveryone,
|
||||
int enableuploadforchosenusers, int disableupload,
|
||||
char **err);
|
||||
|
||||
int do_change_link_expire(unsigned long long linkid, unsigned long long expire,
|
||||
char **err);
|
||||
|
||||
int do_change_link_password(unsigned long long linkid, const char *password,
|
||||
char **err);
|
||||
|
||||
int do_change_link_enable_upload(unsigned long long linkid,
|
||||
int enableuploadforeveryone,
|
||||
int enableuploadforchosenusers, char **err);
|
||||
int do_psync_change_link(unsigned long long linkid, unsigned long long expire, int delete_expire, const char *linkpassword, int delete_password, unsigned long long maxtraffic, unsigned long long maxdownloads, int enableuploadforeveryone, int enableuploadforchosenusers, int disableupload, char **err);
|
||||
int do_change_link_expire(unsigned long long linkid, unsigned long long expire, char **err);
|
||||
int do_change_link_password(unsigned long long linkid, const char *password, char **err);
|
||||
int do_change_link_enable_upload(unsigned long long linkid, int enableuploadforeveryone, int enableuploadforchosenusers, char **err);
|
||||
|
||||
plink_contents_t *do_show_link(const char *code, char **err /*OUT*/);
|
||||
|
||||
void cache_links_all();
|
||||
int cache_upload_links(char **err /*OUT*/);
|
||||
int cache_links(char *err, size_t err_size /*OUT*/);
|
||||
|
||||
int do_delete_all_folder_links(psync_folderid_t folderid, char **err);
|
||||
int do_delete_all_file_links(psync_fileid_t fileid, char **err);
|
||||
|
||||
int do_psync_change_link(unsigned long long linkid, unsigned long long expire,
|
||||
int delete_expire, const char *linkpassword,
|
||||
int delete_password, unsigned long long maxtraffic,
|
||||
unsigned long long maxdownloads,
|
||||
int enableuploadforeveryone,
|
||||
int enableuploadforchosenusers, int disableupload,
|
||||
char **err);
|
||||
preciever_list_t *do_list_email_with_access(unsigned long long linkid,
|
||||
char **err);
|
||||
int do_psync_change_link(unsigned long long linkid, unsigned long long expire, int delete_expire, const char *linkpassword, int delete_password, unsigned long long maxtraffic, unsigned long long maxdownloads, int enableuploadforeveryone, int enableuploadforchosenusers, int disableupload, char **err);
|
||||
preciever_list_t *do_list_email_with_access(unsigned long long linkid, char **err);
|
||||
int do_link_add_access(unsigned long long linkid, const char *mail, char **err);
|
||||
int do_link_remove_access(unsigned long long linkid,
|
||||
unsigned long long receiverid, char **err);
|
||||
int do_link_remove_access(unsigned long long linkid, unsigned long long receiverid, char **err);
|
||||
bookmarks_list_t *do_cache_bookmarks(char **err);
|
||||
int do_remove_bookmark(const char *code, int locationid, char **err);
|
||||
int do_change_bookmark(const char *code, int locationid, const char *name,
|
||||
const char *description, char **err);
|
||||
int do_change_bookmark(const char *code, int locationid, const char *name, const char *description, char **err);
|
||||
#endif //_PUBLIC_LINKS_H
|
||||
|
|
|
|||
Loading…
Reference in New Issue