FOSSology  4.4.0
Open Source License Compliance by Open Source Software
db_connect.c
Go to the documentation of this file.
1 /*
2  SPDX-FileCopyrightText: © 2012 Hewlett-Packard Development Company, L.P.
3 
4  SPDX-License-Identifier: GPL-2.0-only
5 */
6 
7 /* fossology includes */
8 #include <libfossology.h>
9 
23 int main(int argc, char** argv)
24 {
25  PGconn* db_conn;
26 
27  fo_scheduler_connect(&argc, argv, &db_conn);
29 
30  if(PQstatus(db_conn) == CONNECTION_OK)
32  else
34 
35  return 0;
36 }
37 
The main FOSSology C library.
void fo_scheduler_disconnect(int retcode)
Disconnect the scheduler connection.
char * fo_scheduler_next()
Get the next data to process from the scheduler.
void fo_scheduler_connect(int *argc, char **argv, PGconn **db_conn)
Establish a connection between an agent and the scheduler.
PGconn * db_conn
The connection to Database.
Definition: pkgagent.c:22