|
Barracuda Application Server C/C++ Reference
Native APIs, integration guides, and platform interfaces
|

Go to the source code of this file.
Classes | |
| struct | WebDAV |
| The WebDAV plugin implements WebDAV version 1, as specified in RFC2518 and part of the locking in DAV 2, making it interoperate with "drive" clients requiring locking. More... | |
| struct | WebDAVLockMgr |
| Input/output record for WebDAV_lockmgr(). More... | |
Macros | |
| #define | WebDAV_setAuthenticator(o, authenticator, realm) HttpDir_setAuthenticator((HttpDir*)o, authenticator, realm) |
| Configure inherited authentication and authorization. More... | |
Typedefs | |
| typedef WebDAV | WebDAV |
| The WebDAV plugin implements WebDAV version 1, as specified in RFC2518 and part of the locking in DAV 2, making it interoperate with "drive" clients requiring locking. More... | |
Functions | |
| BA_API void | WebDAV_constructor (WebDAV *o, IoIntf *io, int maxUploads, const char *dirName, const char *lockDir, U32 maxNumberOfLocks, AllocatorIntf *alloc, S8 priority) |
| Create a WebDAV instance. More... | |
| BA_API void | WebDAV_destructor (WebDAV *o) |
| Terminate the WebDAV object. More... | |
| BA_API int | WebDAV_lockmgr (WebDAV *o, WebDAVLockMgr *mgr) |
| Manage WebDAV locks without an HTTP request. More... | |
| #define WebDAV_setAuthenticator | ( | o, | |
| authenticator, | |||
| realm | |||
| ) | HttpDir_setAuthenticator((HttpDir*)o, authenticator, realm) |
Configure inherited authentication and authorization.
| o | Required initialized WebDAV instance. |
| authenticator | Borrowed AuthenticatorIntf pointer, or NULL. |
| realm | Borrowed AuthorizerIntf pointer, or NULL; the historical macro name does not describe a realm string. See HttpDir::setAuthenticator. |
The WebDAV plugin implements WebDAV version 1, as specified in RFC2518 and part of the locking in DAV 2, making it interoperate with "drive" clients requiring locking.
The purpose of the WebDAV plugin is to make it possible to use the server as a remote disk. The locking in DAV 2 is partly implemented in order to make it interoperate with "drive" clients requiring locking. A "drive" client such as davfs2 can then be mounted as a drive.
Some filesystem clients require locking for writable access. The WebDAV plugin needs to store the locking information in files on the file system. The "lockDir" argument in the constructor must point to an existing directory or to an existing parent directory. The WebDAV plugin attempts to create this directory if it does not exist and marks it as hidden for file systems supporting hidden files.
Not all clients require locking. For example, Web Folders work without locking. You can set the "lockDir" argument to NULL if you do not want to support the simple locking implemented in the WebDAV plugin. As an example, Mac OS X will mount the drive as read only.
The simple locking implemented in the WebDAV plugin also requires a dynamic object per active lock. The maxNumberOfLocks constructor argument controls how many concurrent locks the server allows. For example, this can be set to 2-4 for a standard embedded system.
The WebDAV plugin creates a subdirectory ".DAV" if a client sends a "set <a href="http://greenbytes.de/tech/webdav/rfc2518.html#rfc.iref.8"> dead property</a> request". This sub directory contains XML files for storing the dead properties. The .DAV directory is only created if the client creates dead properties. The .DAV directory will be marked as hidden for file systems supporting hidden files.
| BA_API void WebDAV_constructor | ( | WebDAV * | o, |
| IoIntf * | io, | ||
| int | maxUploads, | ||
| const char * | dirName, | ||
| const char * | lockDir, | ||
| U32 | maxNumberOfLocks, | ||
| AllocatorIntf * | alloc, | ||
| S8 | priority | ||
| ) |
Create a WebDAV instance.
You can create several instances of this class and install several instances into the virtual file system.
| io | Required borrowed IoIntf implementation, which must outlive the WebDAV instance and all active transfers. For example, DiskIo. The WebDAV plugin can also work with "read only" IoIntf implementations such as the ZipIo. The WebDAV plugin allows method OPTIONS, HEAD, GET, and PROPFIND for a "read only" IoIntf implementation. |
| maxUploads | Maximum concurrent asynchronous uploads. Values less than or equal to zero are coerced to 1, matching HttpResMgr. This limits simultaneous requests, not uploaded bytes. It does not limit downloads. |
| dirName | Borrowed HttpDir name; retain its storage while installed. NULL creates an unnamed directory according to HttpDir rules. |
| lockDir | NUL-terminated lock-directory path relative to io, copied during construction. NULL disables locking. A missing directory is created when possible; read-only filesystems disable locking. Setup failure also leaves locking unavailable; this void constructor does not return that error. |
| maxNumberOfLocks | Maximum simultaneous locks, default 10. Zero disables locking. Requires a usable lockDir. |
| alloc | Borrowed allocator for internal allocation/reallocation/free; NULL selects AllocatorIntf_getDefault(). Retain it through destruction. |
| priority | Signed 8-bit HttpDir priority, default zero. |
| o | Required storage to initialize. |
| BA_API void WebDAV_destructor | ( | WebDAV * | o | ) |
| BA_API int WebDAV_lockmgr | ( | WebDAV * | o, |
| WebDAVLockMgr * | mgr | ||
| ) |
Manage WebDAV locks without an HTTP request.
| o | Required initialized WebDAV instance. |
| mgr | Required input/output record; initialize the fields for its action. |