projects
/
citadel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
74b081f
)
minor style cleanup
author
Art Cancro
<ajc@citadel.org>
Thu, 18 Oct 2018 15:41:16 +0000
(11:41 -0400)
committer
Art Cancro
<ajc@citadel.org>
Thu, 18 Oct 2018 15:41:16 +0000
(11:41 -0400)
citadel/modules/calendar/serv_calendar.c
patch
|
blob
|
history
diff --git
a/citadel/modules/calendar/serv_calendar.c
b/citadel/modules/calendar/serv_calendar.c
index 71c7fbc519fb52ad2efed92b3792f36e7a847f9b..02153287fd3996f8d19310e84ab945846f6b7124 100644
(file)
--- a/
citadel/modules/calendar/serv_calendar.c
+++ b/
citadel/modules/calendar/serv_calendar.c
@@
-17,9
+17,7
@@
#define PRODID "-//Citadel//NONSGML Citadel Calendar//EN"
#include "ctdl_module.h"
#define PRODID "-//Citadel//NONSGML Citadel Calendar//EN"
#include "ctdl_module.h"
-
#include <libical/ical.h>
#include <libical/ical.h>
-
#include "msgbase.h"
#include "internet_addressing.h"
#include "serv_calendar.h"
#include "msgbase.h"
#include "internet_addressing.h"
#include "serv_calendar.h"
@@
-28,7
+26,6
@@
#include "default_timezone.h"
#include "config.h"
#include "default_timezone.h"
#include "config.h"
-
struct ical_respond_data {
char desired_partnum[SIZ];
icalcomponent *cal;
struct ical_respond_data {
char desired_partnum[SIZ];
icalcomponent *cal;
@@
-310,7
+307,6
@@
void ical_send_a_reply(icalcomponent *request, char *action) {
}
}
-
/*
* Callback function for mime parser that hunts for calendar content types
* and turns them into calendar objects. If something is found, it is placed
/*
* Callback function for mime parser that hunts for calendar content types
* and turns them into calendar objects. If something is found, it is placed
@@
-570,8
+566,6
@@
STARTOVER:
}
}
-
-
/*
* Handle an incoming RSVP (object with method==ICAL_METHOD_REPLY) for a
* calendar event. The object has already been deserialized for us; all
/*
* Handle an incoming RSVP (object with method==ICAL_METHOD_REPLY) for a
* calendar event. The object has already been deserialized for us; all
@@
-863,6
+857,7
@@
int ical_ctdl_is_overlap(
return(1);
}
return(1);
}
+
/*
* Phase 6 of "hunt for conflicts"
* called by ical_conflicts_phase5()
/*
* Phase 6 of "hunt for conflicts"
* called by ical_conflicts_phase5()
@@
-914,7
+909,6
@@
int ical_conflicts_phase6(struct icaltimetype t1start,
}
}
-
/*
* Phase 5 of "hunt for conflicts"
* Called by ical_conflicts_phase4()
/*
* Phase 5 of "hunt for conflicts"
* Called by ical_conflicts_phase4()
@@
-1029,8
+1023,6
@@
void ical_conflicts_phase5(struct icaltimetype t1start,
}
}
-
-
/*
* Phase 4 of "hunt for conflicts"
* Called by ical_hunt_for_conflicts_backend()
/*
* Phase 4 of "hunt for conflicts"
* Called by ical_hunt_for_conflicts_backend()
@@
-1132,7
+1124,6
@@
void ical_conflicts_phase4(icalcomponent *proposed_event,
}
}
-
/*
* Phase 3 of "hunt for conflicts"
* Called by ical_hunt_for_conflicts()
/*
* Phase 3 of "hunt for conflicts"
* Called by ical_hunt_for_conflicts()
@@
-1163,7
+1154,6
@@
void ical_hunt_for_conflicts_backend(long msgnum, void *data) {
}
}
-
/*
* Phase 2 of "hunt for conflicts" operation.
* At this point we have a calendar object which represents the VEVENT that
/*
* Phase 2 of "hunt for conflicts" operation.
* At this point we have a calendar object which represents the VEVENT that
@@
-1197,7
+1187,6
@@
void ical_hunt_for_conflicts(icalcomponent *cal) {
}
}
-
/*
* Hunt for conflicts (Phase 1 -- retrieve the object and call Phase 2)
*/
/*
* Hunt for conflicts (Phase 1 -- retrieve the object and call Phase 2)
*/
@@
-1235,7
+1224,6
@@
void ical_conflicts(long msgnum, char *partnum) {
}
}
-
/*
* Look for busy time in a VEVENT and add it to the supplied VFREEBUSY.
*
/*
* Look for busy time in a VEVENT and add it to the supplied VFREEBUSY.
*
@@
-1375,7
+1363,6
@@
void ical_add_to_freebusy(icalcomponent *fb, icalcomponent *top_level_cal) {
}
}
-
/*
* Backend for ical_freebusy()
*
/*
* Backend for ical_freebusy()
*
@@
-1410,7
+1397,6
@@
void ical_freebusy_backend(long msgnum, void *data) {
}
}
-
/*
* Grab another user's free/busy times
*/
/*
* Grab another user's free/busy times
*/
@@
-1573,7
+1559,6
@@
void ical_freebusy(char *who) {
}
}
-
/*
* Backend for ical_getics()
*
/*
* Backend for ical_getics()
*
@@
-1647,7
+1632,6
@@
void ical_getics_backend(long msgnum, void *data) {
}
}
-
/*
* Retrieve all of the calendar items in the current room, and output them
* as a single icalendar object.
/*
* Retrieve all of the calendar items in the current room, and output them
* as a single icalendar object.
@@
-1856,10
+1840,8
@@
void cmd_ical(char *argbuf)
}
if (!strcasecmp(subcmd, "sgi")) {
}
if (!strcasecmp(subcmd, "sgi")) {
- CIT_ICAL->server_generated_invitations =
- (extract_int(argbuf, 1) ? 1 : 0) ;
- cprintf("%d %d\n",
- CIT_OK, CIT_ICAL->server_generated_invitations);
+ CIT_ICAL->server_generated_invitations = (extract_int(argbuf, 1) ? 1 : 0) ;
+ cprintf("%d %d\n", CIT_OK, CIT_ICAL->server_generated_invitations);
return;
}
return;
}
@@
-1902,7
+1884,6
@@
void cmd_ical(char *argbuf)
}
}
-
/*
* We don't know if the calendar room exists so we just create it at login
*/
/*
* We don't know if the calendar room exists so we just create it at login
*/
@@
-2003,7
+1984,6
@@
void ical_send_out_invitations(icalcomponent *top_level_cal, icalcomponent *cal)
return;
}
return;
}
-
/* If this is a VCALENDAR component, look for a VEVENT subcomponent. */
if (icalcomponent_isa(cal) == ICAL_VCALENDAR_COMPONENT) {
ical_send_out_invitations(top_level_cal,
/* If this is a VCALENDAR component, look for a VEVENT subcomponent. */
if (icalcomponent_isa(cal) == ICAL_VCALENDAR_COMPONENT) {
ical_send_out_invitations(top_level_cal,
@@
-2141,8
+2121,7
@@
void ical_send_out_invitations(icalcomponent *top_level_cal, icalcomponent *cal)
attached_zones[num_zones_attached++] = z;
}
attached_zones[num_zones_attached++] = z;
}
- icalproperty_set_parameter(p,
- icalparameter_new_tzid(icaltimezone_get_tzid(z))
+ icalproperty_set_parameter(p, icalparameter_new_tzid(icaltimezone_get_tzid(z))
);
}
}
);
}
}
@@
-2265,7
+2244,6
@@
void ical_saving_vevent(icalcomponent *top_level_cal, icalcomponent *cal) {
}
}
-
/*
* Back end for ical_obj_beforesave()
* This hunts for the UID of the calendar event (becomes Citadel msg EUID),
/*
* Back end for ical_obj_beforesave()
* This hunts for the UID of the calendar event (becomes Citadel msg EUID),
@@
-2365,8
+2343,6
@@
void ical_obj_beforesave_backend(char *name, char *filename, char *partnum,
}
}
-
-
/*
* See if we need to prevent the object from being saved (we don't allow
* MIME types other than text/calendar in "calendar" or "tasks" rooms).
/*
* See if we need to prevent the object from being saved (we don't allow
* MIME types other than text/calendar in "calendar" or "tasks" rooms).
@@
-2478,6
+2454,7
@@
void ical_session_startup(void) {
memset(CIT_ICAL, 0, sizeof(struct cit_ical));
}
memset(CIT_ICAL, 0, sizeof(struct cit_ical));
}
+
void ical_session_shutdown(void) {
free(CIT_ICAL);
}
void ical_session_shutdown(void) {
free(CIT_ICAL);
}
@@
-2486,9
+2463,7
@@
void ical_session_shutdown(void) {
/*
* Back end for ical_fixed_output()
*/
/*
* Back end for ical_fixed_output()
*/
-void ical_fixed_output_backend(icalcomponent *cal,
- int recursion_level
-) {
+void ical_fixed_output_backend(icalcomponent *cal, int recursion_level) {
icalcomponent *c;
icalproperty *p;
char buf[256];
icalcomponent *c;
icalproperty *p;
char buf[256];
@@
-2533,7
+2508,6
@@
void ical_fixed_output_backend(icalcomponent *cal,
}
}
-
/*
* Function to output iCalendar data as plain text. Nobody uses MSG0
* anymore, so really this is just so we expose the vCard data to the full
/*
* Function to output iCalendar data as plain text. Nobody uses MSG0
* anymore, so really this is just so we expose the vCard data to the full
@@
-2559,8
+2533,7
@@
void ical_fixed_output(char *ptr, int len) {
}
}
-void serv_calendar_destroy(void)
-{
+void serv_calendar_destroy(void) {
icaltimezone_free_builtin_timezones();
}
icaltimezone_free_builtin_timezones();
}
@@
-2588,7
+2561,7
@@
CTDL_MODULE_INIT(calendar)
CtdlRegisterMessageHook(ical_obj_beforesave, EVT_BEFORESAVE);
CtdlRegisterMessageHook(ical_obj_aftersave, EVT_AFTERSAVE);
CtdlRegisterSessionHook(ical_CtdlCreateRoom, EVT_LOGIN, PRIO_LOGIN + 1);
CtdlRegisterMessageHook(ical_obj_beforesave, EVT_BEFORESAVE);
CtdlRegisterMessageHook(ical_obj_aftersave, EVT_AFTERSAVE);
CtdlRegisterSessionHook(ical_CtdlCreateRoom, EVT_LOGIN, PRIO_LOGIN + 1);
- CtdlRegisterProtoHook(cmd_ical, "ICAL", "Citadel iCal commands");
+ CtdlRegisterProtoHook(cmd_ical, "ICAL", "Citadel iCal
endar
commands");
CtdlRegisterSessionHook(ical_session_startup, EVT_START, PRIO_START + 1);
CtdlRegisterSessionHook(ical_session_shutdown, EVT_STOP, PRIO_STOP + 80);
CtdlRegisterFixedOutputHook("text/calendar", ical_fixed_output);
CtdlRegisterSessionHook(ical_session_startup, EVT_START, PRIO_START + 1);
CtdlRegisterSessionHook(ical_session_shutdown, EVT_STOP, PRIO_STOP + 80);
CtdlRegisterFixedOutputHook("text/calendar", ical_fixed_output);