Repository navigation
Expand file tree
/
Copy pathacct_setup.h
More file actions
114 lines (98 loc) · 3.04 KB
/
Copy pathacct_setup.h
File metadata and controls
114 lines (98 loc) · 3.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
// This file is part of BOINC.
// http://boinc.berkeley.edu
// Copyright (C) 2008 University of California
//
// BOINC is free software; you can redistribute it and/or modify it
// under the terms of the GNU Lesser General Public License
// as published by the Free Software Foundation,
// either version 3 of the License, or (at your option) any later version.
//
// BOINC 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 Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.
#ifndef BOINC_ACCT_SETUP_H
#define BOINC_ACCT_SETUP_H
#include "error_numbers.h"
#include "project_list.h"
#include "gui_http.h"
struct ACCOUNT_IN {
std::string url;
std::string email_addr;
// the account identifier (user name or email addr)
std::string user_name;
// the suggested friendly name for the user during account creation.
std::string team_name;
std::string passwd_hash;
std::string server_cookie;
bool ldap_auth;
bool server_assigned_cookie;
bool consented_to_terms;
void parse(XML_PARSER&);
};
struct GET_PROJECT_CONFIG_OP: public GUI_HTTP_OP {
std::string reply;
int error_num;
GET_PROJECT_CONFIG_OP(GUI_HTTP* p){
error_num = BOINC_SUCCESS;
gui_http = p;
}
virtual ~GET_PROJECT_CONFIG_OP(){}
int do_rpc(std::string url);
virtual void handle_reply(int http_op_retval);
};
struct LOOKUP_ACCOUNT_OP: public GUI_HTTP_OP {
std::string reply;
int error_num;
LOOKUP_ACCOUNT_OP(GUI_HTTP* p){
error_num = BOINC_SUCCESS;
gui_http = p;
}
virtual ~LOOKUP_ACCOUNT_OP(){}
int do_rpc(ACCOUNT_IN&);
virtual void handle_reply(int http_op_retval);
};
struct CREATE_ACCOUNT_OP: public GUI_HTTP_OP {
std::string reply;
int error_num;
CREATE_ACCOUNT_OP(GUI_HTTP* p){
error_num = BOINC_SUCCESS;
gui_http = p;
}
virtual ~CREATE_ACCOUNT_OP(){}
int do_rpc(ACCOUNT_IN&, std::string rpc_client_name);
virtual void handle_reply(int http_op_retval);
};
struct GET_PROJECT_LIST_OP: public GUI_HTTP_OP {
int error_num;
GET_PROJECT_LIST_OP(GUI_HTTP* p){
error_num = BOINC_SUCCESS;
gui_http = p;
}
virtual ~GET_PROJECT_LIST_OP(){}
int do_rpc();
virtual void handle_reply(int http_op_retval);
};
struct LOOKUP_LOGIN_TOKEN_OP: public GUI_HTTP_OP {
int error_num;
PROJECT_LIST_ITEM* pli;
LOOKUP_LOGIN_TOKEN_OP(GUI_HTTP* p){
error_num = BOINC_SUCCESS;
gui_http = p;
}
virtual ~LOOKUP_LOGIN_TOKEN_OP(){}
int do_rpc(PROJECT_LIST_ITEM*, int user_id, const char* login_token);
virtual void handle_reply(int http_op_retval);
};
struct PROJECT_ATTACH {
int error_num;
std::vector<std::string> messages;
PROJECT_ATTACH() {
error_num = 0;
messages.clear();
}
};
#endif