]> code.citadel.org Git - citadel.git/commitdiff
* Began framing up a command to view other users' free/busy times
authorArt Cancro <ajc@citadel.org>
Thu, 20 Feb 2003 04:51:17 +0000 (04:51 +0000)
committerArt Cancro <ajc@citadel.org>
Thu, 20 Feb 2003 04:51:17 +0000 (04:51 +0000)
citadel/ChangeLog
citadel/serv_calendar.c

index 9886b560439776f9d5c41cf00a1dbc22e68d8fb8..650b21b13f845f591cc1e7e92373f5dacf2e3737 100644 (file)
@@ -1,4 +1,7 @@
  $Log$
+ Revision 605.2  2003/02/20 04:51:17  ajc
+ * Began framing up a command to view other users' free/busy times
+
  Revision 605.1  2003/02/19 22:38:43  ajc
  * Changed socklen_t to int (to allow compile on Macintosh)
 
@@ -4484,4 +4487,3 @@ Sat Jul 11 00:20:48 EDT 1998 Nathan Bryant <bryant@cs.usm.maine.edu>
 
 Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
        * Initial CVS import
-
index 6db1f958a91d05cd10d3ed312111889751c18883..a1726b658699a904a3a90b6015501ba1e9d38d11 100644 (file)
@@ -946,6 +946,43 @@ void ical_conflicts(long msgnum, char *partnum) {
 
 
 
+/*
+ * Grab another user's free/busy times
+ */
+void ical_freebusy(char *who) {
+       struct usersupp usbuf;
+       char calendar_room_name[ROOMNAMELEN];
+       char hold_rm[ROOMNAMELEN];
+
+       if (getuser(&usbuf, who) != 0) {
+               cprintf("%d No such user.\n", ERROR + NO_SUCH_USER);
+               return;
+       }
+
+       MailboxName(calendar_room_name, sizeof calendar_room_name,
+               &usbuf, USERCALENDARROOM);
+
+       strcpy(hold_rm, CC->quickroom.QRname);  /* save current room */
+
+       if (getroom(&CC->quickroom, USERCALENDARROOM) != 0) {
+               cprintf("%d Cannot open calendar\n", ERROR+ROOM_NOT_FOUND);
+               getroom(&CC->quickroom, hold_rm);
+               return;
+       }
+
+/*
+       CtdlForEachMessage(MSGS_ALL, 0, "text/calendar",
+               template, the_FIXME_function, NULL);
+ */
+
+       /* Go back to the room from which we came... */
+       getroom(&CC->quickroom, hold_rm);
+
+       cprintf("%d not implemented yet\n", ERROR);
+}
+
+
+
 
 /*
  * All Citadel calendar commands from the client come through here.
@@ -956,6 +993,7 @@ void cmd_ical(char *argbuf)
        long msgnum;
        char partnum[SIZ];
        char action[SIZ];
+       char who[SIZ];
 
        if (CtdlAccessCheck(ac_logged_in)) return;
 
@@ -986,6 +1024,11 @@ void cmd_ical(char *argbuf)
                ical_conflicts(msgnum, partnum);
        }
 
+       else if (!strcmp(subcmd, "freebusy")) {
+               extract(who, argbuf, 1);
+               ical_freebusy(who);
+       }
+
        else {
                cprintf("%d Invalid subcommand\n", ERROR+CMD_NOT_SUPPORTED);
                return;