Asterisk - The Open Source Telephony Project
18.5.0
|
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/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 | icalendar_pvt |
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 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 = "30ef0c93b36035ec78c9cfd712d36d9b" , .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 struct ast_calendar_tech | ical_tech |
Resource for handling iCalendar calendars.
Definition in file res_calendar_icalendar.c.
|
static |
Definition at line 547 of file res_calendar_icalendar.c.
|
static |
Definition at line 547 of file res_calendar_icalendar.c.
struct ast_module* AST_MODULE_SELF_SYM | ( | void | ) |
Definition at line 547 of file res_calendar_icalendar.c.
|
static |
Definition at line 113 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 128 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, NULL, icalendar_pvt::owner, icalendar_pvt::session, icalendar_pvt::uri, and icalendar_pvt::url.
Referenced by ical_load_calendar().
|
static |
Definition at line 97 of file res_calendar_icalendar.c.
References ast_free, ast_malloc, ast_str_append(), icalendar_pvt::data, len(), and tmp().
Referenced by fetch_icalendar().
|
static |
Definition at line 385 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, NULL, icalendar_pvt::owner, ast_calendar::refresh, refreshlock, icalendar_pvt::secret, icalendar_pvt::session, ast_calendar::tech_pvt, ast_calendar::unload, ast_calendar::unloading, unref_icalendar(), icalendar_pvt::uri, icalendar_pvt::url, and ast_variable::value.
|
static |
Definition at line 190 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, categories, icalendar_pvt::data, ast_calendar_attendee::data, end, icalendar_pvt::events, icalfloat_to_timet(), LOG_ERROR, LOG_WARNING, ast_calendar_attendee::next, icalendar_pvt::owner, ast_calendar_event::start, ast_calendar_event::summary, tmp(), and ast_calendar_event::uid.
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, NULL, OBJ_MULTIPLE, OBJ_NODATA, OBJ_UNLINK, icalendar_pvt::owner, icalendar_pvt::session, and icalendar_pvt::uri.
Referenced by ical_load_calendar().
|
static |
Definition at line 350 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 164 of file res_calendar_icalendar.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 icalendar_add_event().
|
static |
Definition at line 523 of file res_calendar_icalendar.c.
References ast_calendar_register(), AST_MODULE_LOAD_DECLINE, and AST_MODULE_LOAD_SUCCESS.
Referenced by unload_module().
|
static |
Definition at line 534 of file res_calendar_icalendar.c.
References ast_calendar_unregister(), AST_MODFLAG_LOAD_ORDER, AST_MODPRI_DEVSTATE_PLUGIN, AST_MODULE_INFO(), AST_MODULE_SUPPORT_EXTENDED, ASTERISK_GPL_KEY, and load_module().
|
static |
Definition at line 89 of file res_calendar_icalendar.c.
Referenced by ical_load_calendar().
|
static |
Definition at line 547 of file res_calendar_icalendar.c.
|
static |
Definition at line 547 of file res_calendar_icalendar.c.
|
static |
Definition at line 49 of file res_calendar_icalendar.c.