Code

credential: apply helper config
[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,
9                  configured:1;
11         char *username;
12         char *password;
13         char *protocol;
14         char *host;
15         char *path;
16 };
18 #define CREDENTIAL_INIT { STRING_LIST_INIT_DUP }
20 void credential_init(struct credential *);
21 void credential_clear(struct credential *);
23 void credential_fill(struct credential *);
24 void credential_approve(struct credential *);
25 void credential_reject(struct credential *);
27 int credential_read(struct credential *, FILE *);
28 void credential_from_url(struct credential *, const char *url);
29 int credential_match(const struct credential *have,
30                      const struct credential *want);
32 #endif /* CREDENTIAL_H */