lock-caldav-object.c File Reference

#include "lock-caldav-object.h"
#include "options-caldav-server.h"
#include <glib.h>
#include <curl/curl.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

Functions

gchar * caldav_lock_object (gchar *URI, caldav_settings *settings, caldav_error *error)
 Function which requests a lock on a calendar resource.
gboolean caldav_unlock_object (gchar *lock_token, gchar *URI, caldav_settings *settings, caldav_error *error)
 Function which requests to have a lock removed from a calendar resource.
gboolean caldav_lock_support (caldav_settings *settings, caldav_error *error)
 Function to test whether the server supports locking or not.

Variables

static char * lock_query
 A static literal string containing the lock query.

Function Documentation

gchar* caldav_lock_object ( gchar *  URI,
caldav_settings settings,
caldav_error error 
)

Function which requests a lock on a calendar resource.

Parameters:
URI The resource to request lock on.
settings 
See also:
caldav_settings
Parameters:
error A pointer to caldav_error.
See also:
caldav_error
Returns:
The Lock-Token or NULL in case of error

gboolean caldav_lock_support ( caldav_settings settings,
caldav_error error 
)

Function to test whether the server supports locking or not.

Searching for PROP LOCK. If LOCK is present then according to RFC4791 PROP UNLOCK must also be present.

Parameters:
settings 
See also:
caldav_settings
Parameters:
error A pointer to caldav_error.
See also:
caldav_error
Returns:
True if locking is supported by the server. False otherwise

gboolean caldav_unlock_object ( gchar *  lock_token,
gchar *  URI,
caldav_settings settings,
caldav_error error 
)

Function which requests to have a lock removed from a calendar resource.

Parameters:
lock_token A privious aquired Lock-Token
URI The resource to request unlock on.
settings 
See also:
caldav_settings
Parameters:
error A pointer to caldav_error.
See also:
caldav_error
Returns:
False in case the lock could not be removed. True otherwise.


Variable Documentation

char* lock_query [static]

Initial value:

"<?xml version=\"1.0\" encoding=\"utf-8\" ?>"
"<D:lockinfo xmlns:D=\"DAV:\">"
"  <D:lockscope><D:exclusive/></D:lockscope>"
"  <D:locktype><D:write/></D:locktype>"
"</D:lockinfo>"
A static literal string containing the lock query.


Generated on Tue Apr 8 00:29:58 2008 for libcaldav-0.3.0 by  doxygen 1.5.5