- Condor interface: small code shuffle

This commit is contained in:
David Anderson 2013-02-01 22:50:50 -08:00 committed by Oliver Bock
parent b0706d702f
commit 3977ad8845
4 changed files with 59 additions and 8 deletions

View File

@ -1,10 +1,11 @@
all: boinc_gahp
boinc_gahp: boinc_gahp.cpp boinc_gahp.h curl.cpp curl.h
boinc_gahp: boinc_gahp.cpp job_rpc.cpp job_rpc.h
g++ -g -O0 -I../../lib \
-o boinc_gahp boinc_gahp.cpp curl.cpp \
-o boinc_gahp boinc_gahp.cpp job_rpc.cpp \
-L../../lib -lboinc -lpthread -lcurl
test: test.cpp curl.cpp
test: test.cpp job_rpc.cpp
g++ -g -o test -I../../lib \
test.cpp curl.cpp -lcurl
test.cpp job_rpc.cpp \
-L../../lib -lboinc -lcurl

View File

@ -33,7 +33,7 @@
#include "md5_file.h"
#include "parse.h"
#include "curl.h"
#include "job_rpc.h"
using std::map;
using std::pair;

View File

@ -23,7 +23,7 @@
#include "parse.h"
#include "curl.h"
#include "job_rpc.h"
using std::vector;
using std::string;

View File

@ -15,13 +15,14 @@
// You should have received a copy of the GNU Lesser General Public License
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.
#include <map>
#include <stdio.h>
#include <string>
#include <vector>
#include <map>
using std::map;
using std::string;
using std::vector;
using std::map;
struct INFILE {
char src_path[256];
@ -65,3 +66,52 @@ struct FETCH_OUTPUT_REQ {
char dir[256];
vector<string> file_names;
};
//////////////////////////
extern int query_files(
const char* project_url,
const char* authenticator,
int batch_id,
vector<string> &md5s,
vector<string> &paths,
vector<int> &absent_files
);
extern int upload_files (
const char* project_url,
const char* authenticator,
int batch_id,
vector<string> &md5s,
vector<string> &paths
);
extern int create_batch(
const char* project_url,
const char* authenticator,
const char* batch_name,
const char* app_name,
int &batch_id
);
extern int submit_jobs(
const char* project_url,
const char* authenticator,
SUBMIT_REQ &req
);
extern int query_batch(
const char* project_url,
const char* authenticator,
int batch_id,
QUERY_BATCH_REPLY& reply
);
extern int get_output_file(
const char* project_url,
const char* authenticator,
const char* job_name,
int file_num,
const char* dst_path
);