About: Citadel is an advanced messaging and collaboration system for groupware and BBS applications (preferred OS: Linux).
  Fossies Dox: citadel.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

No Matches
room_ops.c File Reference
#include <stdio.h>
#include <libcitadel.h>
#include "citserver.h"
#include "ctdl_module.h"
#include "config.h"
#include "control.h"
#include "user_ops.h"
#include "room_ops.h"
Include dependency graph for room_ops.c:

Go to the source code of this file.


int CtdlDoIHavePermissionToReadMessagesInThisRoom (void)
int CtdlDoIHavePermissionToPostInThisRoom (char *errmsgbuf, size_t n, PostType PostPublic, int is_reply)
int CtdlDoIHavePermissionToDeleteMessagesFromThisRoom (void)
void CtdlRoomAccess (struct ctdlroom *roombuf, struct ctdluser *userbuf, int *result, int *view)
void room_sanity_check (struct ctdlroom *qrbuf)
int CtdlGetRoom (struct ctdlroom *qrbuf, const char *room_name)
int CtdlGetRoomLock (struct ctdlroom *qrbuf, const char *room_name)
void b_putroom (struct ctdlroom *qrbuf, char *room_name)
void CtdlPutRoom (struct ctdlroom *qrbuf)
void b_deleteroom (char *room_name)
void CtdlPutRoomLock (struct ctdlroom *qrbuf)
int CtdlGetFloorByName (const char *floor_name)
int CtdlGetFloorByNameLock (const char *floor_name)
int CtdlGetAvailableFloor (void)
void CtdlGetFloor (struct floor *flbuf, int floor_num)
void lgetfloor (struct floor *flbuf, int floor_num)
struct floorCtdlGetCachedFloor (int floor_num)
void CtdlPutFloor (struct floor *flbuf, int floor_num)
void CtdlPutFloorLock (struct floor *flbuf, int floor_num)
void lputfloor (struct floor *flbuf, int floor_num)
void CtdlForEachRoom (ForEachRoomCallBack callback_func, void *in_data)
void delete_msglist (struct ctdlroom *whichroom)
int sort_msglist_cmp (const void *m1, const void *m2)
int sort_msglist (long listptrs[], int oldcount)
int CtdlIsNonEditable (struct ctdlroom *qrbuf)
void CtdlUserGoto (char *where, int display_result, int transiently, int *retmsgs, int *retnew, long *retoldest, long *retnewest)
void convert_room_name_macros (char *towhere, size_t maxlen)
int CtdlRenameRoom (char *old_name, char *new_name, int new_floor)
void CtdlScheduleRoomForDeletion (struct ctdlroom *qrbuf)
void CtdlDeleteRoom (struct ctdlroom *qrbuf)
int CtdlDoIHavePermissionToDeleteThisRoom (struct ctdlroom *qr)
unsigned CtdlCreateRoom (char *new_room_name, int new_room_type, char *new_room_pass, int new_room_floor, int really_create, int avoid_access, int new_room_view)


struct floorfloorcache [16]

Function Documentation

◆ b_deleteroom()

void b_deleteroom ( char *  room_name)

Definition at line 394 of file room_ops.c.

References b_putroom().

Referenced by CtdlDeleteRoom(), CtdlRenameRoom(), and CtdlScheduleRoomForDeletion().

◆ b_putroom()

void b_putroom ( struct ctdlroom qrbuf,
char *  room_name 

Definition at line 362 of file room_ops.c.

References cdb_delete(), CDB_ROOMS, cdb_store(), cdbdata::len, qrbuf, ctdlroom::QRmtime, and ROOMNAMELEN.

Referenced by b_deleteroom(), and CtdlPutRoom().

◆ convert_room_name_macros()

void convert_room_name_macros ( char *  towhere,
size_t  maxlen 

◆ CtdlCreateRoom()

◆ CtdlDeleteRoom()

◆ CtdlDoIHavePermissionToDeleteMessagesFromThisRoom()

int CtdlDoIHavePermissionToDeleteMessagesFromThisRoom ( void  )

Definition at line 93 of file room_ops.c.

References CC, CtdlRoomAccess(), and UA_DELETEALLOWED.

Referenced by cmd_dele(), ical_putics(), and imap_do_store().

◆ CtdlDoIHavePermissionToDeleteThisRoom()

int CtdlDoIHavePermissionToDeleteThisRoom ( struct ctdlroom qr)

Definition at line 1000 of file room_ops.c.

References CC, CtdlIsNonEditable(), is_room_aide(), MAILROOM, QR_MAILBOX, ctdlroom::QRflags, and ctdlroom::QRname.

Referenced by cmd_kill(), and imap_delete().

◆ CtdlDoIHavePermissionToPostInThisRoom()

int CtdlDoIHavePermissionToPostInThisRoom ( char *  errmsgbuf,
size_t  n,
PostType  PostPublic,
int  is_reply 

◆ CtdlDoIHavePermissionToReadMessagesInThisRoom()

int CtdlDoIHavePermissionToReadMessagesInThisRoom ( void  )

Definition at line 22 of file room_ops.c.

References CC, CtdlGetConfigInt(), om_not_logged_in, and om_ok.

Referenced by CtdlOutputMsg(), wiki_history(), and wiki_rev().

◆ CtdlForEachRoom()

◆ CtdlGetAvailableFloor()

int CtdlGetAvailableFloor ( void  )

Definition at line 433 of file room_ops.c.

References CtdlGetCachedFloor(), floor::f_flags, F_INUSE, flbuf, and MAXFLOORS.

◆ CtdlGetCachedFloor()

◆ CtdlGetFloor()

void CtdlGetFloor ( struct floor flbuf,
int  floor_num 

◆ CtdlGetFloorByName()

int CtdlGetFloorByName ( const char *  floor_name)

Definition at line 408 of file room_ops.c.

References CtdlGetCachedFloor(), floor::f_flags, F_INUSE, floor::f_name, flbuf, and MAXFLOORS.

Referenced by CtdlGetFloorByNameLock().

◆ CtdlGetFloorByNameLock()

int CtdlGetFloorByNameLock ( const char *  floor_name)

Definition at line 425 of file room_ops.c.

References begin_critical_section(), CtdlGetFloorByName(), and S_FLOORTAB.

◆ CtdlGetRoom()

◆ CtdlGetRoomLock()

◆ CtdlIsNonEditable()

int CtdlIsNonEditable ( struct ctdlroom qrbuf)

◆ CtdlPutFloor()

void CtdlPutFloor ( struct floor flbuf,
int  floor_num 

◆ CtdlPutFloorLock()

void CtdlPutFloorLock ( struct floor flbuf,
int  floor_num 

Definition at line 528 of file room_ops.c.

References CtdlPutFloor(), end_critical_section(), flbuf, and S_FLOORTAB.

Referenced by lputfloor().

◆ CtdlPutRoom()

void CtdlPutRoom ( struct ctdlroom qrbuf)

◆ CtdlPutRoomLock()

◆ CtdlRenameRoom()

◆ CtdlRoomAccess()

◆ CtdlScheduleRoomForDeletion()

void CtdlScheduleRoomForDeletion ( struct ctdlroom qrbuf)

◆ CtdlUserGoto()

◆ delete_msglist()

void delete_msglist ( struct ctdlroom whichroom)

Definition at line 561 of file room_ops.c.

References cdb_delete(), cdb_fetch(), cdb_free(), CDB_MSGLISTS, and ctdlroom::QRnumber.

◆ lgetfloor()

void lgetfloor ( struct floor flbuf,
int  floor_num 

◆ lputfloor()

void lputfloor ( struct floor flbuf,
int  floor_num 

◆ room_sanity_check()

void room_sanity_check ( struct ctdlroom qrbuf)

◆ sort_msglist()

int sort_msglist ( long  listptrs[],
int  oldcount 

Definition at line 586 of file room_ops.c.

References sort_msglist_cmp().

Referenced by CtdlDeleteMessages(), CtdlForEachMessage(), and CtdlSaveMsgPointersInRoom().

◆ sort_msglist_cmp()

int sort_msglist_cmp ( const void *  m1,
const void *  m2 

Definition at line 577 of file room_ops.c.

Referenced by sort_msglist().

Variable Documentation

◆ floorcache

struct floor* floorcache[16]

Definition at line 18 of file room_ops.c.

Referenced by CtdlGetCachedFloor(), and CtdlPutFloor().