public:
CDAVRequest(class CDAVContext *ctx);
Constructs a CDAVRequest to operate against a particular DAV server.
public:
CDAVRequest(CDAVRequest &req);
copy constructor
public:
void CancelTransaction();
Cancel the current transaction; currently only works for PutResource and GetResource
public:
ReqStatus CopyResource(LThread& inThread, ConstStr255Param source, ConstStr255Param destination, DAVTypes::Overwrite overwrite = DAVTypes::F, Boolean propsOnly = false, LListener *listener = NULL);
copy the contents of a resource. If the resource is a collection, the members of the
collection are copied recursively by default.
Result: One of the enum ReqStatus
Name Description inThread the Thread performing the transaction source the original resource destination the destination of the resource copy. Must be fully qualified with protocol, host, etc, and already URL encoded. overwrite if set to DAVTypes::T, will overwrite a pre-existing resource. Defaulted to DAVTypes::F propsOnly if set to TRUE, only the directory is created and properties are copied. no recursive copy. Defaulted to false listener a listener on the event, defaulted to NULL
public:
ReqStatus CreateDirectory(LThread& inThread, ConstStr255Param resource, const char* lockToken = NULL, LListener *listener = NULL);
Create a new collection on the DAV server
Result: One of the enum ReqStatus
Name Description inThread the Thread performing the transaction resource a resource specifying the location of the new collection lockToken a lock token for the parent of the new collection. If NULL no If header is sent. Defaulted to NULL listener a listener on the event, defaulted to NULL
public:
ReqStatus DeleteResource(LThread& inThread, ConstStr255Param resource, LListener *listener = NULL);
Remove a resource from the DAV server
Result: One of the enum ReqStatus
Name Description inThread the Thread performing the transaction resource the resource in question listener a listener on the event, defaulted to NULL
public:
ReqStatus DeleteResource(LThread& inThread, CDAVItem& item, const char* lockToken=NULL, const char* pntLockToken=NULL, LListener *listener = NULL);
Remove a resource from the DAV server; if there is a lock owned by the current
user, the opaquelocktoken is sent to the server
Result: One of the enum ReqStatus
Name Description inThread the Thread performing the transaction item the item to be deleted in question lockToken an optional Lock Token for resource specified by item. Can be NULL (no lock will be sent to server) pntLockToken an optional Lock Token for immedate parent of the resource specified by item. Can be NULL (no lock will be sent to server) listener a listener on the event, defaulted to NULL
public:
static Boolean DynBufferToFile(LDynamicBuffer *outBuf, LFile& outFile);
There is a bug in the function LDynamicBuffer::BufferToFile in the
version of PowerPlant that shipped with CW5 where the resulting file
is zero length if the buffer in the LDynamicBuffer object is a file
and not a handle. This function reimplemts that function and fixes the defect.
public:
ReqStatus FindAllProperties(LThread& inThread, ConstStr255Param resource, CDAVPropertyVector &props, LListener *listener = NULL);
Retrieve all known property definitions for a resource
Result: One of the enum ReqStatus
Name Description inThread the Thread performing the transaction resource the resource in question props reference to return the property definitions listener a listener on the event, defaulted to NULL
public:
ReqStatus GetItemProperties(LThread& inThread, CDAVItem &resource, CDAVPropertyVector &props, LListener *listener=NULL);
For a given item, retrieve the specified set of properties
Result: One of the enum ReqStatus
Name Description resource the resource in question props list of properties to retrieve listener a listener on the event, defaulted to NULL
public:
SInt32 GetLastResponse() {return mLastResponse;};
Returns the HTTP response code from the last request operation.
public:
ReqStatus GetResource(LThread& inThread, ConstStr255Param resource, const FSSpec &outputSpec, LListener *listener = NULL);
downloads a resource on the DAV server to an FSSpec
Result: One of the enum ReqStatus
Name Description inThread the Thread performing the transaction resource the resource to download outputSpec the FSSpec specifying the resource's destination listener a listener on the event, defaulted to NULL
public:
ReqStatus GetResourceExists(LThread& inThread, ConstStr255Param resource, Boolean& outExists, LListener *listener=NULL);
Query server to see if a resource exists. Implemented as a propfind.
Result: One of the enum ReqStatus
Name Description inThread the Thread performing the transaction resource the resource in question outExists output parameter listener a listener on the event, defaulted to NULL
public:
ReqStatus GetServerOptions(LThread& inThread, ConstStr255Param resource, CDAVInfo &outOptions, Boolean showDlog=false, LListener *listener = NULL);
Query a server to determine if it supports various DAV and DASL operations
Result: One of the enum ReqStatus
Name Description inThread the thread performing the operation resource the resource in question outOptions a reference to a CDAVOptions object; output parameter showDlog show a dialog on error, defaulted to false listener a listener on the event, defaulted to NULL
public:
ReqStatus ListDirectory(LThread& inThread, ConstStr255Param resource, CDAVItemVector &children, CDAVPropertyVector &props, class LListener *listener=NULL, DAVTypes::PropertyDepth depth = DAVTypes::ONE );
get the contents of a collection
Result: One of the enum ReqStatus
Name Description inThread the Thread performing the transaction resource the resource in question children reference to return the collection members props list of properties to retrieve listener a listener on the event, defaulted to NULL
public:
ReqStatus ListLocks(LThread& inThread, ConstStr255Param resource, LListener *listener = NULL);
list all locks under a resource
Result: One of the enum ReqStatus
Name Description inThread the Thread performing the transaction resource the resource in question listener a listener on the event, defaulted to NULL
public:
ReqStatus LockResource(LThread& inThread, CDAVItem &item, CDAVItem::LockScope lockScope, const char* owner=NULL, SInt32 timeout_seconds=0, CDAVItem::LockType lockType = CDAVItem::WRITE, LListener *listener = NULL);
Given an item, create a lock for the specified resource. Implies a Depth of Zero
Result: One of the enum ReqStatus
Name Description inThread the Thread performing the transaction item the resource to be locked lockScope the scope of the lock (exclusive or shared) timeout_seconds number of seconds until lock times out. If this is set to 0, then Infinite is requested. Note that according to the DAV standard, a server is not required to honor this request. Default is 0. owner a href to optionally identify the lock owner. This may be NULL. default is NULL. lockType the type of the lock. At this time, DAV only specifies a WRITE lock, hence the default value or WRITE listener a listener on the event, defaulted to NULL
public:
ReqStatus MoveResource(LThread& inThread, ConstStr255Param source , ConstStr255Param destination, DAVTypes::Overwrite overwrite = DAVTypes::F, LListener *listener = NULL);
moves the contents of a resource. If the resource is a collection, the members of the
collection are moved recursively.
Result: One of the enum ReqStatus
Name Description inThread the Thread performing the transaction source the original resource destination the destination of the resource copy. Must be fully qualified with protocol, host, etc. overwrite if set to DAVTypes::T, will overwrite a pre-existing resource. Defaulted to DAVTypes::F listener a listener on the event, defaulted to NULL
public:
ReqStatus PutResource(LThread& inThread, ConstStr255Param destination, const FSSpec &inputSpec, const char* locktoken = NULL, const char* pntLockToken = NULL, Boolean *itemCreated=NULL, LListener *listener=NULL);
uploads a FSSpec to location specified on the DAV server
Result: One of the enum ReqStatus
Name Description inThread the Thread performing the transaction destination the destination of the file inputSpec the FSSpec to upload locktoken a Lock token to optionally use when uploading the file. Can be NULL pntLockToken a Lock token on the parent URI to optionally use when uploading the file. Can be NULL. Defaulted to NULL. itemCreated if a new resource was created as part of this transaction, this is set to true; otherwise (on an HTTP 204), it's set to false. Can be NULL. Defaulted to NULL. listener a listener on the event, defaulted to NULL
public:
ReqStatus RemoveItemProperty(LThread& inThread, CDAVItem &resource, CDAVProperty &prop, LListener *listener=NULL);
For a given item, set the specified set of property
Result: One of the enum ReqStatus
Name Description resource the resource in question prop the propertiy to set listener a listener on the event, defaulted to NULL
public:
ReqStatus SetItemProperty(LThread& inThread, CDAVItem &resource, CDAVProperty &prop, std::string &propVal, LListener *listener=NULL);
For a given item, set the specified set of property
Result: One of the enum ReqStatus
Name Description resource the resource in question prop the propertiy to set propVal the property's value; must be PCDATA or well formed XML listener a listener on the event, defaulted to NULL
public:
ReqStatus UnlockResource(LThread& inThread, const char* uri, const char* lockToken, LListener *listener = NULL);
Result: One of the enum ReqStatus
Name Description inThread the Thread performing the transaction uri the resource to be unlocked lockToken the lock token for the specified URL. listener a listener on the event, defaulted to NULL
public:
ReqStatus UnlockResource(LThread& inThread, CDAVItem &item, LListener *listener = NULL);
Result: One of the enum ReqStatus
Name Description inThread the Thread performing the transaction item the item to unlock. listener a listener on the event, defaulted to NULL
public:
virtual ~CDAVRequest();
Destructor
© 1999-2000, Thomas Bednarz, Jr. (Last Updated 7/16/2000)