| Asterisk - The Open Source Telephony Project GIT-master-27fb039
    | 
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_module * | AST_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_str * | caldav_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_str * | caldav_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 = ASTERISK_GPL_KEY , .buildopt_sum = AST_BUILDOPT_SUM, .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_info * | ast_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 | 
Resource for handling CalDAV calendars.
Definition in file res_calendar_caldav.c.
| 
 | static | 
Definition at line 792 of file res_calendar_caldav.c.
| 
 | static | 
Definition at line 792 of file res_calendar_caldav.c.
| struct ast_module * AST_MODULE_SELF_SYM | ( | void | ) | 
Definition at line 792 of file res_calendar_caldav.c.
| 
 | static | 
Definition at line 113 of file res_calendar_caldav.c.
References ast_log, LOG_WARNING, ast_calendar::name, caldav_pvt::owner, caldav_pvt::secret, and caldav_pvt::user.
Referenced by caldav_load_calendar().
| 
 | static | 
Definition at line 352 of file res_calendar_caldav.c.
References ao2_link, AST_CALENDAR_BS_BUSY, AST_CALENDAR_BS_FREE, ast_calendar_event_alloc(), ast_calendar_unref_event(), ast_calloc, ast_free, AST_LIST_INSERT_TAIL, ast_log, ast_strdup, ast_string_field_set, ast_strlen_zero(), AST_TIME_T_LEN, ast_time_t_to_string(), categories, ast_calendar_attendee::data, end, caldav_pvt::events, icalfloat_to_timet(), LOG_ERROR, LOG_WARNING, ast_calendar_attendee::next, caldav_pvt::owner, and ast_calendar_event::start.
Referenced by handle_end_element().
| 
 | static | 
Definition at line 73 of file res_calendar_caldav.c.
References ao2_callback, ao2_ref, ast_debug, ast_string_field_free_memory, caldav_pvt::events, ast_calendar::name, NULL, OBJ_MULTIPLE, OBJ_NODATA, OBJ_UNLINK, caldav_pvt::owner, caldav_pvt::session, and caldav_pvt::uri.
Referenced by caldav_load_calendar().
| 
 | static | 
Definition at line 279 of file res_calendar_caldav.c.
References ast_free, ast_log, ast_str_append(), ast_str_create, ast_str_strlen(), caldav_request(), end, LOG_ERROR, and NULL.
Referenced by update_caldav().
| 
 | static | 
Definition at line 642 of file res_calendar_caldav.c.
References ao2_alloc, ao2_trylock, ao2_unlock, ast_calendar_config_acquire(), ast_calendar_config_release(), ast_calendar_event_container_alloc(), ast_cond_timedwait, ast_debug, ast_log, ast_mutex_init, ast_mutex_lock, ast_mutex_unlock, ast_string_field_init, ast_string_field_set, ast_strlen_zero(), ast_tvnow(), ast_variable_browse(), auth_credentials(), caldav_destructor(), caldav_pvt::events, LOG_ERROR, LOG_WARNING, ast_calendar::name, ast_variable::name, ast_variable::next, NULL, caldav_pvt::owner, ast_calendar::refresh, refreshlock, caldav_pvt::session, ast_calendar::tech_pvt, ast_calendar::unload, ast_calendar::unloading, unref_caldav(), update_caldav(), caldav_pvt::uri, caldav_pvt::url, url, ast_variable::value, and verify_cert().
| 
 | static | 
Definition at line 141 of file res_calendar_caldav.c.
References ast_free, ast_log, ast_str_buffer(), ast_str_create, ast_str_strlen(), ast_strlen_zero(), buf, debug_response_handler(), fetch_response_reader(), LOG_ERROR, LOG_WARNING, method, ast_calendar::name, NULL, caldav_pvt::owner, caldav_pvt::session, and caldav_pvt::uri.
Referenced by caldav_get_events_between(), and caldav_write_event().
| 
 | static | 
Definition at line 178 of file res_calendar_caldav.c.
References AST_CALENDAR_BS_BUSY, AST_CALENDAR_BS_BUSY_TENTATIVE, ast_free, ast_log, ast_random(), ast_str_append(), ast_str_create, ast_str_set(), ast_string_field_build, ast_strlen_zero(), caldav_request(), LOG_ERROR, LOG_WARNING, NULL, caldav_pvt::owner, ast_calendar::tech_pvt, and caldav_pvt::url.
| 
 | static | 
Definition at line 128 of file res_calendar_caldav.c.
References ast_debug.
Referenced by caldav_request().
| 
 | static | 
Definition at line 97 of file res_calendar_caldav.c.
References ast_free, ast_malloc, ast_str_append(), and len().
Referenced by caldav_request().
| 
 | static | 
Definition at line 534 of file res_calendar_caldav.c.
References ast_str_append(), and text.
Referenced by update_caldav().
| 
 | static | 
Definition at line 501 of file res_calendar_caldav.c.
References ast_str_buffer(), ast_str_strlen(), caldav_add_event(), caldav_node_localname, caldav_node_nsuri, and end.
Referenced by update_caldav().
| 
 | static | 
Definition at line 488 of file res_calendar_caldav.c.
References ast_str_reset(), caldav_node_localname, and caldav_node_nsuri.
Referenced by update_caldav().
| 
 | static | 
Definition at line 327 of file res_calendar_caldav.c.
References ast_mktime(), NULL, ast_tm::tm_hour, ast_tm::tm_isdst, ast_tm::tm_mday, ast_tm::tm_min, ast_tm::tm_mon, ast_tm::tm_sec, and ast_tm::tm_year.
Referenced by caldav_add_event().
| 
 | static | 
Definition at line 768 of file res_calendar_caldav.c.
References ast_calendar_register(), AST_MODULE_LOAD_DECLINE, AST_MODULE_LOAD_SUCCESS, and caldav_tech.
| 
 | static | 
Definition at line 549 of file res_calendar_caldav.c.
References ast_log, LOG_ERROR, LOG_WARNING, and severity.
Referenced by update_caldav().
| 
 | static | 
Definition at line 779 of file res_calendar_caldav.c.
References ast_calendar_unregister(), and caldav_tech.
| 
 | static | 
Definition at line 89 of file res_calendar_caldav.c.
Referenced by caldav_load_calendar().
| 
 | static | 
Definition at line 569 of file res_calendar_caldav.c.
References ast_calendar_merge_events(), ast_free, ast_str_buffer(), ast_str_create, ast_str_strlen(), ast_tvnow(), caldav_get_events_between(), end, caldav_pvt::events, handle_characters(), handle_end_element(), handle_start_element(), NULL, caldav_pvt::owner, parse_error_handler(), xmlstate::pvt, xmlstate::start, and ast_calendar::timeframe.
Referenced by caldav_load_calendar().
| 
 | static | 
Definition at line 636 of file res_calendar_caldav.c.
Referenced by caldav_load_calendar().
| 
 | static | 
Definition at line 792 of file res_calendar_caldav.c.
| 
 | static | 
Definition at line 792 of file res_calendar_caldav.c.
| 
 | static | 
Definition at line 485 of file res_calendar_caldav.c.
Referenced by handle_end_element(), and handle_start_element().
| 
 | static | 
Definition at line 486 of file res_calendar_caldav.c.
Referenced by handle_end_element(), and handle_start_element().
| 
 | static | 
Definition at line 52 of file res_calendar_caldav.c.
Referenced by load_module(), and unload_module().