summaryrefslogtreecommitdiff
path: root/src/ne_basic.h
diff options
context:
space:
mode:
authorjoe <joe@61a7d7f5-40b7-0310-9c16-bb0ea8cb1845>2008-02-07 22:22:07 +0000
committerjoe <joe@61a7d7f5-40b7-0310-9c16-bb0ea8cb1845>2008-02-07 22:22:07 +0000
commit29da39d22df564bb06a3e924d6156c25ca19fa5a (patch)
tree3fa4626c360855b3b03681b8c53c85d8bd2fedcd /src/ne_basic.h
parent7f31496b0dad7edd8cb9127aaf501bdca5fefdaf (diff)
downloadneon-29da39d22df564bb06a3e924d6156c25ca19fa5a.tar.gz
* src/ne_basic.h: Deprecate ne_options API. Add NE_CAP_* constants,
ne_options2 prototype. * src/ne_basic.c (options_map): Add options mapping table. (parse_dav_header): Adjust to use mapping table and capabilities bitmask. (ne_options2): New function; renamed from ne_options. (ne_options): Re-implement on top of ne_options2. git-svn-id: http://svn.webdav.org/repos/projects/neon/trunk@1338 61a7d7f5-40b7-0310-9c16-bb0ea8cb1845
Diffstat (limited to 'src/ne_basic.h')
-rw-r--r--src/ne_basic.h31
1 files changed, 26 insertions, 5 deletions
diff --git a/src/ne_basic.h b/src/ne_basic.h
index 0dce6cf..5e97b10 100644
--- a/src/ne_basic.h
+++ b/src/ne_basic.h
@@ -1,6 +1,6 @@
/*
HTTP/1.1 methods
- Copyright (C) 1999-2006, Joe Orton <joe@manyfish.co.uk>
+ Copyright (C) 1999-2008, Joe Orton <joe@manyfish.co.uk>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
@@ -85,7 +85,7 @@ typedef struct {
* Returns non-zero on error, in which case *ctype is not altered. */
int ne_get_content_type(ne_request *req, ne_content_type *ctype);
-/* Server capabilities: */
+/* DEPRECATED: Server capabilities. */
typedef struct {
unsigned int dav_class1; /* True if Class 1 WebDAV server */
unsigned int dav_class2; /* True if Class 2 WebDAV server */
@@ -93,10 +93,31 @@ typedef struct {
* property a. la. mod_dav */
} ne_server_capabilities;
-/* Determines server capabilities (using OPTIONS). Pass 'path' as "*"
- * to determine proxy server capabilities if using a proxy server. */
+/* DEPRECATED: Determines server capabilities (using OPTIONS). */
int ne_options(ne_session *sess, const char *path,
- ne_server_capabilities *caps);
+ ne_server_capabilities *caps);
+
+#define NE_CAP_DAV_CLASS1 (0x0001) /* Class 1 WebDAV (RFC 2518) */
+#define NE_CAP_DAV_CLASS2 (0x0002) /* Class 2 WebDAV (RFC 2518) */
+#define NE_CAP_DAV_CLASS3 (0x0004) /* Class 3 WebDAV (RFC 4918) */
+#define NE_CAP_MODDAV_EXEC (0x0008) /* mod_dav "executable" property */
+#define NE_CAP_DAV_ACL (0x0010) /* WebDAV ACL (RFC 3744) */
+#define NE_CAP_VER_CONTROL (0x0020) /* DeltaV version-control */
+#define NE_CAP_CO_IN_PLACE (0x0040) /* DeltaV checkout-in-place */
+#define NE_CAP_VER_HISTORY (0x0080) /* DeltaV version-history */
+#define NE_CAP_WORKSPACE (0x0100) /* DeltaV workspace */
+#define NE_CAP_UPDATE (0x0200) /* DeltaV update */
+#define NE_CAP_LABEL (0x0400) /* DeltaV label */
+#define NE_CAP_WORK_RESOURCE (0x0800) /* DeltaV working-resouce */
+#define NE_CAP_MERGE (0x1000) /* DeltaV merge */
+#define NE_CAP_BASELINE (0x2000) /* DeltaV baseline */
+#define NE_CAP_ACTIVITY (0x4000) /* DeltaV activity */
+#define NE_CAP_VC_COLLECTION (0x8000) /* DeltaV version-controlled-collection */
+
+/* Determines resource capailities, using an OPTIONS request. On
+ * return, *caps is set to a bit-mask of the above NE_CAP_* constants
+ * describing the advertised resource capabilities. */
+int ne_options2(ne_session *sess, const char *path, unsigned int *caps);
/* Defines a range of bytes, starting at 'start' and ending
* at 'end'. 'total' is the number of bytes in the range.