1 // This file is part of BOINC.
2 // http://boinc.berkeley.edu
3 // Copyright (C) 2008 University of California
4 //
5 // BOINC is free software; you can redistribute it and/or modify it
6 // under the terms of the GNU Lesser General Public License
7 // as published by the Free Software Foundation,
8 // either version 3 of the License, or (at your option) any later version.
9 //
10 // BOINC is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 // See the GNU Lesser General Public License for more details.
14 //
15 // You should have received a copy of the GNU Lesser General Public License
16 // along with BOINC.  If not, see <http://www.gnu.org/licenses/>.
17 
18 #ifndef BOINC_FILE_NAMES_H
19 #define BOINC_FILE_NAMES_H
20 
21 #include "client_types.h"
22 #include "common_defs.h"
23 #include "prefs.h"
24 
25 extern int make_soft_link(PROJECT* project, char* link_path, char* rel_file_path);
26 
27 // get the pathname (relative to client home dir) of a project file
28 //
29 extern void get_pathname(FILE_INFO* fip, char* path, int len);
30 
31 // get the pathname (relative to client home dir) of the
32 // directory used for a particular application "slot"
33 //
34 extern void get_slot_dir(int slot, char* path, int len);
35 
36 extern int make_project_dir(PROJECT&);
37 extern int remove_project_dir(PROJECT&);
38 extern int make_slot_dir(int);
39 extern void delete_old_slot_dirs();
40 extern void get_account_filename(char* master_url, char* path, int len);
41 extern bool is_account_file(const char*);
42 extern bool is_statistics_file(const char*);
43 extern void get_statistics_filename(char* master_url, char* path, int len);
44 extern bool is_image_file(const char*);
45 
46 extern void get_sched_request_filename(PROJECT&, char*, int len);
47 extern void get_sched_reply_filename(PROJECT&, char*, int len);
48 extern void get_master_filename(PROJECT&, char*, int len);
49 extern void job_log_filename(PROJECT&, char*, int);
50 extern void boinc_version_dir(PROJECT&, VERSION_INFO&, char*);
51 extern bool is_version_dir(char*, VERSION_INFO&);
52 extern void send_log_after(const char* filename, double t, MIOFILE& mf);
53 
54 #define ACCT_MGR_LOGIN_FILENAME     "acct_mgr_login.xml"
55 #define ACCT_MGR_REPLY_FILENAME     "acct_mgr_reply.xml"
56 #define ACCT_MGR_REQUEST_FILENAME   "acct_mgr_request.xml"
57 #define ACCT_MGR_URL_FILENAME       "acct_mgr_url.xml"
58 #define ALL_PROJECTS_LIST_FILENAME "all_projects_list.xml"
59 #define ALL_PROJECTS_LIST_FILENAME_TEMP "all_projects_list_temp.xml"
60 #define APP_CONFIG_FILE_NAME        "app_config.xml"
61 #define APP_INFO_FILE_NAME          "app_info.xml"
62 #define CA_BUNDLE_FILENAME          "ca-bundle.crt"
63 #define CERTIFICATE_DIRECTORY       "certificates"
64 #define CLIENT_AUTH_FILENAME        "client_auth.xml"
65 #define CLIENT_BRAND_FILENAME       "client_brand.txt"
66 #define CLIENT_OPAQUE_FILENAME      "client_opaque.txt"
67 #define CONFIG_FILE                 "cc_config.xml"
68 #define COPROC_INFO_FILENAME        "coproc_info.xml"
69 #define CPU_BENCHMARKS_FILE_NAME    "cpu_benchmarks"
70 #define CREATE_ACCOUNT_FILENAME     "create_account.xml"
71 #define DAILY_XFER_HISTORY_FILENAME "daily_xfer_history.xml"
72 #define GET_CURRENT_VERSION_FILENAME    "get_current_version.xml"
73 #define GET_PROJECT_CONFIG_FILENAME "get_project_config.xml"
74 #define GLOBAL_PREFS_FILE_NAME      "global_prefs.xml"
75 #define GLOBAL_PREFS_OVERRIDE_FILE  "global_prefs_override.xml"
76 #define JOB_LOG_BASE                "job_log_"
77 #define LOOKUP_ACCOUNT_FILENAME     "lookup_account.xml"
78 #define LOOKUP_WEBSITE_FILENAME     "lookup_website.html"
79 #define MASTER_BASE                 "master_"
80 #define NOTICES_DIR                 "notices"
81 #define PROJECTS_DIR                "projects"
82 #define REMOTEHOST_FILE_NAME        "remote_hosts.cfg"
83 #define SCHED_OP_REPLY_BASE         "sched_reply_"
84 #define SCHED_OP_REQUEST_BASE       "sched_request_"
85 #define SETPROJECTGRP_FILE_NAME     "setprojectgrp"
86 #define SLOTS_DIR                   "slots"
87 #define STATE_FILE_NEXT             "client_state_next.xml"
88 #define STATE_FILE_NAME             "client_state.xml"
89 #define STATE_FILE_PREV             "client_state_prev.xml"
90 #define STDERR_FILE_NAME            "stderr.txt"
91 #define STDOUT_FILE_NAME            "stdout.txt"
92 #define SWITCHER_DIR                "switcher"
93 #define SWITCHER_FILE_NAME          "switcher"
94 #define TASK_STATE_FILENAME         "boinc_task_state.xml"
95 #define TEMP_ACCT_FILE_NAME         "temp_acct.xml"
96 #define TEMP_FILE_NAME              "temp.xml"
97 #define TEMP_STATS_FILE_NAME        "temp_stats.xml"
98 #define TEMP_TIME_STATS_FILE_NAME   "temp_time_stats.xml"
99 #define TIME_STATS_LOG              "time_stats_log"
100 
101 #endif
102