* Renamed "struct user" to "struct ctdluser"
[citadel.git] / citadel / room_ops.h
1 /* $Id$ */
2 int is_known (struct ctdlroom *roombuf, int roomnum,
3               struct ctdluser *userbuf);
4 int has_newmsgs (struct ctdlroom *roombuf, int roomnum,
5                  struct ctdluser *userbuf);
6 int is_zapped (struct ctdlroom *roombuf, int roomnum,
7                struct ctdluser *userbuf);
8 int getroom(struct ctdlroom *qrbuf, char *room_name);
9 void b_putroom(struct ctdlroom *qrbuf, char *room_name);
10 void putroom(struct ctdlroom *);
11 void b_deleteroom(char *);
12 int lgetroom(struct ctdlroom *qrbuf, char *room_name);
13 void lputroom(struct ctdlroom *qrbuf);
14 void getfloor (struct floor *flbuf, int floor_num);
15 struct floor *cgetfloor(int floor_num);
16 void lgetfloor (struct floor *flbuf, int floor_num);
17 void putfloor (struct floor *flbuf, int floor_num);
18 void lputfloor (struct floor *flbuf, int floor_num);
19 int sort_msglist (long int *listptrs, int oldcount);
20 void cmd_lrms (char *argbuf);
21 void cmd_lkra (char *argbuf);
22 void cmd_lkrn (char *argbuf);
23 void cmd_lkro (char *argbuf);
24 void cmd_lzrm (char *argbuf);
25 void cmd_lprm (char *argbuf);
26 void usergoto (char *where, int display_result, int transiently,
27                         int *msgs, int *new);
28 void cmd_goto (char *gargs);
29 void cmd_whok (void);
30 void cmd_rdir (void);
31 void cmd_getr (void);
32 void cmd_setr (char *args);
33 void cmd_geta (void);
34 void cmd_seta (char *new_ra);
35 void cmd_rinf (void);
36 void cmd_kill (char *argbuf);
37 unsigned create_room(char *new_room_name,
38                         int new_room_type,
39                         char *new_room_pass,
40                         int new_room_floor,
41                         int really_create,
42                         int avoid_access);
43 void cmd_cre8 (char *args);
44 void cmd_einf (char *ok);
45 void cmd_lflr (void);
46 void cmd_cflr (char *argbuf);
47 void cmd_kflr (char *argbuf);
48 void cmd_eflr (char *argbuf);
49 void ForEachRoom(void (*CallBack)(struct ctdlroom *EachRoom, void *out_data),
50         void *in_data);
51 void assoc_file_name(char *buf, size_t n,
52                      struct ctdlroom *qrbuf, const char *prefix);
53 void delete_room(struct ctdlroom *qrbuf);
54 void list_roomname(struct ctdlroom *qrbuf, int ra);
55 int is_noneditable(struct ctdlroom *qrbuf);
56 int CtdlRoomAccess(struct ctdlroom *roombuf, struct ctdluser *userbuf);
57 int CtdlDoIHavePermissionToDeleteThisRoom(struct ctdlroom *qr);
58
59 int CtdlRenameRoom(char *old_name, char *new_name, int new_floor);
60 /*
61  * Possible return values for CtdlRenameRoom()
62  */
63 enum {
64         crr_ok,                         /* success */
65         crr_room_not_found,             /* room not found */
66         crr_already_exists,             /* new name already exists */
67         crr_noneditable,                /* cannot edit this room */
68         crr_invalid_floor,              /* target floor does not exist */
69         crr_access_denied               /* not allowed to edit this room */
70 };