introduce credentials API
[git/git.git] / credential.h
CommitLineData
abca927d
JK
1#ifndef CREDENTIAL_H
2#define CREDENTIAL_H
3
4#include "string-list.h"
5
6struct credential {
7 struct string_list helpers;
8 unsigned approved:1;
9
10 char *username;
11 char *password;
12 char *protocol;
13 char *host;
14 char *path;
15};
16
17#define CREDENTIAL_INIT { STRING_LIST_INIT_DUP }
18
19void credential_init(struct credential *);
20void credential_clear(struct credential *);
21
22void credential_fill(struct credential *);
23void credential_approve(struct credential *);
24void credential_reject(struct credential *);
25
26int credential_read(struct credential *, FILE *);
27
28#endif /* CREDENTIAL_H */