Code

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