...
Code Block |
---|
struct pbs_db_connection { void *conn_db_handle; /* opaque database handle */ charint *conn_hoststate; /* hostDatabase connection status */ int conn_portdb_state; /* Databese states, db up? /* portdown? starting? */ } typedef struct pbs_db_connection pbs_db_conn_t; int/* Values for conn_timeout;state */ #define PBS_DB_CONNECT_STATE_NOT_CONNECTED 1 /* connection timeoutNot connected to the db */ #define PBS_DB_CONNECT_STATE_CONNECTING 2 int/* Connecting to the conn_state; db */ #define PBS_DB_CONNECT_STATE_CONNECTED 3 /* connected?Connected */to the db */ #define PBS_DB_CONNECT_STATE_FAILED int conn_db_state; 4 /* dbCoonection up?to down?db starting?failed */ /* Values for conn_db_state */ time_t conn_connect_time; #define PBS_DB_DOWN 1 /* whenDatabase wasis connectiondown initiated */ #define PBS_DB_STARTING 2 /* Database is voidstarting */ #define *connPBS_db_err; DB_STARTED 3 /* opaqueDatabase database error store */ void *conn_data; /* any other db specific data */ void *conn_extend; /* any other db specific options */ } typedef struct pbs_db_connection pbs_db_conn_t;is up */ |
pbs_db_obj_info_t: Wrapper object structure. It contains a pointer to one of the several database structures. Most of the database manipulation/query functions take this structure as a parameter. Depending on the contained structure type, an appropriate internal database manipulation/query function is eventually called. This allows keeping the interface simpler and generic.
...