#define CITADEL_H
/* #include <dmalloc.h> uncomment if using dmalloc */
-/* Build Citadel with the calendar service only if the header *and*
- * library for libical are both present.
- */
-#ifdef HAVE_LIBICAL
-#ifdef HAVE_ICAL_H
-#define CITADEL_WITH_CALENDAR_SERVICE 1
-#endif
-#endif
-
#include "sysdep.h"
#include <limits.h>
#include "sysconfig.h"
cprintf("%f\n", CtdlThreadWorkerAvg);
cprintf("%d\n", CtdlThreadGetCount());
- /* Does this server support Sieve mail filtering? */
-#ifdef HAVE_LIBSIEVE
- cprintf("1\n"); /* yes */
-#else
- cprintf("0\n"); /* no */
-#endif
-
+ cprintf("1\n"); /* yes, Sieve mail filtering is supported */
cprintf("%d\n", config.c_enable_fulltext);
cprintf("000\n");
AC_ARG_WITH(with_zlib, [ --with-zlib use zlib compression if present])
AC_ARG_WITH(with_ldap, [ --with-ldap use OpenLDAP client library])
-AC_ARG_WITH(with_libical, [ --with-libical use libical calendaring library])
-AC_ARG_WITH(with_libsieve, [ --with-libsieve use libsieve mail sorting library])
AC_ARG_WITH(with_libdspam, [ --with-libdspam use libdspam mail spam scanning library])
-AC_ARG_WITH(with_expat, [ --with-expat use Expat XML parser])
if test "x$with_db" != xno -a "x$with_db" != xyes -a "$with_db"; then
db_dir="$with_db"
-dnl Checks for the libsieve mailbox sorting library.
-if test "x$with_libsieve" != xno ; then
- AC_CHECK_HEADERS(sieve2.h,
- [AC_CHECK_LIB(sieve, sieve2_license,
- [ok_libsieve=yes],,
- )])
-fi
-
-if test "x$ok_libsieve" = xyes ; then
- SERVER_LIBS="-lsieve $SERVER_LIBS"
- AC_DEFINE(HAVE_LIBSIEVE, [], [define this if you have the libsieve mailbox filtering library available])
-fi
-
-
dnl Checks for the libdspam mail spam scanning library.
if test "x$with_libdspam" != xno ; then
AC_CHECK_HEADERS(dspam/libdspam.h,
-
dnl Checks for the Expat XML parser.
-if test "x$with_expat" != xno ; then
- AC_CHECK_HEADERS(expat.h,
- [AC_CHECK_LIB(expat, XML_ParserCreateNS,
- [ok_expat=yes],,
- )])
-fi
-
-if test "x$ok_expat" = xyes ; then
- SERVER_LIBS="-lexpat $SERVER_LIBS"
- AC_DEFINE(HAVE_EXPAT, [], [define this if you have the Expat XML parser available])
-fi
-
-
+AC_CHECK_HEADER(expat.h,
+ [AC_CHECK_LIB(expat, XML_ParserCreateNS,
+ [
+ SERVER_LIBS="-lexpat $SERVER_LIBS"
+ ],
+ [
+ AC_MSG_ERROR(The Expat XML parser was not found and is required. More info: http://www.citadel.org/doku.php/installation:start)
+ ]
+ ,
+ )],
+ [
+ AC_MSG_ERROR(expat.h was not found and is required. More info: http://www.citadel.org/doku.php/installation:start)
+ ]
+)
-dnl Checks for the libical calendaring library.
-if test "x$with_libical" != xno ; then
- AC_CHECK_HEADERS(ical.h,
- [AC_CHECK_LIB(ical, icalcomponent_new,
- [ok_libical=yes],,
- )])
-fi
+dnl Checks for the libical iCalendar library.
+AC_CHECK_HEADER(ical.h,
+ [AC_CHECK_LIB(ical, icalcomponent_new,
+ [
+ SERVER_LIBS="-lical $SERVER_LIBS"
+ ],
+ [
+ AC_MSG_ERROR(libical was not found and is required. More info: http://www.citadel.org/doku.php/installation:start)
+ ]
+ ,
+ )],
+ [
+ AC_MSG_ERROR(ical.h was not found and is required. More info: http://www.citadel.org/doku.php/installation:start)
+ ]
+)
-if test "x$ok_libical" = xyes ; then
- AC_TRY_RUN(
+dnl Checks for the libsieve mailbox sorting library.
+AC_CHECK_HEADER(sieve2.h,
+ [AC_CHECK_LIB(sieve, sieve2_license,
[
-#include <ical.h>
-main() {
- int major, minor, v;
- sscanf(ICAL_VERSION, "%d.%d", &major, &minor);
- v = 100*major + minor;
- printf("libical version: %i\n", v);
- if (v >= 24) {
- printf("This version is ok.\n");
- return(0);
- }
- printf("libical 0.24 or newer required.\n");
- printf("Citadel will be built without calendar support.\n");
- return(1);
-}
- ],
+ SERVER_LIBS="-lsieve $SERVER_LIBS"
+ ],
[
- SERVER_LIBS="-lical $SERVER_LIBS"
- AC_DEFINE(HAVE_LIBICAL, [], [define this if you have the libical calendaring library available])
+ AC_MSG_ERROR(libsieve was not found and is required. More info: http://www.citadel.org/doku.php/installation:start)
]
- )
-fi
+ ,
+ )],
+ [
+ AC_MSG_ERROR(sieve2.h was not found and is required. More info: http://www.citadel.org/doku.php/installation:start)
+ ]
+)
echo ------------------------------------------------------------------------
echo 'zlib compression: ' $ok_zlib
-echo 'Calendar support: ' $ok_libical
echo 'LDAP support: ' $ok_ldap
-echo 'Sieve mailbox filtering support: ' $ok_libsieve
echo 'DSpam Scanning support: ' $ok_libdspam
-echo 'Expat XML parser present: ' $ok_expat
echo
echo 'Note: if you are not using Linux, make sure you are using GNU make'
echo '(gmake) to compile Citadel.'
#include <stdio.h>
#include <string.h>
#include <strings.h>
+#include <ical.h>
#include "citadel.h"
#include "server.h"
#include "citserver.h"
#include "sysdep_decls.h"
#include "support.h"
#include "config.h"
-
-#ifdef CITADEL_WITH_CALENDAR_SERVICE
-#include <ical.h>
#include "ical_dezonify.h"
/* lprintf(9, "ical_dezonify() completed\n"); */
}
-
-#endif /* CITADEL_WITH_CALENDAR_SERVICE */
#ifdef HAVE_STRINGS_H
#include <strings.h>
#endif
+#include <ical.h>
#include <libcitadel.h>
#include "citadel.h"
#include "server.h"
#include "serv_calendar.h"
#include "euidindex.h"
#include "ctdl_module.h"
-
-#ifdef CITADEL_WITH_CALENDAR_SERVICE
-
-#include <ical.h>
#include "ical_dezonify.h"
icaltimezone_free_builtin_timezones();
}
-#endif /* CITADEL_WITH_CALENDAR_SERVICE */
-
/*
* Register this module with the Citadel server.
*/
{
if (!threading)
{
-#ifdef CITADEL_WITH_CALENDAR_SERVICE
CtdlRegisterMessageHook(ical_obj_beforesave, EVT_BEFORESAVE);
CtdlRegisterMessageHook(ical_obj_aftersave, EVT_AFTERSAVE);
CtdlRegisterSessionHook(ical_create_room, EVT_LOGIN);
CtdlRegisterFixedOutputHook("text/calendar", ical_fixed_output);
CtdlRegisterFixedOutputHook("application/ics", ical_fixed_output);
CtdlRegisterCleanupHook(serv_calendar_destroy);
-#endif
}
/* return our Subversion id for the Log */
#include <limits.h>
#include <ctype.h>
#include <libcitadel.h>
+#include <expat.h>
#include "citadel.h"
#include "server.h"
#include "citserver.h"
#include "internet_addressing.h"
#include "md5.h"
#include "ctdl_module.h"
-
-#ifdef HAVE_EXPAT
-#include <expat.h>
#include "serv_xmpp.h"
struct xmpp_event *xmpp_queue = NULL;
const char *CitadelServiceXMPP="XMPP";
-#endif /* HAVE_EXPAT */
-
CTDL_MODULE_INIT(jabber)
{
if (!threading) {
-#ifdef HAVE_EXPAT
CtdlRegisterServiceHook(config.c_xmpp_c2s_port,
NULL,
xmpp_greeting,
CtdlRegisterSessionHook(xmpp_logout_hook, EVT_LOGOUT);
CtdlRegisterSessionHook(xmpp_login_hook, EVT_UNSTEALTH);
CtdlRegisterSessionHook(xmpp_logout_hook, EVT_STEALTH);
- #else
- lprintf(CTDL_INFO, "This server is missing the Expat XML parser. Jabber service will be disabled.\n");
-#endif
}
/* return our Subversion id for the Log */
#include <string.h>
#include <limits.h>
#include <ctype.h>
+#include <expat.h>
#include <libcitadel.h>
#include "citadel.h"
#include "server.h"
#include "internet_addressing.h"
#include "md5.h"
#include "ctdl_module.h"
-
-#ifdef HAVE_EXPAT
-#include <expat.h>
#include "serv_xmpp.h"
XMPP->message_to[0] = 0;
}
-
-
-#endif /* HAVE_EXPAT */
#include <string.h>
#include <limits.h>
#include <ctype.h>
+#include <expat.h>
#include <libcitadel.h>
#include "citadel.h"
#include "server.h"
#include "internet_addressing.h"
#include "md5.h"
#include "ctdl_module.h"
-
-#ifdef HAVE_EXPAT
-#include <expat.h>
#include "serv_xmpp.h"
}
free(cptr);
}
-
-
-#endif /* HAVE_EXPAT */
#include <string.h>
#include <limits.h>
#include <ctype.h>
+#include <expat.h>
#include <libcitadel.h>
#include "citadel.h"
#include "server.h"
#include "internet_addressing.h"
#include "md5.h"
#include "ctdl_module.h"
-
-#ifdef HAVE_EXPAT
-#include <expat.h>
#include "serv_xmpp.h"
cprintf("</iq>");
}
-
-#endif /* HAVE_EXPAT */
#include <string.h>
#include <limits.h>
#include <ctype.h>
+#include <expat.h>
#include <libcitadel.h>
#include "citadel.h"
#include "server.h"
#include "internet_addressing.h"
#include "md5.h"
#include "ctdl_module.h"
-
-#ifdef HAVE_EXPAT
-#include <expat.h>
#include "serv_xmpp.h"
int queue_event_seq = 0;
XMPP->last_event_processed = highest_event;
}
-
-
-#endif /* HAVE_EXPAT */
#include <string.h>
#include <limits.h>
#include <ctype.h>
+#include <expat.h>
#include <libcitadel.h>
#include "citadel.h"
#include "server.h"
#include "internet_addressing.h"
#include "md5.h"
#include "ctdl_module.h"
-
-#ifdef HAVE_EXPAT
-#include <expat.h>
#include "serv_xmpp.h"
* do not allow spaces so we can tell the user to substitute underscores if their
* login name contains spaces.
*/
- while (ptr=strstr(ident, "_")) {
- *ptr = ' ';
- }
-
- while (ptr=strstr(user, "_")) {
- *ptr = ' ';
- }
+ convert_spaces_to_underscores(ident);
+ convert_spaces_to_underscores(user);
/* Now attempt authentication */
"</iq>"
);
}
-
-
-
-#endif /* HAVE_EXPAT */
#include "ctdl_module.h"
-
-
-
-#ifdef HAVE_LIBSIEVE
-
#include "serv_sieve.h"
-#endif /* HAVE_LIBSIEVE */
const char* CitadelServiceManageSieve = "ManageSieve";
CTDL_MODULE_INIT(managesieve)
{
if (!threading)
{
-#ifdef HAVE_LIBSIEVE
CtdlRegisterServiceHook(config.c_managesieve_port,
NULL,
managesieve_greeting,
NULL,
CitadelServiceManageSieve);
CtdlRegisterSessionHook(managesieve_cleanup_function, EVT_STOP);
-
-#else /* HAVE_LIBSIEVE */
-
- lprintf(CTDL_INFO, "This server is missing libsieve. Managesieve protocol is disabled..\n");
-
-#endif /* HAVE_LIBSIEVE */
}
/* return our Subversion id for the Log */
#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
+#include <expat.h>
#include <libcitadel.h>
#include "citadel.h"
#include "server.h"
#include "citadel_dirs.h"
#include "md5.h"
-#ifdef HAVE_EXPAT
-#include <expat.h>
-
struct rssnetcfg {
struct rssnetcfg *next;
}
-#endif /* HAVE_EXPAT */
-
CTDL_MODULE_INIT(rssclient)
{
if (threading)
{
-#ifdef HAVE_EXPAT
CtdlThreadSchedule ("RSS Client", CTDLTHREAD_BIGSTACK, rssclient_scan, NULL, 0);
-#else
- lprintf(CTDL_INFO, "This server is missing the Expat XML parser. RSS client will be disabled.\n");
-#endif
}
-
/* return our Subversion id for the Log */
return "$Id: serv_rssclient.c 5652 2007-10-29 20:14:48Z ajc $";
}
#include "database.h"
#include "msgbase.h"
#include "internet_addressing.h"
-
-
#include "ctdl_module.h"
-
-
-#ifdef HAVE_LIBSIEVE
-
#include "serv_sieve.h"
struct RoomProcList *sieve_list = NULL;
return 0;
}
-#endif /* HAVE_LIBSIEVE */
-
CTDL_MODULE_INIT(sieve)
{
if (!threading)
{
-#ifdef HAVE_LIBSIEVE
ctdl_sieve_init();
CtdlRegisterProtoHook(cmd_msiv, "MSIV", "Manage Sieve scripts");
-
CtdlRegisterRoomHook(serv_sieve_room);
-
CtdlRegisterSessionHook(perform_sieve_processing, EVT_HOUSE);
-
-#else /* HAVE_LIBSIEVE */
-
- lprintf(CTDL_INFO, "This server is missing libsieve. Mailbox filtering will be disabled.\n");
-
-#endif /* HAVE_LIBSIEVE */
}
/* return our Subversion id for the Log */
/*
- * $Id: $
+ * $Id$
*/
-#ifdef HAVE_LIBSIEVE
-
#include <sieve2.h>
#include <sieve2_error.h>
int msiv_deletescript(struct sdm_userdata *u, char *script_name);
void msiv_putscript(struct sdm_userdata *u, char *script_name, char *script_content);
extern char *msiv_extensions;
-
-#endif /* HAVE_LIBSIEVE */
*/
void session_startup(void)
{
- int i = 0;
-
lprintf(CTDL_NOTICE, "<%s> logged in\n", CC->curr_user);
lgetuser(&CC->user, CC->curr_user);
# undefined via #undef or recursively expanded use the := operator
# instead of the = operator.
-PREDEFINED = WEBCIT_WITH_CALENDAR_SERVICE HAVE_OPENSSL ENABLE_NLS HAVE_ICONV HAVE_ZLIB
+PREDEFINED = HAVE_OPENSSL ENABLE_NLS HAVE_ICONV HAVE_ZLIB
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
/*
* $Id$
- */
-/**
*
- * \defgroup CalendarAv Check attendee availability for scheduling a meeting.
- * \ingroup Calendaring
*/
-/*@{*/
#include "webcit.h"
#include "webserver.h"
-/** only available if we have calendaring */
-#ifdef WEBCIT_WITH_CALENDAR_SERVICE
-
-
-
-/**
+/*
* \brief verify users avaiability
* Utility function to fetch a VFREEBUSY type of thing for
* any specified user.
}
-
-#endif /* WEBCIT_WITH_CALENDAR_SERVICE */
-
-/** @} */
/*
* $Id$
+ *
+ * Functions which handle calendar objects and their processing/display.
*/
-/**
- * \defgroup calav Functions which handle calendar objects and their processing/display.
- * \ingroup Calendaring
- */
-/* @{ */
#include "webcit.h"
#include "webserver.h"
-#ifndef WEBCIT_WITH_CALENDAR_SERVICE
-
-/**
- * \brief get around non existing types
- * Handler stubs for builds with no calendar library available
- * \param part_source dummy pointer to the source
- * \param msgnum number of the mesage in the db
- * \param cal_partnum number of the calendar part
- */
-void cal_process_attachment(char *part_source, long msgnum, char *cal_partnum) {
-
- wprintf(_("<I>This message contains calendaring/scheduling information,"
- " but support for calendars is not available on this "
- "particular system. Please ask your system administrator to "
- "install a new version of the Citadel web service with "
- "calendaring enabled.</I><br />\n")
- );
-
-}
-/**
- * \brief say we can't display calendar items
- * \param msgnum number of the mesage in our db
- */
-void display_calendar(long msgnum) {
- wprintf(_("<i>"
- "Cannot display calendar item. You are seeing this error "
- "because your WebCit service has not been installed with "
- "calendar support. Please contact your system administrator."
- "</i><br />\n"));
-}
-
-/**
- * \brief say we can't display task items
- * \param msgnum number of the mesage in our db
- */
-void display_task(long msgnum) {
- wprintf(_("<i>"
- "Cannot display to-do item. You are seeing this error "
- "because your WebCit service has not been installed with "
- "calendar support. Please contact your system administrator."
- "</i><br />\n"));
-}
-/** ok, we have calendaring available */
-#else /* WEBCIT_WITH_CALENDAR_SERVICE */
-
-
-/****** End of handler stubs. Everything below this line is real. ******/
-
-
-
-
-/**
+/*
* \brief Process a calendar object
* ...at this point it's already been deserialized by cal_process_attachment()
* \param cal the calendar object
}
-
-#endif /* WEBCIT_WITH_CALENDAR_SERVICE */
-
/*
* $Id$
+ *
+ * Miscellaneous functions which handle calendar components.
*/
-/**
- * \defgroup MiscCal Miscellaneous functions which handle calendar components.
- * \ingroup Calendaring
- */
-/*@{*/
+
#include "webcit.h"
#include "webserver.h"
"7pm", "8pm", "9pm", "10pm", "11pm"
};
-#ifdef WEBCIT_WITH_CALENDAR_SERVICE
-
-/**
+/*
* \brief display and edit date/time
* The display_icaltimetype_as_webform() and icaltime_from_webform() functions
* handle the display and editing of date/time properties in web pages. The
}
-
-
-#endif
-/*@}*/
- /*
+/*
* $Id$
+ *
+ * Handles the HTML display of calendar items.
*/
-/**
- * \defgroup CalHtmlHandles Handles the HTML display of calendar items.
- * \ingroup Calendaring
- */
-/*@{*/
+
#include "webcit.h"
#include "webserver.h"
-#ifdef WEBCIT_WITH_CALENDAR_SERVICE
-
-/****************************************************************************/
-
void embeddable_mini_calendar(int year, int month, char *urlformat)
{
}
-#else /* WEBCIT_WITH_CALENDAR_SERVICE */
-
-/**\brief stub for non-libical builds */
-void do_calendar_view(void) {
- wprintf("<center><i>");
- wprintf(_("The calendar view is not available."));
- wprintf("</i></center><br />\n");
-}
-
-/**\brief stub for non-libical builds */
-void do_tasks_view(void) {
- wprintf("<center><I>");
- wprintf(_("The tasks view is not available."));
- wprintf("</i></center><br />\n");
-}
-
-/**\brief stub for non-libical builds */
-void ajax_mini_calendar(void) {
-}
-
-#endif /* WEBCIT_WITH_CALENDAR_SERVICE */
-
-/** @} */
ssl_dir="$prefix/keys"
fi
-AC_ARG_WITH(with_libical, [ --with-libical use libical calendaring library])
AC_ARG_WITH(with_zlib, [ --with-zlib use zlib compression if present])
AC_ARG_WITH(ssl,
[ --with-ssl=PATH Specify path to OpenSSL installation ],
)
-webcit_with_calendar_service=no
-dnl Checks for the libical calendaring library.
-if test "x$with_libical" != xno ; then
- AC_CHECK_HEADERS(ical.h,
- [AC_CHECK_LIB(ical, icalcomponent_new,
- [ok_libical=yes],,
- )])
-fi
-
-if test "x$ok_libical" = xyes ; then
-
- AC_TRY_RUN(
- [
-#include <ical.h>
-main() {
- int major, minor, v;
- sscanf(ICAL_VERSION, "%d.%d", &major, &minor);
- v = 100*major + minor;
- printf("libical version: %i\n", v);
- if (v >= 30) {
- printf("This version is ok.\n");
- return(0);
- }
- printf("libical 0.30 or newer required.\n");
- printf("Citadel will be built without calendar support.\n");
- return(1);
-}
- ],
+dnl Checks for the libical iCalendar library.
+AC_CHECK_HEADER(ical.h,
+ [AC_CHECK_LIB(ical, icalcomponent_new,
[
LIBS="-lical $LIBS"
- AC_DEFINE(HAVE_LIBICAL,[],[whether we have libical available])
- webcit_with_calendar_service=yes
+ ],
+ [
+ AC_MSG_ERROR(libical was not found and is required. More info: http://www.citadel.org/doku.php/installation:start)
]
- )
-fi
-ok_libical=$webcit_with_calendar_service
-
+ ,
+ )],
+ [
+ AC_MSG_ERROR(ical.h was not found and is required. More info: http://www.citadel.org/doku.php/installation:start)
+ ]
+)
-if test "$webcit_with_calendar_service" == "yes"; then
- AC_DEFINE(WEBCIT_WITH_CALENDAR_SERVICE,[],[whether we can do with calendar.])
-fi
dnl Checks for the zlib compression library.
if test "x$with_zlib" != xno ; then
echo ------------------------------------------------------------------------
echo 'zlib compression: ' $ok_zlib
-echo 'Calendar support: ' $ok_libical
echo 'Character set conversion support:' $ok_iconv
echo 'National language support: ' $ok_nls
echo
/*
* $Id$
+ *
+ * Editing calendar events.
*/
-/**
- * \defgroup EditCal Editing calendar events.
- * \ingroup Calendaring
- */
-/*@{*/
+
#include "webcit.h"
#include "webserver.h"
-#ifdef WEBCIT_WITH_CALENDAR_SERVICE
-
-/**
+/*
* \brief Display an event by itself (for editing)
* \param supplied_vevent the event to edit
* \param msgnum reference on the citserver
}
-#endif /* WEBCIT_WITH_CALENDAR_SERVICE */
-
-/*@}*/
#include "webserver.h"
-#ifdef WEBCIT_WITH_CALENDAR_SERVICE
-
-
/*
* Figure out which time zone needs to be used for timestamps that are
* not UTC and do not have a time zone specified.
lprintf(9, "ical_dezonify() completed\n");
}
-
-#endif /* WEBCIT_WITH_CALENDAR_SERVICE */
/*
* $Id$
+ *
+ * Displays and customizes the iconbar.
*/
-/**
- * \defgroup IconBar Displays and customizes the iconbar.
- * \ingroup MenuInfrastructure
- */
-/*@{*/
+
#include "webcit.h"
_("Your personal notes")
);
-#ifdef WEBCIT_WITH_CALENDAR_SERVICE
bar = 1 - bar;
wprintf("<tr class=\"%s\"><td>"
"<input type=\"radio\" name=\"ib_calendar\" value=\"yes\" %s> %s "
_("Tasks"),
_("A shortcut to your personal task list")
);
-#endif /* WEBCIT_WITH_CALENDAR_SERVICE */
bar = 1 - bar;
wprintf("<tr class=\"%s\"><td>"
/*
* $Id$
- */
-/**
- * \defgroup MsgDisp Functions which deal with the fetching and displaying of messages.
- * \ingroup WebcitDisplayItems
+ *
+ * Functions which deal with the fetching and displaying of messages.
*
*/
-/*@{*/
+
#include "webcit.h"
#include "webserver.h"
#include "groupdav.h"
return;
}
-#ifdef WEBCIT_WITH_CALENDAR_SERVICE
- /**
+ /*
* Are we perhaps in a calendar room? If so, then an "enter
* message" command really means "add new calendar item."
*/
return;
}
- /**
+ /*
* Are we perhaps in a tasks view? If so, then an "enter
* message" command really means "add new task."
*/
display_edit_task();
return;
}
-#endif
- /**
+ /*
* Otherwise proceed normally.
* Do a custom room banner with no navbar...
*/
serv_puts("MSGP text/html|text/plain");
serv_getln(buf, sizeof buf);
-#ifdef WEBCIT_WITH_CALENDAR_SERVICE
- /**
+ /*
* Tell the server that when we save a calendar event, we
* want invitations to be generated by the Citadel server
* instead of by the client.
*/
serv_puts("ICAL sgi|1");
serv_getln(buf, sizeof buf);
-#endif
/** Now ask the server to tell us a little bit about itself... */
serv_puts("INFO");
/*
* $Id$
+ *
+ * Administrative screen for site-wide configuration
*/
-/**
- * \defgroup AdminConfig Administrative screen for site-wide configuration
- * \ingroup CitadelConfig
- */
-/*@{*/
+
#include "webcit.h"
#include "webserver.h"
-/**
+/*
* \brief display all configuration items
*/
void display_siteconfig(void)
if (strlen(buf) == 0) {
strcpy(buf, "UTC");
}
-#ifdef WEBCIT_WITH_CALENDAR_SERVICE
sprintf(&general[strlen(general)], "<TR><TD>");
sprintf(&general[strlen(general)], _("Default timezone for unzoned calendar items"));
sprintf(&general[strlen(general)], "</TD><TD>");
sprintf(&general[strlen(general)], "</select>");
sprintf(&general[strlen(general)], "</TD></TR>\n");
-#else /* WEBCIT_WITH_CALENDAR_SERVICE */
- wprintf("<input type=\"hidden\" name=\"c_default_cal_zone\" value=\"%s\">\n", buf);
-#endif /* WEBCIT_WITH_CALENDAR_SERVICE */
break;
case 50:
sprintf(&network[strlen(network)], "<TR><TD>");
/*
* $Id$
+ *
+ * Displays the "Summary Page"
*/
-/**
- * \defgroup SymaryFuncs Displays the "Summary Page"
- * \ingroup WebcitDisplayItems
- */
-/*@{*/
+
#include "webcit.h"
-/**
- * \brief Display today's date in a friendly format
+/*
+ * Display today's date in a friendly format
*/
void output_date(void) {
struct tm tm;
* \brief Task list section
*/
void tasks_section(void) {
-#ifdef WEBCIT_WITH_CALENDAR_SERVICE
int num_msgs = 0;
int i;
-#endif
-#ifdef WEBCIT_WITH_CALENDAR_SERVICE
gotoroom("_TASKS_");
if (WC->wc_view != VIEW_TASKS) {
num_msgs = 0;
}
calendar_summary_view();
-
-#else /* WEBCIT_WITH_CALENDAR_SERVICE */
- wprintf("<i>");
- wprintf(_("(This server does not support task lists)"));
- wprintf("</i>\n");
-#endif /* WEBCIT_WITH_CALENDAR_SERVICE */
}
* \brief Calendar section
*/
void calendar_section(void) {
-#ifdef WEBCIT_WITH_CALENDAR_SERVICE
int num_msgs = 0;
int i;
-#endif
-#ifdef WEBCIT_WITH_CALENDAR_SERVICE
gotoroom("_CALENDAR_");
if ( (WC->wc_view != VIEW_CALENDAR) && (WC->wc_view != VIEW_CALBRIEF) ) {
num_msgs = 0;
}
calendar_summary_view();
}
-
-#else /* WEBCIT_WITH_CALENDAR_SERVICE */
- wprintf("<i>");
- wprintf(_("(This server does not support calendars)"));
- wprintf("</i>\n");
-#endif /* WEBCIT_WITH_CALENDAR_SERVICE */
}
/**
/*
* $Id$
- */
-/**
- * \defgroup MainServer This is the main transaction loop of the web service. It maintains a
+ *
+ * This is the main transaction loop of the web service. It maintains a
* persistent session to the Citadel server, handling HTTP WebCit requests as
* they arrive and presenting a user interface.
- * \ingroup WebcitHttpServer
*/
-/*@{*/
+
#include "webcit.h"
#include "groupdav.h"
#include "webserver.h"
#include <stdio.h>
#include <stdarg.h>
-/**
+/*
* String to unset the cookie.
* Any date "in the past" will work, so I chose my birthday, right down to
* the exact minute. :)
do_listsub();
goto SKIP_ALL_THIS_CRAP;
}
-#ifdef WEBCIT_WITH_CALENDAR_SERVICE
if (!strcasecmp(action, "freebusy")) {
do_freebusy(cmd);
goto SKIP_ALL_THIS_CRAP;
}
-#endif
/**
* If we're not logged in, but we have HTTP Authentication data,
display_floorconfig(NULL);
} else if (!strcasecmp(action, "toggle_self_service")) {
toggle_self_service();
-#ifdef WEBCIT_WITH_CALENDAR_SERVICE
} else if (!strcasecmp(action, "display_edit_task")) {
display_edit_task();
} else if (!strcasecmp(action, "save_task")) {
respond_to_request();
} else if (!strcasecmp(action, "handle_rsvp")) {
handle_rsvp();
-#endif
} else if (!strcasecmp(action, "summary")) {
summary();
} else if (!strcasecmp(action, "summary_inner_div")) {
char this_page[512]; /**< URL of current page */
char http_host[512]; /**< HTTP Host: header */
HashList *hash_prefs; /**< WebCit preferences for this user */
-#ifdef WEBCIT_WITH_CALENDAR_SERVICE
- /** \brief ical???? */
struct disp_cal {
icalcomponent *cal; /**< cal items for display */
long cal_msgnum; /**< cal msgids for display */
int unread; /**< already seen by the user? */
} *disp_cal;
int num_cal; /**< number of calendar items for display */
-#endif
struct wc_attachment *first_attachment; /**< linked list of attachments for 'enter message' */
char last_chat_user[256]; /**< ??? todo */
char ImportantMessage[SIZ]; /**< ??? todo */
void download_file(char *);
void upload_file(void);
-#ifdef WEBCIT_WITH_CALENDAR_SERVICE
void display_edit_task(void);
void save_task(void);
void display_edit_event(void);
struct icaltimetype t2start,
struct icaltimetype t2end
);
-#endif
#ifdef ENABLE_NLS
void initialize_locales(void);
sleeeeeeeeeep(1); // wait so some others might finish...
lprintf(2, "master shutdown: cleaning up sessions\n");
do_housekeeping();
-#ifdef WEBCIT_WITH_CALENDAR_SERVICE
lprintf(2, "master shutdown: cleaning up libical\n");
free_zone_directory ();
icaltimezone_release_zone_tab ();
icalmemory_free_ring ();
-#endif
lprintf(2, "master shutdown exiting!.\n");
exit(0);
}