#include <glib.h>#include <stdlib.h>#include <curl/curl.h>#include "caldav.h"Data Structures | |
| struct | _CALDAV_SETTINGS |
| A struct used to exchange all user input between various parts of the library. More... | |
| struct | MemoryStruct |
| Used to hold messages between the CalDAV server and the library. More... | |
| struct | config_data |
| Used to exchange user options to the library. More... | |
Typedefs | |
| typedef struct _CALDAV_SETTINGS | caldav_settings |
| A pointer to a struct _CALDAV_SETTINGS. | |
| typedef struct MemoryStruct | memory_ptr |
| A pointer to a struct MemoryStruct. | |
Functions | |
| void | dump (const char *text, FILE *stream, unsigned char *ptr, size_t size, char nohex) |
| This function is burrowed from the libcurl documentation. | |
| int | my_trace (CURL *handle, curl_infotype type, unsigned char *data, size_t size, void *userp) |
| This function is burrowed from the libcurl documentation. | |
| size_t | WriteMemoryCallback (void *ptr, size_t size, size_t nmemb, void *data) |
| This function is burrowed from the libcurl documentation. | |
| size_t | WriteHeaderCallback (void *ptr, size_t size, size_t nmemb, void *data) |
| This function is burrowed from the libcurl documentation. | |
| void | init_caldav_settings (caldav_settings *settings) |
| Initialize caldav settings structure. | |
| void | free_caldav_settings (caldav_settings *settings) |
| Free momory assigned to caldav settings structure. | |
| void | parse_url (caldav_settings *settings, const char *url) |
| Parse URL. | |
| gchar * | get_response_header (const char *header, gchar *headers, gboolean lowcase) |
| Find a specific HTTP header from last request. | |
| gchar * | parse_caldav_report (char *report, const char *element, const char *type) |
| Parse response from CalDAV server. | |
| gchar * | get_caldav_datetime (time_t *time) |
| Convert a time_t variable to CalDAV DateTime. | |
| gchar * | random_file_name (gchar *text) |
| Create a random text string, using MD5. | |
| gchar * | verify_uid (gchar *object) |
| Does the event contain a UID element or not. | |
| gchar * | get_url (gchar *text) |
| Fetch a URL from a XML element. | |
| gchar * | get_host (gchar *url) |
| Fetch host from URL. | |
| gchar * | get_etag (gchar *text) |
| Fetch the etag element from XML. | |
| gchar * | get_tag (const gchar *tag, gchar *text) |
| Fetch any element from XML. | |
| struct _CALDAV_SETTINGS caldav_settings |
A pointer to a struct _CALDAV_SETTINGS.
| struct MemoryStruct memory_ptr |
A pointer to a struct MemoryStruct.
| void dump | ( | const char * | text, | |
| FILE * | stream, | |||
| unsigned char * | ptr, | |||
| size_t | size, | |||
| char | nohex | |||
| ) |
This function is burrowed from the libcurl documentation.
| text | ||
| stream | ||
| ptr | ||
| size | ||
| nohex |
| void free_caldav_settings | ( | caldav_settings * | settings | ) |
| gchar* get_caldav_datetime | ( | time_t * | time | ) |
Convert a time_t variable to CalDAV DateTime.
| time | a specific date and time |
| gchar* get_etag | ( | gchar * | text | ) |
Fetch the etag element from XML.
| text | String |
| gchar* get_host | ( | gchar * | url | ) |
Fetch host from URL.
| url | URL |
| gchar* get_response_header | ( | const char * | header, | |
| gchar * | headers, | |||
| gboolean | lowcase | |||
| ) |
Find a specific HTTP header from last request.
| header | HTTP header to search for | |
| headers | String of HTTP headers from last request | |
| lowcase | Should string be returned in all lower case. |
| gchar* get_tag | ( | const gchar * | tag, | |
| gchar * | text | |||
| ) |
Fetch any element from XML.
| text | String |
| text | String | |
| tag | The element to look for |
| gchar* get_url | ( | gchar * | text | ) |
Fetch a URL from a XML element.
| text | String |
| void init_caldav_settings | ( | caldav_settings * | settings | ) |
| int my_trace | ( | CURL * | handle, | |
| curl_infotype | type, | |||
| unsigned char * | data, | |||
| size_t | size, | |||
| void * | userp | |||
| ) |
This function is burrowed from the libcurl documentation.
| handle | ||
| type | ||
| data | ||
| size | ||
| userp |
| gchar* parse_caldav_report | ( | char * | report, | |
| const char * | element, | |||
| const char * | type | |||
| ) |
Parse response from CalDAV server.
| report | Response from server | |
| element | XML element to find | |
| type | VCalendar element to find |
| void parse_url | ( | caldav_settings * | settings, | |
| const char * | url | |||
| ) |
Parse URL.
| settings |
| url | String containing URL to collection |
| gchar* random_file_name | ( | gchar * | text | ) |
Create a random text string, using MD5.
| text | some text to randomize |
| gchar* verify_uid | ( | gchar * | object | ) |
Does the event contain a UID element or not.
If not add it.
| object | A specific event |
| size_t WriteHeaderCallback | ( | void * | ptr, | |
| size_t | size, | |||
| size_t | nmemb, | |||
| void * | data | |||
| ) |
This function is burrowed from the libcurl documentation.
| ptr | ||
| size | ||
| nmemb | ||
| data |
| size_t WriteMemoryCallback | ( | void * | ptr, | |
| size_t | size, | |||
| size_t | nmemb, | |||
| void * | data | |||
| ) |
This function is burrowed from the libcurl documentation.
| ptr | ||
| size |
| ptr | ||
| size | ||
| nmemb | ||
| data |
1.5.5