2002-04-30 22:22:54 +00:00
|
|
|
// The contents of this file are subject to the Mozilla Public License
|
|
|
|
// 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
|
|
|
|
// http://www.mozilla.org/MPL/
|
|
|
|
//
|
|
|
|
// 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
|
|
|
|
// under the License.
|
|
|
|
//
|
|
|
|
// The Original Code is the Berkeley Open Infrastructure for Network Computing.
|
|
|
|
//
|
|
|
|
// The Initial Developer of the Original Code is the SETI@home project.
|
|
|
|
// Portions created by the SETI@home project are Copyright (C) 2002
|
|
|
|
// University of California at Berkeley. All Rights Reserved.
|
|
|
|
//
|
|
|
|
// Contributor(s):
|
|
|
|
//
|
|
|
|
|
|
|
|
#ifndef _PREFS_
|
|
|
|
#define _PREFS_
|
|
|
|
|
2002-06-21 06:52:47 +00:00
|
|
|
#include <vector>
|
|
|
|
#include "client_types.h"
|
|
|
|
|
2002-09-26 05:57:10 +00:00
|
|
|
// Global preferences are edited and stored on BOINC servers.
|
2002-06-01 20:26:21 +00:00
|
|
|
// The native representation of preferences is XML.
|
|
|
|
// The client maintains the preferences (in XML form)
|
|
|
|
// and mod time in the state file and in memory.
|
|
|
|
// It includes these items in each scheduler request message.
|
|
|
|
// A scheduler reply message may contain a more recent set of preferences.
|
|
|
|
//
|
|
|
|
|
2002-06-21 06:52:47 +00:00
|
|
|
// The following structure is a parsed version of the prefs file
|
|
|
|
//
|
2002-09-29 00:32:11 +00:00
|
|
|
struct GLOBAL_PREFS {
|
2003-02-21 01:38:16 +00:00
|
|
|
bool run_on_batteries;
|
|
|
|
bool run_if_user_active;
|
2002-06-01 20:26:21 +00:00
|
|
|
bool confirm_before_connecting;
|
2003-02-04 01:07:19 +00:00
|
|
|
bool run_minimized;
|
|
|
|
bool run_on_startup;
|
2003-02-06 19:01:49 +00:00
|
|
|
bool hangup_if_dialed;
|
2003-02-26 00:47:57 +00:00
|
|
|
double work_buf_max_days;
|
|
|
|
double work_buf_min_days;
|
2002-06-01 20:26:21 +00:00
|
|
|
double disk_max_used_gb;
|
|
|
|
double disk_max_used_pct;
|
|
|
|
double disk_min_free_gb;
|
2002-11-19 22:57:05 +00:00
|
|
|
double idle_time_to_run;
|
2003-02-26 00:47:57 +00:00
|
|
|
double max_bytes_sec_up;
|
|
|
|
double max_bytes_sec_down;
|
2002-04-30 22:22:54 +00:00
|
|
|
|
2002-09-29 00:32:11 +00:00
|
|
|
GLOBAL_PREFS();
|
2002-04-30 22:22:54 +00:00
|
|
|
int parse(FILE*);
|
2002-06-21 06:52:47 +00:00
|
|
|
int parse_file();
|
2002-04-30 22:22:54 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|