/*
Copyright 2009 Nathan Phillip Brink, Ethan Zonca, Matthew Orlando
This file is a part of DistRen.
DistRen is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
DistRen is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with DistRen. If not, see .
*/
#ifndef MYSQL_H_
#define MYSQL_H_
#include
struct distrend_mysql_conn;
struct distrend_mysql_result;
typedef struct distrend_mysql_conn *distrend_mysql_conn_t;
typedef struct distrend_mysql_result *distrend_mysql_result_t;
/**
initiates a MySQL connection
@param conn, pointer will be set to the struct
@return 0 on success
*/
int mysqlConnect(distrend_mysql_conn_t *conn);
/**
cleans and disconnects MySQL connection
@param conn connection to clean
@return 0 on success
*/
int mysqlDisconnect(distrend_mysql_conn_t conn);
/**
Mark a frame as finished in the database.
*/
void finish_frame(distrend_mysql_conn_t conn, int32_t jobkey, int32_t framenum);
/** Import */
void finish_frame(int slaveKey, int jobKey, int frameNum, distrend_mysql_con_t conn);
int change_job_priority(int jobKey, int newPriority, distrend_mysql_con_t conn);
int find_jobframe(int slaveKey, int *jobKey, int *frameNum, distrend_mysql_con_t conn);
#endif /* MYSQL_H_ */