Whats NewOctober 5, 2002A new release (1.9) which includes a number of bug fixes plus new callbacks for SSL Certificate management and client certificate management. The DAVLib source code is available via anonymous CVS in a repository hosted at SourceForge.net. OverviewThis library abstracts WebDAV client functionality into a simple object mode. It encapsulates many specifics of the WebDAV protocol and instead exposes a set of C++ classes which can be used for web site content management. Handling of XML documents which are passed as part of the DAV protocol is also handled internally to the library. UsageThere are 2 parts to DAVLib; lower level classes that directly implement HTTP/1.1, RFC2518 (WebDAV) and XML parsing, and higher level classes that expose DAV servers in an object model. On MacOS, the lower level classes are designed to be plug-in replacements for the Internet Networking classes found in Metrowerks PowerPlant. They are styled and modeled after those classes, and expose HTTP as a simple API that works on message objects and that populates response objects. The main classes in the higher level portions of the library are CDAVContext and CDAVRequest. CDAVContext defines the parameters required to contact a DAV server, such as server host name, port, user authentication and proxying information. CDAVRequest is the class that executes the transactions with a DAV server. This is where all of the high level operations (such as listDirectory, FindAllProperties, DeleteResource, etc) are defined. Various object types that returned; this object model abstracts out XML processing inherent in WebDAV and exposes a clean object oriented interface to a DAV repository. Assuming that a CDAVRequest object (req) is in the scope of this code, here is a sample snippet of code: CDAVItemVector kids; CDAVPropertyVector props; LStr255 theResource = "/dav"; props.push_back(new CDAVProperty("http://www.webdav.org/goliath", "CreaterOSType")); if (CDAVRequest::SUCCESS == req->ListDirectory(aThread, theResource, kids, props)) { //operate on the returned vector of DAV items CDAVItemVector::iterator iter = kids.begin(); while (iter != kids.end()) { _displayCDAVItemInUI(iter); iter++; } } else { //handle the error gracefully.... _displayErrorDialog(); } Note that this library uses STL and most of the data types are templated. DocumentationHeaderDoc generated HTML documentation for DAVLib can be found here DownloadThe latest version (1.9) of these classes can be found here (approximately 408 kb Stuff-It archive). CodeWarrior Pro 7.1 or greater is required to build this library. An archive of older releases can be found here. DAV Example ApplicationAn example application that uses the low level RFC2518 clases in DAVLib (and can be used for DAV exploration and testing) can be found at http://www.webdav.org/goliath/davexample.html Goliath Mailing ListA mailing list has been created to discuss Goliath/DAVLib specifically and WebDAV on the Mac in general. Information about this mailing list can be found at http://mailman.lyra.org/mailman/listinfo/goliath LicenseThese classes are protected under the GNU General Public License, version 2.0. Contact the author to negotiate alternate licensing terms. Known IssuesNone. Contact InformationYou can contact the author by e-mail at [email protected] Please report any defects discovered in this software. |
|
CVS services hosted by SourceForge.net
(c)1999-2002, Thomas Bednarz. All Rights Reserved
Last updated on 10/04/2002