Asterisk - The Open Source Telephony Project
18.5.0
|
Resource for handling MS Exchange 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 <iksemel.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"
#include "asterisk/uuid.h"
Go to the source code of this file.
Data Structures | |
struct | exchangecal_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 struct ast_str * | bs_to_exchange_bs (struct ast_str *dst, enum ast_calendar_busy_state bs) |
static struct ast_str * | epoch_to_exchange_time (struct ast_str *dst, time_t epoch) |
static void | exchangecal_destructor (void *obj) |
static struct ast_str * | exchangecal_get_events_between (struct exchangecal_pvt *pvt, time_t start_time, time_t end_time) |
static void * | exchangecal_load_calendar (void *data) |
static struct ast_str * | exchangecal_request (struct exchangecal_pvt *pvt, const char *method, struct ast_str *req_body, struct ast_str *subdir) |
static int | exchangecal_write_event (struct ast_calendar_event *event) |
static int | fetch_response_reader (void *data, const char *block, size_t len) |
static struct ast_str * | generate_exchange_uuid (struct ast_str *uid) |
static int | is_valid_uuid (struct ast_str *uid) |
static int | load_module (void) |
static enum ast_calendar_busy_state | msbusy_to_bs (const char *msbusy) |
static time_t | mstime_to_time_t (char *mstime) |
static int | parse_cdata (void *data, char *value, size_t len) |
static int | parse_tag (void *data, char *name, char **atts, int type) |
static int | unload_module (void) |
static void * | unref_exchangecal (void *obj) |
static int | update_exchangecal (struct exchangecal_pvt *pvt) |
static struct ast_str * | xml_encode_str (struct ast_str *dst, const char *src) |
Variables | |
static struct ast_module_info | __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_LOAD_ORDER , .description = "Asterisk MS Exchange 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 = "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 | exchangecal_tech |
Resource for handling MS Exchange calendars.
Definition in file res_calendar_exchange.c.
|
static |
Definition at line 749 of file res_calendar_exchange.c.
|
static |
Definition at line 749 of file res_calendar_exchange.c.
struct ast_module* AST_MODULE_SELF_SYM | ( | void | ) |
Definition at line 749 of file res_calendar_exchange.c.
|
static |
Definition at line 357 of file res_calendar_exchange.c.
References ast_log, LOG_WARNING, ast_calendar::name, exchangecal_pvt::owner, exchangecal_pvt::secret, and exchangecal_pvt::user.
Referenced by exchangecal_load_calendar().
|
static |
Definition at line 323 of file res_calendar_exchange.c.
References AST_CALENDAR_BS_BUSY, AST_CALENDAR_BS_BUSY_TENTATIVE, and ast_str_set().
Referenced by exchangecal_write_event().
Definition at line 302 of file res_calendar_exchange.c.
References ast_copy_string(), ast_str_append(), and tmp().
Referenced by exchangecal_write_event().
|
static |
Definition at line 219 of file res_calendar_exchange.c.
References ao2_callback, ao2_ref, ast_debug, ast_string_field_free_memory, exchangecal_pvt::events, ast_calendar::name, NULL, OBJ_MULTIPLE, OBJ_NODATA, OBJ_UNLINK, exchangecal_pvt::owner, exchangecal_pvt::session, and exchangecal_pvt::uri.
Referenced by exchangecal_load_calendar().
|
static |
Definition at line 532 of file res_calendar_exchange.c.
References ast_debug, ast_free, ast_localtime(), ast_log, ast_str_append(), ast_str_buffer(), ast_str_create, ast_strftime(), end, exchangecal_request(), LOG_ERROR, NULL, and exchangecal_pvt::url.
Referenced by update_exchangecal().
|
static |
Definition at line 600 of file res_calendar_exchange.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(), exchangecal_pvt::events, exchangecal_destructor(), LOG_ERROR, LOG_WARNING, ast_variable::name, ast_calendar::name, ast_variable::next, NULL, exchangecal_pvt::owner, ast_calendar::refresh, refreshlock, exchangecal_pvt::secret, exchangecal_pvt::session, ast_calendar::tech_pvt, ast_calendar::unload, ast_calendar::unloading, unref_exchangecal(), update_exchangecal(), exchangecal_pvt::uri, exchangecal_pvt::url, and ast_variable::value.
|
static |
Definition at line 372 of file res_calendar_exchange.c.
References ast_free, ast_log, ast_str_buffer(), ast_str_create, ast_str_strlen(), buf, fetch_response_reader(), LOG_ERROR, LOG_WARNING, ast_calendar::name, NULL, exchangecal_pvt::owner, exchangecal_pvt::session, exchangecal_pvt::uri, and exchangecal_pvt::url.
Referenced by exchangecal_get_events_between(), and exchangecal_write_event().
|
static |
Definition at line 408 of file res_calendar_exchange.c.
References ast_free, ast_log, ast_str_append(), ast_str_buffer(), ast_str_create, ast_str_set(), ast_strlen_zero, AST_UUID_STR_LEN, ast_verb, bs_to_exchange_bs(), ast_calendar_event::busy_state, ast_calendar_event::description, end, ast_calendar_event::end, epoch_to_exchange_time(), exchangecal_request(), generate_exchange_uuid(), is_valid_uuid(), ast_calendar_event::location, LOG_ERROR, LOG_WARNING, NULL, ast_calendar_event::organizer, ast_calendar_event::owner, ast_calendar_event::start, ast_calendar_event::summary, ast_calendar::tech_pvt, ast_calendar_event::uid, and xml_encode_str().
|
static |
Definition at line 341 of file res_calendar_exchange.c.
References ast_free, ast_malloc, ast_str_append(), len(), and tmp().
Referenced by exchangecal_request().
Definition at line 244 of file res_calendar_exchange.c.
References ast_str_set(), ast_uuid_generate_str(), and AST_UUID_STR_LEN.
Referenced by exchangecal_write_event().
|
static |
Definition at line 253 of file res_calendar_exchange.c.
References ast_free, ast_str_buffer(), and ast_str_to_uuid().
Referenced by exchangecal_write_event().
|
static |
Definition at line 725 of file res_calendar_exchange.c.
References ast_calendar_register(), AST_MODULE_LOAD_DECLINE, and AST_MODULE_LOAD_SUCCESS.
Referenced by unload_module().
|
static |
Definition at line 160 of file res_calendar_exchange.c.
References AST_CALENDAR_BS_BUSY, AST_CALENDAR_BS_BUSY_TENTATIVE, and AST_CALENDAR_BS_FREE.
Referenced by parse_cdata().
|
static |
Definition at line 140 of file res_calendar_exchange.c.
Referenced by parse_cdata().
|
static |
Definition at line 171 of file res_calendar_exchange.c.
References ast_calloc, ast_free, ast_skip_blanks(), ast_string_field_build, ast_calendar_event::description, xmlstate::in_prop, xmlstate::in_propstat, xmlstate::in_response, ast_calendar_event::location, msbusy_to_bs(), mstime_to_time_t(), ast_calendar_event::organizer, xmlstate::ptr, str, ast_calendar_event::summary, xmlstate::tag, and ast_calendar_event::uid.
Referenced by update_exchangecal().
|
static |
Definition at line 83 of file res_calendar_exchange.c.
References ao2_link, ast_calendar_event_alloc(), ast_calendar_unref_event(), ast_copy_string(), ast_log, ast_strlen_zero, exchangecal_pvt::events, caldav_pvt::events, xmlstate::in_prop, xmlstate::in_propstat, xmlstate::in_response, LOG_ERROR, caldav_pvt::owner, xmlstate::ptr, xmlstate::pvt, xmlstate::tag, and tmp().
Referenced by update_exchangecal().
|
static |
Definition at line 736 of file res_calendar_exchange.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 235 of file res_calendar_exchange.c.
Referenced by exchangecal_load_calendar().
|
static |
Definition at line 577 of file res_calendar_exchange.c.
References ast_calendar_merge_events(), ast_free, ast_str_buffer(), ast_str_strlen(), ast_tvnow(), end, exchangecal_pvt::events, exchangecal_get_events_between(), exchangecal_pvt::owner, parse_cdata(), parse_tag(), xmlstate::pvt, and ast_calendar::timeframe.
Referenced by exchangecal_load_calendar().
Definition at line 265 of file res_calendar_exchange.c.
References ast_str_append(), buf, and tmp().
Referenced by exchangecal_write_event().
|
static |
Definition at line 749 of file res_calendar_exchange.c.
|
static |
Definition at line 749 of file res_calendar_exchange.c.
|
static |
Definition at line 53 of file res_calendar_exchange.c.