]>
Commit | Line | Data |
---|---|---|
abca927d JK |
1 | #ifndef CREDENTIAL_H |
2 | #define CREDENTIAL_H | |
3 | ||
4 | #include "string-list.h" | |
5 | ||
6 | struct credential { | |
7 | struct string_list helpers; | |
11825072 | 8 | unsigned approved:1, |
a78fbb4f | 9 | configured:1, |
59b38652 | 10 | quit:1, |
a78fbb4f | 11 | use_http_path:1; |
abca927d JK |
12 | |
13 | char *username; | |
14 | char *password; | |
15 | char *protocol; | |
16 | char *host; | |
17 | char *path; | |
18 | }; | |
19 | ||
20 | #define CREDENTIAL_INIT { STRING_LIST_INIT_DUP } | |
21 | ||
22 | void credential_init(struct credential *); | |
23 | void credential_clear(struct credential *); | |
24 | ||
25 | void credential_fill(struct credential *); | |
26 | void credential_approve(struct credential *); | |
27 | void credential_reject(struct credential *); | |
28 | ||
29 | int credential_read(struct credential *, FILE *); | |
2d6dc182 | 30 | void credential_write(const struct credential *, FILE *); |
d3e847c1 | 31 | void credential_from_url(struct credential *, const char *url); |
11825072 JK |
32 | int credential_match(const struct credential *have, |
33 | const struct credential *want); | |
abca927d JK |
34 | |
35 | #endif /* CREDENTIAL_H */ |