*/
#define VCARD_EXT_FORMAT "Citadel vCard: personal card for %s at %s"
+/*
+ * Citadel will accept either text/vcard or text/x-vcard as the MIME type
+ * for a vCard. The following definition determines which one it *generates*
+ * when serializing.
+ */
+#define VCARD_MIME_TYPE "text/x-vcard"
#include "sysdep.h"
#include <stdlib.h>
#include <limits.h>
#include "citadel.h"
#include "server.h"
-#include "sysdep_decls.h"
#include "citserver.h"
#include "support.h"
#include "config.h"
#include "control.h"
-#include "serv_extensions.h"
#include "room_ops.h"
#include "user_ops.h"
#include "policy.h"
#include "serv_ldap.h"
#include "serv_vcard.h"
+
+#include "ctdl_module.h"
+
+
+
/*
* set global flag calling for an aide to validate new users
*/
if (ser != NULL) {
msg->cm_fields['M'] = realloc(msg->cm_fields['M'], strlen(ser) + 1024);
sprintf(msg->cm_fields['M'],
- "Content-type: text/vcard"
+ "Content-type: " VCARD_MIME_TYPE
"\r\n\r\n%s\r\n", ser);
free(ser);
}
* is going to notice what we're trying to do, and delete the old vCard.
*/
CtdlWriteObject(USERCONFIGROOM, /* which room */
- "text/vcard", /* MIME type */
+ VCARD_MIME_TYPE,/* MIME type */
temp, /* temp file */
u, /* which user */
0, /* not binary */
extract_token(buf, adr, 6, ';', sizeof buf);
cprintf("%s\n", buf); /* country */
cprintf("000\n");
+ vcard_free(v);
}
if (ser != NULL) {
vmsg->cm_fields['M'] = malloc(strlen(ser) + 1024);
sprintf(vmsg->cm_fields['M'],
- "Content-type: text/vcard"
+ "Content-type: " VCARD_MIME_TYPE
"\r\n\r\n%s\r\n", ser);
free(ser);
}
}
-char *serv_postfix_tcpdict(void)
-{
- CtdlRegisterServiceHook(config.c_pftcpdict_port, /* Postfix */
- NULL,
- check_get_greeting,
- check_get,
- NULL);
- return "$Id$";
-}
-
-char *serv_vcard_init(void)
+CTDL_MODULE_INIT(vcard)
{
struct ctdlroom qr;
char filename[256];
chown(filename, CTDLUID, (-1));
}
+ /* for postfix tcpdict */
+ CtdlRegisterServiceHook(config.c_pftcpdict_port, /* Postfix */
+ NULL,
+ check_get_greeting,
+ check_get,
+ NULL);
+
+ /* return our Subversion id for the Log */
return "$Id$";
}