2003-07-01 20:37:09 +00:00
|
|
|
// The contents of this file are subject to the BOINC Public License
|
2002-04-30 22:22:54 +00:00
|
|
|
// Version 1.0 (the "License"); you may not use this file except in
|
|
|
|
// compliance with the License. You may obtain a copy of the License at
|
2003-07-01 20:37:09 +00:00
|
|
|
// http://boinc.berkeley.edu/license_1.0.txt
|
2003-08-15 22:39:56 +00:00
|
|
|
//
|
2002-04-30 22:22:54 +00:00
|
|
|
// Software distributed under the License is distributed on an "AS IS"
|
|
|
|
// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
|
|
|
// License for the specific language governing rights and limitations
|
2003-08-15 22:39:56 +00:00
|
|
|
// under the License.
|
|
|
|
//
|
|
|
|
// The Original Code is the Berkeley Open Infrastructure for Network Computing.
|
|
|
|
//
|
2002-04-30 22:22:54 +00:00
|
|
|
// The Initial Developer of the Original Code is the SETI@home project.
|
|
|
|
// Portions created by the SETI@home project are Copyright (C) 2002
|
2003-08-15 22:39:56 +00:00
|
|
|
// University of California at Berkeley. All Rights Reserved.
|
|
|
|
//
|
2002-04-30 22:22:54 +00:00
|
|
|
// Contributor(s):
|
|
|
|
//
|
|
|
|
|
|
|
|
#ifndef _SERVER_TYPES_
|
|
|
|
#define _SERVER_TYPES_
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <vector>
|
|
|
|
|
2003-04-07 19:06:00 +00:00
|
|
|
#include "boinc_db.h"
|
2003-06-11 18:38:08 +00:00
|
|
|
#include "result_state.h"
|
2002-12-09 23:06:17 +00:00
|
|
|
|
2002-04-30 22:22:54 +00:00
|
|
|
struct SCHEDULER_REQUEST {
|
|
|
|
char authenticator[256];
|
|
|
|
char platform_name[256];
|
|
|
|
int hostid; // zero if first RPC
|
2002-12-02 04:29:40 +00:00
|
|
|
int core_client_major_version;
|
|
|
|
int core_client_minor_version;
|
2002-04-30 22:22:54 +00:00
|
|
|
int rpc_seqno;
|
|
|
|
int work_req_seconds;
|
2003-04-03 18:35:40 +00:00
|
|
|
char global_prefs_xml[MAX_BLOB_SIZE];
|
2003-06-18 20:52:17 +00:00
|
|
|
char projects_xml[MAX_BLOB_SIZE];
|
2003-04-03 18:35:40 +00:00
|
|
|
char code_sign_key[MAX_BLOB_SIZE];
|
2002-04-30 22:22:54 +00:00
|
|
|
|
|
|
|
HOST host;
|
|
|
|
vector<RESULT> results;
|
|
|
|
|
|
|
|
SCHEDULER_REQUEST();
|
|
|
|
~SCHEDULER_REQUEST();
|
|
|
|
int parse(FILE*);
|
|
|
|
};
|
|
|
|
|
2002-09-22 23:27:14 +00:00
|
|
|
// NOTE: if any field requires initialization,
|
|
|
|
// you must do it in the constructor. Nothing is zeroed by default.
|
|
|
|
//
|
2002-04-30 22:22:54 +00:00
|
|
|
struct SCHEDULER_REPLY {
|
|
|
|
int request_delay; // don't request again until this time elapses
|
2002-05-17 22:33:57 +00:00
|
|
|
char message[1024];
|
|
|
|
char message_priority[256];
|
2002-04-30 22:22:54 +00:00
|
|
|
int hostid; // send this only if nonzero.
|
|
|
|
// this tells client to reset rpc_seqno
|
2002-09-27 20:36:03 +00:00
|
|
|
bool send_global_prefs; // whether to send global preferences
|
2002-12-02 04:29:40 +00:00
|
|
|
bool nucleus_only; // send only message
|
2003-08-15 22:39:56 +00:00
|
|
|
bool probable_user_browser;
|
2002-05-29 23:25:21 +00:00
|
|
|
USER user;
|
2002-08-26 22:57:17 +00:00
|
|
|
HOST host;
|
2003-02-24 21:31:36 +00:00
|
|
|
TEAM team;
|
2002-04-30 22:22:54 +00:00
|
|
|
vector<APP> apps;
|
|
|
|
vector<APP_VERSION> app_versions;
|
|
|
|
vector<WORKUNIT>wus;
|
|
|
|
vector<RESULT>results;
|
|
|
|
vector<RESULT>result_acks;
|
2003-04-03 18:35:40 +00:00
|
|
|
char code_sign_key[MAX_BLOB_SIZE];
|
|
|
|
char code_sign_key_signature[MAX_BLOB_SIZE];
|
2002-04-30 22:22:54 +00:00
|
|
|
|
|
|
|
SCHEDULER_REPLY();
|
|
|
|
~SCHEDULER_REPLY();
|
|
|
|
int write(FILE*);
|
|
|
|
void insert_app_unique(APP&);
|
|
|
|
void insert_app_version_unique(APP_VERSION&);
|
|
|
|
void insert_workunit_unique(WORKUNIT&);
|
|
|
|
void insert_result(RESULT&);
|
|
|
|
};
|
|
|
|
|
2003-05-20 00:03:39 +00:00
|
|
|
// represents an <app_file> element in user's project prefs
|
|
|
|
//
|
|
|
|
struct APP_FILE {
|
|
|
|
char url[256];
|
|
|
|
char open_name[256];
|
2003-06-11 23:36:41 +00:00
|
|
|
int timestamp;
|
2003-05-20 00:03:39 +00:00
|
|
|
int parse(char*&);
|
|
|
|
};
|
|
|
|
|
2002-04-30 22:22:54 +00:00
|
|
|
#endif
|