* give all commands their own function
[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 usergoto (char *where, int display_result, int transiently,
21                         int *msgs, int *new);
22 unsigned create_room(char *new_room_name,
23                         int new_room_type,
24                         char *new_room_pass,
25                         int new_room_floor,
26                         int really_create,
27                         int avoid_access,
28                         int new_room_view);
29 void ForEachRoom(void (*CallBack)(struct ctdlroom *EachRoom, void *out_data),
30         void *in_data);
31 void schedule_room_for_deletion(struct ctdlroom *qrbuf);
32 void delete_room(struct ctdlroom *qrbuf);
33 void list_roomname(struct ctdlroom *qrbuf, int ra, int current_view, int default_view);
34 int is_noneditable(struct ctdlroom *qrbuf);
35 void CtdlRoomAccess(struct ctdlroom *roombuf, struct ctdluser *userbuf,
36                 int *result, int *view);
37 int CtdlDoIHavePermissionToDeleteThisRoom(struct ctdlroom *qr);
38
39 int CtdlRenameRoom(char *old_name, char *new_name, int new_floor);
40 void convert_room_name_macros(char *towhere, size_t maxlen);
41 /*
42  * Possible return values for CtdlRenameRoom()
43  */
44 enum {
45         crr_ok,                         /* success */
46         crr_room_not_found,             /* room not found */
47         crr_already_exists,             /* new name already exists */
48         crr_noneditable,                /* cannot edit this room */
49         crr_invalid_floor,              /* target floor does not exist */
50         crr_access_denied               /* not allowed to edit this room */
51 };
52
53