60 #define MAXSQLFolder 1024 73 int authentication(
char *user,
char * password,
int *userId,
int *userPerm);
78 int check_permission_folder(
long folder_id,
int userId,
int userPerm);
79 int check_permission_license(
long license_id,
int userPerm);
84 int listFoldersRecurse(
long Parent,
int Depth,
long Row,
int DelFlag,
int userId,
int userPerm);
87 int deleteUpload(
long uploadId,
int userId,
int userPerm);
88 int deleteFolder(
long cFolder,
long pFolder,
int userId,
int userPerm);
89 int unlinkContent(
long child,
long parent,
int mode,
int userId,
int userPerm);
95 void usage(
char *Name);
int deleteFolder(long cFolder, long pFolder, int userId, int userPerm)
recursively delete a folder
PGconn * pgConn
Database connection.
int check_permission_upload(int wanted_permissions, long uploadId, int userId, int userPerm)
check if the upload can be deleted, that is the user have the permission to delete this upload ...
void doSchedulerTasks()
process the jobs from scheduler
int Verbose
Verbose level.
int check_read_permission_upload(long uploadId, int userId, int userPerm)
check if the user has read permission on the given upload
int check_write_permission_upload(long uploadId, int userId, int userPerm)
check if the user has read permission on the given upload
int deleteUpload(long uploadId, int userId, int userPerm)
Given an upload ID, delete it.
The main FOSSology C library.
FUNCTION void usage(char *name)
int unlinkContent(long child, long parent, int mode, int userId, int userPerm)
remove link between parent and (child,mode) if there are other parents
int listFoldersRecurse(long Parent, int Depth, long Row, int DelFlag, int userId, int userPerm)
Draw folder tree.
int listFolders(int userId, int userPerm)
List every folder.
void exitNow(int exitVal)
Exit function. This does all cleanup and should be used instead of calling exit() or main() return...
int authentication(char *user, char *password, int *userId, int *userPerm)
if this account is valid
int listUploads(int userId, int userPerm)
List every upload ID.