File: authmysql.h

package info (click to toggle)
courier-authlib 0.72.6-3
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 17,844 kB
  • sloc: ansic: 25,772; cpp: 12,475; sh: 5,588; makefile: 938; perl: 761
file content (49 lines) | stat: -rw-r--r-- 1,022 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#ifndef	authmysql_h
#define	authmysql_h

#include	"courier_auth_config.h"
#include	<stdlib.h>
#include	<sys/types.h>
#include	<mysql.h>
#include	<errmsg.h>

#include        <string>

class authmysqluserinfo {
 public:
	std::string username;
	std::string fullname;
	std::string cryptpw;
	std::string clearpw;
	std::string home;
	std::string maildir;
	std::string quota;
	std::string options;
	uid_t uid;
	gid_t gid;
};

bool auth_mysql_getuserinfo(const char *username,
			    const char *service,
			    authmysqluserinfo &uiret);

extern void auth_mysql_cleanup();

extern bool auth_mysql_setpass(const char *, const char *, const char *);

struct authinfo;

extern int auth_mysql_pre(const char *, const char *,
                int (*)(struct authinfo *, void *), void *arg);

extern void auth_mysql_enumerate( void(*cb_func)(const char *name,
						 uid_t uid,
						 gid_t gid,
						 const char *homedir,
						 const char *maildir,
						 const char *options,
						 void *void_arg),
				  void *void_arg);


#endif