/* 
   authentication client for podfuk-smb

   Copyright (C) Tim Potter 2000
   
   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 2 of the License, or
   (at your option) any later version.
   
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.
   
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/

#ifndef PODFUK_SMB_AUTH_CLI_H
#define PODFUK_SMB_AUTH_CLI_H

/* The format of an authentication token */

#define PSTRING_LEN 1024
#define FSTRING_LEN 128

typedef char pstring[PSTRING_LEN];
typedef char fstring[FSTRING_LEN];

struct auth_token {
	uid_t uid;
	fstring sharename;
	fstring workgroup;
	fstring username;
	fstring password;
};

/* Authentication client function prototypes */

int add_token(char *sharename, char *username, char *workgroup, 
              char *password);
int remove_token(char *sharename);
int clear_tokens(int clear_all);
int list_tokens(int list_all, struct auth_token **tokens, int *num_tokens);
int fetch_token(uid_t uid, char *servername, char *sharename, 
                struct auth_token *token);

#endif /* PODFUK_SMB_AUTH_CLI_H */
