Asterisk - The Open Source Telephony Project  21.4.1
Data Structures | Functions | Variables
res_calendar_caldav.c File Reference

Resource for handling CalDAV calendars. More...

#include "asterisk.h"
#include <libical/ical.h>
#include <ne_session.h>
#include <ne_uri.h>
#include <ne_request.h>
#include <ne_auth.h>
#include <ne_redirect.h>
#include <libxml/xmlreader.h>
#include "asterisk/module.h"
#include "asterisk/channel.h"
#include "asterisk/calendar.h"
#include "asterisk/lock.h"
#include "asterisk/config.h"
#include "asterisk/astobj2.h"

Go to the source code of this file.

Data Structures

struct  caldav_pvt
 
struct  xmlstate
 

Functions

static void __reg_module (void)
 
static void __unreg_module (void)
 
struct ast_moduleAST_MODULE_SELF_SYM (void)
 
static int auth_credentials (void *userdata, const char *realm, int attempts, char *username, char *secret)
 
static void caldav_add_event (icalcomponent *comp, struct icaltime_span *span, void *data)
 
static void caldav_destructor (void *obj)
 
static struct ast_strcaldav_get_events_between (struct caldav_pvt *pvt, time_t start_time, time_t end_time)
 
static void * caldav_load_calendar (void *data)
 
static struct ast_strcaldav_request (struct caldav_pvt *pvt, const char *method, struct ast_str *req_body, struct ast_str *subdir, const char *content_type)
 
static int caldav_write_event (struct ast_calendar_event *event)
 
static int debug_response_handler (void *userdata, ne_request *req, const ne_status *st)
 
static int fetch_response_reader (void *data, const char *block, size_t len)
 
static void handle_characters (xmlTextReaderPtr reader, struct xmlstate *state)
 
static void handle_end_element (xmlTextReaderPtr reader, struct xmlstate *state)
 
static void handle_start_element (xmlTextReaderPtr reader, struct xmlstate *state)
 
static time_t icalfloat_to_timet (icaltimetype time)
 
static int load_module (void)
 
static void parse_error_handler (void *arg, const char *msg, xmlParserSeverities severity, xmlTextReaderLocatorPtr locator)
 
static int unload_module (void)
 
static void * unref_caldav (void *obj)
 
static int update_caldav (struct caldav_pvt *pvt)
 
static int verify_cert (void *userdata, int failures, const ne_ssl_certificate *cert)
 

Variables

static struct ast_module_info __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_LOAD_ORDER , .description = "Asterisk CalDAV Calendar Integration" , .key = "This paragraph is copyright (c) 2006 by Digium, Inc. \In order for your module to load, it must return this \key via a function called \"key\". Any code which \includes this paragraph must be licensed under the GNU \General Public License version 2 or later (at your \option). In addition to Digium's general reservations \of rights, Digium expressly reserves the right to \allow other parties to license this paragraph under \different terms. Any use of Digium, Inc. trademarks or \logos (including \"Asterisk\" or \"Digium\") without \express written permission of Digium, Inc. is prohibited.\n" , .buildopt_sum = "da6642af068ee5e6490c5b1d2cc1d238" , .support_level = AST_MODULE_SUPPORT_EXTENDED, .load = load_module, .unload = unload_module, .load_pri = AST_MODPRI_DEVSTATE_PLUGIN, .requires = "res_calendar", }
 
static const struct ast_module_infoast_module_info = &__mod_info
 
static const xmlChar * caldav_node_localname = BAD_CAST "calendar-data"
 
static const xmlChar * caldav_node_nsuri = BAD_CAST "urn:ietf:params:xml:ns:caldav"
 
static struct ast_calendar_tech caldav_tech
 

Detailed Description

Resource for handling CalDAV calendars.

Definition in file res_calendar_caldav.c.