* Removed some temporary diagnostics that had been left in serv_sieve.c
[citadel.git] / citadel / user_ops.h
blob8513c84a7d0e2ff2c3eb09acebc7abb308befb10
1 /* $Id$ */
2 int hash (char *str);
3 int getuser (struct ctdluser *, char *);
4 int lgetuser (struct ctdluser *, char *);
5 void putuser (struct ctdluser *);
6 void lputuser (struct ctdluser *);
7 int is_aide (void);
8 int is_room_aide (void);
9 int getuserbynumber (struct ctdluser *usbuf, long int number);
10 void rebuild_usersbynumber(void);
11 void cmd_user (char *cmdbuf);
12 void session_startup (void);
13 void logged_in_response(void);
14 void logout (void);
15 void cmd_pass (char *buf);
16 int purge_user (char *pname);
17 int create_user (char *newusername, int become_user);
18 void do_login(void);
19 void cmd_newu (char *cmdbuf);
20 void cmd_creu (char *cmdbuf);
21 void cmd_setp (char *new_pw);
22 void cmd_getu (void);
23 void cmd_setu (char *new_parms);
24 void cmd_slrp (char *new_ptr);
25 int CtdlInvtKick(char *iuser, int op);
26 void cmd_invt_kick (char *iuser, int op);
27 void cmd_forg (void);
28 void cmd_gnur (void);
29 void cmd_vali (char *v_args);
30 void ForEachUser(void (*CallBack)(struct ctdluser *EachUser, void *out_data),
31 void *in_data);
32 void ListThisUser(struct ctdluser *usbuf, void *data);
33 void cmd_list (char *);
34 void cmd_chek (void);
35 void cmd_qusr (char *who);
36 void cmd_agup (char *cmdbuf);
37 void cmd_asup (char *cmdbuf);
38 void cmd_view (char *cmdbuf);
39 void cmd_renu (char *cmdbuf);
40 int NewMailCount(void);
41 int InitialMailCheck(void);
42 void put_visit(struct visit *newvisit);
43 void CtdlGetRelationship(struct visit *vbuf,
44 struct ctdluser *rel_user,
45 struct ctdlroom *rel_room);
46 void CtdlSetRelationship(struct visit *newvisit,
47 struct ctdluser *rel_user,
48 struct ctdlroom *rel_room);
49 void MailboxName(char *buf, size_t n, const struct ctdluser *who,
50 const char *prefix);
51 int GenerateRelationshipIndex( char *IndexBuf,
52 long RoomID,
53 long RoomGen,
54 long UserID);
55 int CtdlAssociateSystemUser(char *screenname, char *loginname);
56 int CtdlLoginExistingUser(char *authname, char *username);
59 * Values which may be returned by CtdlLoginExistingUser()
61 enum {
62 pass_ok,
63 pass_already_logged_in,
64 pass_no_user,
65 pass_internal_error,
66 pass_wrong_password
72 int CtdlTryPassword(char *password);
73 void CtdlSetPassword(char *new_pw);
76 * Values which may be returned by CtdlTryPassword()
78 enum {
79 login_ok,
80 login_already_logged_in,
81 login_too_many_users,
82 login_not_found
86 int CtdlForgetThisRoom(void);
87 void cmd_seen(char *argbuf);
88 void cmd_gtsn(char *argbuf);
89 void BumpNewMailCounter(long);
90 void start_chkpwd_daemon(void);
93 #define RENAMEUSER_OK 0 /* Operation succeeded */
94 #define RENAMEUSER_LOGGED_IN 1 /* Cannot rename a user who is currently logged in */
95 #define RENAMEUSER_NOT_FOUND 2 /* The old user name does not exist */
96 #define RENAMEUSER_ALREADY_EXISTS 3 /* An account with the desired new name already exists */
98 int rename_user(char *oldname, char *newname);
99 INLINE void makeuserkey(char *key, char *username);
100 int internal_create_user (char *username, struct ctdluser *usbuf, uid_t uid);