Resource for handling iCalendar 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 "asterisk/module.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 | icalendar_pvt |
Functions | |
static void | __reg_module (void) |
static void | __unreg_module (void) |
static int | auth_credentials (void *userdata, const char *realm, int attempts, char *username, char *secret) |
static icalcomponent * | fetch_icalendar (struct icalendar_pvt *pvt) |
static int | fetch_response_reader (void *data, const char *block, size_t len) |
static void * | ical_load_calendar (void *data) |
static void | icalendar_add_event (icalcomponent *comp, struct icaltime_span *span, void *data) |
static void | icalendar_destructor (void *obj) |
static void | icalendar_update_events (struct icalendar_pvt *pvt) |
static time_t | icalfloat_to_timet (icaltimetype time) |
static int | load_module (void) |
static int | unload_module (void) |
static void * | unref_icalendar (void *obj) |
Variables | |
static struct ast_module_info | __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_LOAD_ORDER , .description = "Asterisk iCalendar .ics file 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 = "ac1f6a56484a8820659555499174e588" , .load = load_module, .unload = unload_module, .load_pri = AST_MODPRI_DEVSTATE_PLUGIN, } |
static struct ast_module_info * | ast_module_info = &__mod_info |
static struct ast_calendar_tech | ical_tech |
Resource for handling iCalendar calendars.
Definition in file res_calendar_icalendar.c.
|
static |
Definition at line 509 of file res_calendar_icalendar.c.
|
static |
Definition at line 509 of file res_calendar_icalendar.c.
|
static |
Definition at line 112 of file res_calendar_icalendar.c.
References ast_log(), LOG_WARNING, ast_calendar::name, icalendar_pvt::owner, icalendar_pvt::secret, and icalendar_pvt::user.
Referenced by ical_load_calendar().
|
static |
Definition at line 127 of file res_calendar_icalendar.c.
References ast_free, ast_log(), ast_str_buffer(), ast_str_create(), ast_str_strlen(), ast_strlen_zero(), fetch_response_reader(), LOG_ERROR, LOG_WARNING, ast_calendar::name, icalendar_pvt::owner, icalendar_pvt::session, icalendar_pvt::uri, and icalendar_pvt::url.
Referenced by ical_load_calendar().
|
static |
Definition at line 96 of file res_calendar_icalendar.c.
References ast_free, ast_malloc, ast_str_append(), and len().
Referenced by fetch_icalendar().
|
static |
Definition at line 349 of file res_calendar_icalendar.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(), icalendar_pvt::data, icalendar_pvt::events, fetch_icalendar(), icalendar_destructor(), icalendar_update_events(), LOG_ERROR, LOG_WARNING, ast_variable::name, ast_calendar::name, ast_variable::next, icalendar_pvt::owner, ast_calendar::refresh, refreshlock, secret, icalendar_pvt::session, ast_calendar::tech_pvt, ast_calendar::unload, ast_calendar::unloading, unref_icalendar(), icalendar_pvt::uri, icalendar_pvt::url, url, and ast_variable::value.
|
static |
Definition at line 189 of file res_calendar_icalendar.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_calendar_event::attendees, icalendar_pvt::data, ast_calendar_attendee::data, ast_calendar_event::end, icalendar_pvt::events, icalfloat_to_timet(), LOG_ERROR, LOG_WARNING, ast_calendar_attendee::next, icalendar_pvt::owner, ast_calendar_event::start, and ast_calendar_event::summary.
Referenced by icalendar_update_events().
|
static |
Definition at line 70 of file res_calendar_icalendar.c.
References ao2_callback, ao2_ref, ast_debug, ast_string_field_free_memory, icalendar_pvt::data, icalendar_pvt::events, ast_calendar::name, OBJ_MULTIPLE, OBJ_NODATA, OBJ_UNLINK, icalendar_pvt::owner, and icalendar_pvt::session.
Referenced by ical_load_calendar().
|
static |
Definition at line 314 of file res_calendar_icalendar.c.
References ast_calendar_merge_events(), ast_log(), icalendar_pvt::data, icalendar_pvt::events, icalendar_add_event(), LOG_ERROR, icalendar_pvt::owner, and ast_calendar::timeframe.
Referenced by ical_load_calendar().
|
static |
Definition at line 163 of file res_calendar_icalendar.c.
References ast_mktime(), 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 icalendar_add_event().
|
static |
Definition at line 487 of file res_calendar_icalendar.c.
References ast_calendar_register(), AST_MODULE_LOAD_DECLINE, and AST_MODULE_LOAD_SUCCESS.
|
static |
Definition at line 498 of file res_calendar_icalendar.c.
References ast_calendar_unregister().
|
static |
Definition at line 88 of file res_calendar_icalendar.c.
References ao2_ref.
Referenced by ical_load_calendar().
|
static |
Definition at line 509 of file res_calendar_icalendar.c.
|
static |
Definition at line 509 of file res_calendar_icalendar.c.
|
static |
Definition at line 49 of file res_calendar_icalendar.c.