GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> FMX / V4-0-10 > fmxshr / linux-gcc
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <unistd.h>
#include "mysql.h"
#include "FMX/FMX_msgs.h"
#include "FMX/FMX_pubdefs.h"
#include "MDB/MDB_pubdefs.h"
#include "FMX_prvdefs.h"
Defines | |
#define | FMX_L_BUFFER ( 2048 ) |
Maximum length of a general purpose string buffer. | |
#define | FMX_K_PORT ( 8206 ) |
Standard port on which to contact an fmx database. | |
Functions | |
unsigned int | FMX_connect (FMX_Connection **con, const char *host, const char *user, const char *pass, int port) |
Create a connection to the database. | |
unsigned int | FMX_disconnect (FMX_Connection *ucb) |
Break a connection to the database. |
CVS $Id: FMX_user.c,v 1.2 2006/11/14 23:56:09 apw Exp $
unsigned int FMX_connect | ( | FMX_Connection ** | con, | |
const char * | host, | |||
const char * | user, | |||
const char * | pass, | |||
int | port | |||
) |
Create a connection to the database.
con | (out) Connection handle | |
host | (in) Host name (NULL: take from $FMX_C_FDB) | |
user | (in) User name (NULL: take from .my.cnf) | |
pass | (in) Password (NULL: take from .my.cnf) | |
port | (in) Connection handle |
FMX_ALLOCBUF | Local (stack) buffer too small | |
FMX_ALLOCMEM | Cannot allocate sufficient memory (dynamic) | |
FMX_EVMISS | Expected environment variable not found | |
FMX_MYSQLCON | Cannot select database status from global table | |
FMX_LINKMIST | Expected file system link not found | |
FMX_MYCNFBAD | User's .my.cnf file insufficiently protected | |
FMX_MYCNFMIS | Cannot find user's .my.cnf file | |
FMX_MYSQLINT | Cannot initialize a MySQL handle | |
FMX_MYSQLCON | Cannot connect to MySQL database | |
FMX_SUCCESS | Success | |
FMX_USERACC | Cannot determine access privileges for user | |
FMX_USERID | Cannot identify user from database tables | |
FMX_USERNOT | User has no privileges on this database |
unsigned int FMX_disconnect | ( | FMX_Connection * | ucb | ) |
Break a connection to the database.
ucb | (in) User connection block |
FMX_UCBMISS | Connection block not found in list | |
FMX_UCBNOT | Invalid connection block | |
FMX_SUCCESS | Success |