}
+// DAV move or copy an object in a room.
+void dav_move_or_copy_message(struct http_transaction *h, struct ctdlsession *c, long msgnum, int move_or_copy) {
+ do_404(h);
+}
+
+
// GET method directly on a message in a room
void dav_get_message(struct http_transaction *h, struct ctdlsession *c, long msgnum) {
char buf[1024];
dav_put_message(h, c, unescaped_euid, msgnum);
}
else if (!strcasecmp(h->method, "MOVE")) {
- do_404(h); // FIXME write this
+ dav_move_or_copy_message(h, c, msgnum, DAV_MOVE);
}
else if (!strcasecmp(h->method, "COPY")) {
- do_404(h); // FIXME write this
+ dav_move_or_copy_message(h, c, msgnum, DAV_COPY);
}
else {
do_404(h); // Got this far but the method made no sense? Bummer.
WEBSERVER_UDS
};
+enum {
+ DAV_MOVE,
+ DAV_COPY
+};
+
#define TRACE syslog(LOG_DEBUG, "\033[3%dmCHECKPOINT: %s:%d\033[0m", ((__LINE__%6)+1), __FILE__, __LINE__)
#define SLEEPING 180 // TCP connection timeout
#define MAX_WORKER_THREADS 32 // Maximum number of worker threads permitted to exist
void dav_delete_message(struct http_transaction *h, struct ctdlsession *c, long msgnum);
void dav_get_message(struct http_transaction *h, struct ctdlsession *c, long msgnum);
void dav_put_message(struct http_transaction *h, struct ctdlsession *c, char *euid, long old_msgnum);
+void dav_move_or_copy_message(struct http_transaction *h, struct ctdlsession *c, long msgnum, int move_or_copy);
ssize_t ctdl_write(struct ctdlsession *ctdl, const void *buf, size_t count);
int login_to_citadel(struct ctdlsession *c, char *auth, char *resultbuf);
StrBuf *ctdl_readtextmsg(struct ctdlsession *ctdl);