Back to index

citadel  8.12
Functions
room_ops.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int is_known (struct ctdlroom *roombuf, int roomnum, struct ctdluser *userbuf)
int has_newmsgs (struct ctdlroom *roombuf, int roomnum, struct ctdluser *userbuf)
int is_zapped (struct ctdlroom *roombuf, int roomnum, struct ctdluser *userbuf)
void b_putroom (struct ctdlroom *qrbuf, char *room_name)
void b_deleteroom (char *)
void lgetfloor (struct floor *flbuf, int floor_num)
void lputfloor (struct floor *flbuf, int floor_num)
int sort_msglist (long int *listptrs, int oldcount)
void list_roomname (struct ctdlroom *qrbuf, int ra, int current_view, int default_view)
void convert_room_name_macros (char *towhere, size_t maxlen)

Function Documentation

void b_deleteroom ( char *  )

Definition at line 387 of file room_ops.c.

                                   {
       b_putroom(NULL, room_name);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void b_putroom ( struct ctdlroom qrbuf,
char *  room_name 
)

Definition at line 347 of file room_ops.c.

{
       char lowercase_name[ROOMNAMELEN];
       char *aptr, *bptr;
       long len;

       aptr = room_name;
       bptr = lowercase_name;
       while (!IsEmptyStr(aptr))
       {
              *bptr = tolower(*aptr);
              aptr++;
              bptr++;
       }
       *bptr='\0';

       len = bptr - lowercase_name;
       if (qrbuf == NULL) {
              cdb_delete(CDB_ROOMS,
                        lowercase_name, len);
       } else {
              time(&qrbuf->QRmtime);
              cdb_store(CDB_ROOMS,
                       lowercase_name, len,
                       qrbuf, sizeof(struct ctdlroom));
       }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void convert_room_name_macros ( char *  towhere,
size_t  maxlen 
)

Definition at line 1082 of file room_ops.c.

                                                            {
       if (!strcasecmp(towhere, "_BASEROOM_")) {
              safestrncpy(towhere, config.c_baseroom, maxlen);
       }
       else if (!strcasecmp(towhere, "_MAIL_")) {
              safestrncpy(towhere, MAILROOM, maxlen);
       }
       else if (!strcasecmp(towhere, "_TRASH_")) {
              safestrncpy(towhere, USERTRASHROOM, maxlen);
       }
       else if (!strcasecmp(towhere, "_DRAFTS_")) {
              safestrncpy(towhere, USERDRAFTROOM, maxlen);
       }
       else if (!strcasecmp(towhere, "_BITBUCKET_")) {
              safestrncpy(towhere, config.c_twitroom, maxlen);
       }
       else if (!strcasecmp(towhere, "_CALENDAR_")) {
              safestrncpy(towhere, USERCALENDARROOM, maxlen);
       }
       else if (!strcasecmp(towhere, "_TASKS_")) {
              safestrncpy(towhere, USERTASKSROOM, maxlen);
       }
       else if (!strcasecmp(towhere, "_CONTACTS_")) {
              safestrncpy(towhere, USERCONTACTSROOM, maxlen);
       }
       else if (!strcasecmp(towhere, "_NOTES_")) {
              safestrncpy(towhere, USERNOTESROOM, maxlen);
       }
}

Here is the caller graph for this function:

int has_newmsgs ( struct ctdlroom roombuf,
int  roomnum,
struct ctdluser userbuf 
)
int is_known ( struct ctdlroom roombuf,
int  roomnum,
struct ctdluser userbuf 
)
int is_zapped ( struct ctdlroom roombuf,
int  roomnum,
struct ctdluser userbuf 
)
void lgetfloor ( struct floor flbuf,
int  floor_num 
)

Definition at line 490 of file room_ops.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void list_roomname ( struct ctdlroom qrbuf,
int  ra,
int  current_view,
int  default_view 
)

Definition at line 681 of file room_ops.c.

{
       char truncated_roomname[ROOMNAMELEN];

       /* For my own mailbox rooms, chop off the owner prefix */
       if ( (qrbuf->QRflags & QR_MAILBOX)
            && (atol(qrbuf->QRname) == CC->user.usernum) ) {
              safestrncpy(truncated_roomname, qrbuf->QRname, sizeof truncated_roomname);
              safestrncpy(truncated_roomname, &truncated_roomname[11], sizeof truncated_roomname);
              cprintf("%s", truncated_roomname);
       }
       /* For all other rooms, just display the name in its entirety */
       else {
              cprintf("%s", qrbuf->QRname);
       }

       /* ...and now the other parameters */
       cprintf("|%u|%d|%d|%d|%d|%d|%d|%ld|\n",
              qrbuf->QRflags,
              (int) qrbuf->QRfloor,
              (int) qrbuf->QRorder,
              (int) qrbuf->QRflags2,
              ra,
              current_view,
              default_view,
              qrbuf->QRmtime
       );
}

Here is the call graph for this function:

Here is the caller graph for this function:

void lputfloor ( struct floor flbuf,
int  floor_num 
)

Definition at line 573 of file room_ops.c.

{
       CtdlPutFloorLock(flbuf, floor_num);
}

Here is the call graph for this function:

Here is the caller graph for this function:

int sort_msglist ( long int *  listptrs,
int  oldcount 
)