FOSSology  4.4.0
Open Source License Compliance by Open Source Software
delagent.c File Reference

Delagent to delete uploaded packages. More...

#include "delagent.h"
Include dependency graph for delagent.c:

Go to the source code of this file.

Functions

void usage (char *Name)
 
void writeMessageAfterDelete (char *kind, long id, char *userName, int returnedCode)
 Write message to user after success/failure. More...
 
int main (int argc, char *argv[])
 main function for the delagent More...
 

Variables

char BuildVersion [] ="delagent build version: NULL.\n"
 

Detailed Description

Delagent to delete uploaded packages.

delagent: Remove an upload from the DB and repository

Definition in file delagent.c.

Function Documentation

◆ main()

int main ( int  argc,
char *  argv[] 
)

main function for the delagent

There are 2 ways to use the delagent agent:

  1. Command Line :: delete/list upload/folder/license from the command line
  2. Agent Based :: run from the scheduler

+-----------------------+
| Command Line Analysis |
+-----------------------+
List or delete uploads.

  • -h :: help (print this message), then exit.
  • -i :: Initialize the DB
  • -u :: List uploads IDs.
  • -U # :: Delete upload ID.
  • -f :: List folder IDs.
  • -F # :: Delete folder ID and all uploads under this folder.
  • -T :: TEST – do not update the DB or delete any files (just pretend).
  • -v :: Verbose (-vv for more verbose).
  • -V :: print the version info, then exit.
  • -c SYSCONFDIR :: Specify the directory for the system configuration.
  • –user # :: user name
  • –password # :: password

+----------------------+
| Agent Based Analysis |
+----------------------+

To run the delagent as an agent

  • -s :: Run from the scheduler
Parameters
argcthe number of command line arguments
argvthe command line arguments
Returns
0 on a successful program execution

Definition at line 151 of file delagent.c.

◆ writeMessageAfterDelete()

void writeMessageAfterDelete ( char *  kind,
long  id,
char *  userName,
int  returnedCode 
)

Write message to user after success/failure.

Parameters
kindUpload/Folder
idUpload/Folder id
userNameUser created the request
returnedCodeCode returned by agent

Definition at line 98 of file delagent.c.