Back to index

avfs  1.0.1
passwords.h
Go to the documentation of this file.
00001 /*
00002     AVFS: A Virtual File System Library
00003     Copyright (C) 2000-2001  Miklos Szeredi <miklos@szeredi.hu>
00004 
00005     This program can be distributed under the terms of the GNU GPL.
00006     See the file COPYING.
00007 */
00008 
00009 #ifndef INCLUDED_PASSWORDS_H
00010 #define INCLUDED_PASSWORDS_H 1
00011 
00012 #include "avfs.h"
00013 #include "state.h"
00014 
00015 #define USER_SEP_STR  "@"
00016 #define USER_SEP_CHAR (USER_SEP_STR[0])
00017 
00026 struct pass_session {
00027     char *account;
00028     char *username;
00029     char *password;
00030     struct pass_session *next;
00031     struct pass_session *prev;
00032 };
00033 
00034 /* these two are only needed for HTTP (see comment above) */
00035 extern int pass_username_get(struct entry *ent, const char *param, char **resp);
00036 
00037 extern int pass_username_set(struct entry *ent, const char *param, const char *val);
00038 
00039 extern int pass_password_get(struct entry *ent, const char *param, char **resp);
00040 
00041 extern int pass_password_set(struct entry *ent, const char *param, const char *val);
00042 
00043 extern int pass_loggedin_get(struct entry *ent, const char *param, char **resp);
00044 
00045 extern int pass_loggedin_set(struct entry *ent, const char *param, const char *val);
00046 
00047 struct pass_session *pass_get_password(struct pass_session *passd,
00048                      const char *host, const char *user);
00049 
00050 void pass_remove_session(struct pass_session *fts);
00051 
00052 #endif /* INCLUDED_PASSWORDS_H */