Calendaring API. More...
#include "asterisk.h"
#include "asterisk/_private.h"
#include "asterisk/calendar.h"
#include "asterisk/utils.h"
#include "asterisk/astobj2.h"
#include "asterisk/module.h"
#include "asterisk/config.h"
#include "asterisk/channel.h"
#include "asterisk/devicestate.h"
#include "asterisk/linkedlists.h"
#include "asterisk/sched.h"
#include "asterisk/dial.h"
#include "asterisk/cli.h"
#include "asterisk/pbx.h"
#include "asterisk/app.h"
Go to the source code of this file.
Data Structures | |
struct | evententry |
struct | eventlist |
struct | techs |
Macros | |
#define | CALENDAR_BUCKETS 19 |
#define | FORMAT "%-20.20s %-10.10s %-6.6s\n" |
#define | FORMAT "%-17.17s : %-20.20s\n" |
#define | FORMAT2 "%-12.12s: %-40.60s\n" |
Functions | |
static void | __reg_module (void) |
static void | __unreg_module (void) |
static int | add_event_to_list (struct eventlist *events, struct ast_calendar_event *event, time_t start, time_t end) |
static int | add_new_event_cb (void *obj, void *arg, int flags) |
void | ast_calendar_clear_events (struct ast_calendar *cal) |
Remove all events from calendar. More... | |
struct ast_config * | ast_calendar_config_acquire (void) |
Grab and lock pointer to the calendar config (read only) More... | |
void | ast_calendar_config_release (void) |
Release the calendar config. More... | |
struct ast_calendar_event * | ast_calendar_event_alloc (struct ast_calendar *cal) |
Allocate an astobj2 ast_calendar_event object. More... | |
struct ao2_container * | ast_calendar_event_container_alloc (void) |
Allocate an astobj2 container for ast_calendar_event objects. More... | |
void | ast_calendar_merge_events (struct ast_calendar *cal, struct ao2_container *new_events) |
Add an event to the list of events for a calendar. More... | |
int | ast_calendar_register (struct ast_calendar_tech *tech) |
Register a new calendar technology. More... | |
struct ast_calendar_event * | ast_calendar_unref_event (struct ast_calendar_event *event) |
Unreference an ast_calendar_event. More... | |
void | ast_calendar_unregister (struct ast_calendar_tech *tech) |
Unregister a new calendar technology. More... | |
static struct ast_calendar * | build_calendar (struct ast_config *cfg, const char *cat, const struct ast_calendar_tech *tech) |
static int | calendar_busy_callback (void *obj, void *arg, int flags) |
static int | calendar_busy_exec (struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len) |
A dialplan function that can be used to determine the busy status of a calendar. More... | |
static int | calendar_cmp_fn (void *obj, void *arg, int flags) |
static void | calendar_destructor (void *obj) |
static int | calendar_devstate_change (const void *data) |
static void | calendar_event_destructor (void *obj) |
static int | calendar_event_notify (const void *data) |
static int | calendar_event_read (struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len) |
static int | calendar_hash_fn (const void *obj, const int flags) |
static int | calendar_is_busy (struct ast_calendar *cal) |
static void | calendar_join_attendees (struct ast_calendar_event *event, char *buf, size_t len) |
static int | calendar_query_exec (struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len) |
static int | calendar_query_result_exec (struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len) |
static int | calendar_write_exec (struct ast_channel *chan, const char *cmd, char *data, const char *value) |
static enum ast_device_state | calendarstate (const char *data) |
static int | cb_pending_deletion (void *user_data, void *arg, int flags) |
static int | cb_rm_pending_deletion (void *user_data, void *arg, int flags) |
static int | clear_events_cb (void *user_data, void *arg, int flags) |
static void | copy_event_data (struct ast_calendar_event *dst, struct ast_calendar_event *src) |
static struct ast_calendar_event * | destroy_event (struct ast_calendar_event *event) |
static void * | do_notify (void *data) |
static void * | do_refresh (void *data) |
static char * | epoch_to_string (char *buf, size_t buflen, time_t epoch) |
static int | event_cmp_fn (void *obj, void *arg, int flags) |
static int | event_hash_fn (const void *obj, const int flags) |
static void | event_notification_destroy (void *data) |
static void * | event_notification_duplicate (void *data) |
static void | eventlist_destroy (void *data) |
static void | eventlist_destructor (void *obj) |
static void * | eventlist_duplicate (void *data) |
static struct ast_calendar * | find_calendar (const char *name) |
static struct ast_calendar_event * | find_event (struct ao2_container *events, const char *uid) |
static char * | generate_random_string (char *buf, size_t size) |
Generate 32 byte random string (stolen from chan_sip.c) More... | |
static char * | handle_dump_sched (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | handle_show_calendar (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | handle_show_calendars (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
CLI command to list available calendars. More... | |
static int | load_config (int reload) |
static int | load_module (void) |
static int | load_tech_calendars (struct ast_calendar_tech *tech) |
static int | match_caltech_cb (void *user_data, void *arg, int flags) |
static int | merge_events_cb (void *obj, void *arg, int flags) |
static int | null_chan_write (struct ast_channel *chan, struct ast_frame *frame) |
static int | reload (void) |
static int | schedule_calendar_event (struct ast_calendar *cal, struct ast_calendar_event *old_event, struct ast_calendar_event *cmp_event) |
static int | unload_module (void) |
static struct ast_calendar * | unref_calendar (struct ast_calendar *cal) |
Variables | |
static struct ast_module_info | __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_GLOBAL_SYMBOLS | AST_MODFLAG_LOAD_ORDER , .description = "Asterisk 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 = "ac1f6a56484a8820659555499174e588" , .load = load_module, .unload = unload_module, .reload = reload, .load_pri = AST_MODPRI_DEVSTATE_PROVIDER, } |
static struct ast_module_info * | ast_module_info = &__mod_info |
static struct ast_custom_function | calendar_busy_function |
static struct ast_cli_entry | calendar_cli [] |
static struct ast_config * | calendar_config |
static struct ast_custom_function | calendar_event_function |
static struct ast_custom_function | calendar_query_function |
static struct ast_custom_function | calendar_query_result_function |
static struct ast_custom_function | calendar_write_function |
static struct ao2_container * | calendars |
static ast_rwlock_t | config_lock = { PTHREAD_RWLOCK_INITIALIZER , NULL, 1 } |
static struct ast_datastore_info | event_notification_datastore |
static struct ast_datastore_info | eventlist_datastore_info |
static int | module_unloading |
static struct ast_channel_tech | null_tech |
static ast_cond_t | refresh_condition |
static pthread_t | refresh_thread = AST_PTHREADT_NULL |
static ast_mutex_t | refreshlock |
static ast_mutex_t | reloadlock |
static struct sched_context * | sched |
static struct techs | techs = { .first = NULL, .last = NULL, .lock = { PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP , NULL, 1 } , } |
Calendaring API.
Support responding to a meeting invite
Support writing attendees
Definition in file res_calendar.c.
#define CALENDAR_BUCKETS 19 |
Definition at line 199 of file res_calendar.c.
Referenced by ast_calendar_event_container_alloc(), build_calendar(), and load_module().
#define FORMAT "%-20.20s %-10.10s %-6.6s\n" |
#define FORMAT "%-17.17s : %-20.20s\n" |
#define FORMAT2 "%-12.12s: %-40.60s\n" |
Referenced by handle_show_calendar().
|
static |
Definition at line 1794 of file res_calendar.c.
|
static |
Definition at line 1794 of file res_calendar.c.
|
static |
Definition at line 1027 of file res_calendar.c.
References ao2_ref, ast_calloc, ast_debug, AST_LIST_INSERT_BEFORE_CURRENT, AST_LIST_INSERT_TAIL, AST_LIST_TRAVERSE_SAFE_BEGIN, AST_LIST_TRAVERSE_SAFE_END, ast_log(), ast_calendar_event::end, evententry::event, evententry::list, LOG_ERROR, ast_calendar_event::start, ast_calendar_event::summary, and ast_calendar_event::uid.
Referenced by calendar_query_exec().
|
static |
Definition at line 951 of file res_calendar.c.
References ao2_link, CMP_MATCH, events, ast_calendar_event::owner, and schedule_calendar_event().
Referenced by ast_calendar_merge_events().
void ast_calendar_clear_events | ( | struct ast_calendar * | cal | ) |
Remove all events from calendar.
cal | calendar whose events need to be cleared |
Definition at line 596 of file res_calendar.c.
References ao2_callback, ast_debug, clear_events_cb(), ast_calendar::events, ast_calendar::name, OBJ_MULTIPLE, OBJ_NODATA, and OBJ_UNLINK.
Referenced by calendar_destructor().
struct ast_config* ast_calendar_config_acquire | ( | void | ) |
Grab and lock pointer to the calendar config (read only)
Definition at line 237 of file res_calendar.c.
References ast_rwlock_rdlock, ast_rwlock_unlock, and calendar_config.
Referenced by caldav_load_calendar(), ewscal_load_calendar(), exchangecal_load_calendar(), and ical_load_calendar().
void ast_calendar_config_release | ( | void | ) |
Release the calendar config.
Definition at line 249 of file res_calendar.c.
References ast_rwlock_unlock, and config_lock.
Referenced by caldav_load_calendar(), ewscal_load_calendar(), exchangecal_load_calendar(), and ical_load_calendar().
struct ast_calendar_event* ast_calendar_event_alloc | ( | struct ast_calendar * | cal | ) |
Allocate an astobj2 ast_calendar_event object.
cal | calendar to allocate an event for |
Definition at line 603 of file res_calendar.c.
References ao2_alloc, ast_calendar_unref_event(), AST_LIST_HEAD_INIT_NOLOCK, ast_string_field_init, ast_calendar_event::attendees, calendar_event_destructor(), and evententry::event.
Referenced by caldav_add_event(), calendar_write_exec(), icalendar_add_event(), parse_tag(), and startelm().
struct ao2_container* ast_calendar_event_container_alloc | ( | void | ) |
Allocate an astobj2 container for ast_calendar_event objects.
Definition at line 625 of file res_calendar.c.
References ao2_container_alloc, CALENDAR_BUCKETS, event_cmp_fn(), and event_hash_fn().
Referenced by caldav_load_calendar(), ewscal_load_calendar(), exchangecal_load_calendar(), and ical_load_calendar().
void ast_calendar_merge_events | ( | struct ast_calendar * | cal, |
struct ao2_container * | new_events | ||
) |
Add an event to the list of events for a calendar.
cal | calendar containing the events to be merged |
new_events | an oa2 container of events to be merged into cal->events |
Definition at line 961 of file res_calendar.c.
References add_new_event_cb(), ao2_callback, ast_calendar::events, merge_events_cb(), OBJ_MULTIPLE, OBJ_NODATA, and OBJ_UNLINK.
Referenced by endelm(), icalendar_update_events(), startelm(), update_caldav(), and update_exchangecal().
int ast_calendar_register | ( | struct ast_calendar_tech * | tech | ) |
Register a new calendar technology.
tech | calendar technology to register |
0 | success |
-1 | failure |
Definition at line 490 of file res_calendar.c.
References AST_LIST_INSERT_HEAD, AST_LIST_LOCK, AST_LIST_TRAVERSE, AST_LIST_UNLOCK, ast_log(), ast_module_user_add, ast_verb, ast_calendar_tech::description, evententry::list, load_tech_calendars(), LOG_WARNING, ast_calendar_tech::type, and ast_calendar_tech::user.
Referenced by load_module().
struct ast_calendar_event* ast_calendar_unref_event | ( | struct ast_calendar_event * | event | ) |
Unreference an ast_calendar_event.
event | event to unref |
Definition at line 300 of file res_calendar.c.
References ao2_ref.
Referenced by ast_calendar_event_alloc(), caldav_add_event(), calendar_devstate_change(), calendar_query_exec(), calendar_write_exec(), do_notify(), endelm(), event_notification_destroy(), handle_show_calendar(), icalendar_add_event(), merge_events_cb(), and parse_tag().
void ast_calendar_unregister | ( | struct ast_calendar_tech * | tech | ) |
Unregister a new calendar technology.
tech | calendar technology to unregister |
0 | success |
-1 | failure |
Definition at line 523 of file res_calendar.c.
References ao2_callback, AST_LIST_LOCK, AST_LIST_REMOVE_CURRENT, AST_LIST_TRAVERSE_SAFE_BEGIN, AST_LIST_TRAVERSE_SAFE_END, AST_LIST_UNLOCK, ast_module_user_remove, ast_verb, evententry::list, match_caltech_cb(), OBJ_MULTIPLE, OBJ_NODATA, OBJ_UNLINK, ast_calendar_tech::type, and ast_calendar_tech::user.
Referenced by load_tech_calendars(), and unload_module().
|
static |
Definition at line 378 of file res_calendar.c.
References ao2_alloc, ao2_container_alloc, ao2_link, ao2_unlink, ast_cond_init, ast_log(), ast_pthread_create, AST_PTHREADT_NULL, ast_string_field_init, ast_string_field_set, ast_variable_browse(), ast_calendar::autoreminder, CALENDAR_BUCKETS, calendar_destructor(), event_cmp_fn(), event_hash_fn(), ast_calendar::events, find_calendar(), ast_calendar_tech::load_calendar, LOG_ERROR, name, ast_variable::name, ast_variable::next, ast_calendar::notify_waittime, ast_calendar::pending_deletion, ast_calendar::refresh, ast_calendar::tech, ast_calendar::thread, ast_calendar::timeframe, ast_calendar::unload, unref_calendar(), and ast_variable::value.
Referenced by load_tech_calendars().
|
static |
Definition at line 336 of file res_calendar.c.
References AST_CALENDAR_BS_FREE, ast_tvnow(), ast_calendar_event::busy_state, CMP_STOP, ast_calendar_event::end, evententry::event, and ast_calendar_event::start.
Referenced by calendar_is_busy().
|
static |
A dialplan function that can be used to determine the busy status of a calendar.
Definition at line 1000 of file res_calendar.c.
References ast_log(), ast_strlen_zero(), calendar_is_busy(), find_calendar(), LOG_WARNING, and unref_calendar().
|
static |
Definition at line 266 of file res_calendar.c.
References CMP_MATCH, CMP_STOP, and ast_calendar::name.
Referenced by load_module().
|
static |
Definition at line 306 of file res_calendar.c.
References ao2_lock, ao2_ref, ao2_unlock, ast_calendar_clear_events(), ast_cond_signal, ast_debug, ast_string_field_free_memory, ast_calendar::events, ast_calendar::name, ast_calendar::tech, ast_calendar::tech_pvt, ast_calendar::thread, ast_calendar::unload, ast_calendar::unloading, and ast_calendar_tech::unref_calendar.
Referenced by build_calendar().
|
static |
Definition at line 800 of file res_calendar.c.
References ao2_ref, ast_calendar_unref_event(), AST_DEVICE_BUSY, AST_DEVICE_NOT_INUSE, AST_DEVSTATE_CACHABLE, ast_devstate_changed(), ast_log(), ast_tvnow(), calendar_is_busy(), evententry::event, LOG_WARNING, ast_calendar::name, and ast_calendar_event::owner.
Referenced by schedule_calendar_event().
|
static |
Definition at line 545 of file res_calendar.c.
References ast_debug, ast_free, AST_LIST_REMOVE_HEAD, ast_string_field_free_memory, ast_calendar_event::attendees, ast_calendar_attendee::data, evententry::event, ast_calendar::name, evententry::next, and ast_calendar_event::owner.
Referenced by ast_calendar_event_alloc().
|
static |
Definition at line 776 of file res_calendar.c.
References ao2_ref, ast_log(), ast_pthread_create_background, AST_PTHREADT_NULL, do_notify(), evententry::event, LOG_ERROR, and ast_calendar_event::owner.
Referenced by schedule_calendar_event().
|
static |
Definition at line 1583 of file res_calendar.c.
References ast_channel_datastore_find(), ast_channel_lock, ast_channel_unlock, ast_copy_string(), ast_log(), ast_strlen_zero(), ast_calendar_event::busy_state, calendar_join_attendees(), ast_calendar_event::categories, ast_datastore::data, ast_calendar_event::description, ast_calendar_event::end, evententry::event, ast_calendar_event::location, LOG_WARNING, ast_calendar::name, ast_channel::name, ast_calendar_event::organizer, ast_calendar_event::owner, ast_calendar_event::priority, ast_calendar_event::start, ast_calendar_event::summary, and ast_calendar_event::uid.
|
static |
Definition at line 260 of file res_calendar.c.
References ast_str_case_hash(), and ast_calendar::name.
Referenced by load_module().
|
static |
Definition at line 350 of file res_calendar.c.
References ao2_callback, calendar_busy_callback(), ast_calendar::events, and OBJ_NODATA.
Referenced by calendar_busy_exec(), calendar_devstate_change(), calendarstate(), destroy_event(), and handle_show_calendars().
|
static |
Definition at line 1212 of file res_calendar.c.
References ast_copy_string(), ast_free, AST_LIST_FIRST, AST_LIST_TRAVERSE, ast_log(), ast_str_append(), ast_str_buffer(), ast_str_create(), ast_calendar_event::attendees, ast_calendar_attendee::data, LOG_ERROR, and evententry::next.
Referenced by calendar_event_read(), and calendar_query_result_exec().
|
static |
Definition at line 1121 of file res_calendar.c.
References add_event_to_list(), ao2_alloc, ao2_iterator_destroy(), ao2_iterator_init(), ao2_iterator_next, ao2_ref, args, AST_APP_ARG, ast_calendar_unref_event(), ast_channel_datastore_add(), ast_channel_datastore_find(), ast_channel_lock, ast_channel_unlock, ast_datastore_alloc(), ast_debug, AST_DECLARE_APP_ARGS, ast_log(), AST_STANDARD_APP_ARGS, ast_strlen_zero(), ast_datastore::data, DATASTORE_INHERIT_FOREVER, ast_calendar_event::end, evententry::event, eventlist_destructor(), events, ast_calendar::events, find_calendar(), generate_random_string(), ast_datastore::inheritance, LOG_ERROR, LOG_WARNING, ast_calendar_event::start, ast_calendar_event::summary, and unref_calendar().
|
static |
Definition at line 1230 of file res_calendar.c.
References args, AST_APP_ARG, ast_channel_datastore_find(), ast_channel_lock, ast_channel_unlock, ast_copy_string(), AST_DECLARE_APP_ARGS, AST_LIST_TRAVERSE, ast_log(), AST_STANDARD_APP_ARGS, ast_strlen_zero(), ast_calendar_event::busy_state, calendar_join_attendees(), ast_calendar_event::categories, ast_datastore::data, ast_calendar_event::description, ast_calendar_event::end, evententry::event, events, evententry::list, ast_calendar_event::location, LOG_WARNING, ast_calendar::name, ast_channel::name, ast_calendar_event::organizer, ast_calendar_event::owner, ast_calendar_event::priority, ast_calendar_event::start, ast_calendar_event::summary, and ast_calendar_event::uid.
|
static |
Definition at line 1323 of file res_calendar.c.
References AST_APP_ARG, ast_calendar_event_alloc(), ast_calendar_unref_event(), AST_DECLARE_APP_ARGS, ast_free, ast_log(), AST_STANDARD_APP_ARGS, ast_strdup, ast_string_field_set, ast_strlen_zero(), ast_tvnow(), ast_calendar_event::end, evententry::event, find_calendar(), LOG_ERROR, LOG_WARNING, ast_calendar::name, ast_calendar_event::start, ast_calendar::tech, unref_calendar(), and ast_calendar_tech::write_event.
|
static |
Definition at line 359 of file res_calendar.c.
References AST_DEVICE_INUSE, AST_DEVICE_INVALID, AST_DEVICE_NOT_INUSE, ast_strlen_zero(), calendar_is_busy(), find_calendar(), ast_calendar_tech::is_busy, state, ast_calendar::tech, and unref_calendar().
Referenced by load_module().
|
static |
Definition at line 1646 of file res_calendar.c.
References CMP_MATCH, and ast_calendar::pending_deletion.
Referenced by reload().
|
static |
Definition at line 1655 of file res_calendar.c.
References CMP_MATCH, and ast_calendar::pending_deletion.
Referenced by reload().
|
static |
Definition at line 587 of file res_calendar.c.
References CMP_MATCH, destroy_event(), and evententry::event.
Referenced by ast_calendar_clear_events().
|
static |
Definition at line 834 of file res_calendar.c.
References ast_calendar_event::alarm, ast_free, AST_LIST_INSERT_TAIL, AST_LIST_REMOVE_HEAD, ast_string_field_set, ast_calendar_event::attendees, ast_calendar_event::busy_state, ast_calendar_event::categories, ast_calendar_event::description, ast_calendar_event::end, ast_calendar_event::location, evententry::next, ast_calendar_event::organizer, ast_calendar_event::owner, ast_calendar_event::priority, ast_calendar_event::start, ast_calendar_event::summary, and ast_calendar_event::uid.
Referenced by merge_events_cb().
|
static |
Definition at line 562 of file res_calendar.c.
References ast_debug, AST_DEVICE_BUSY, AST_DEVICE_NOT_INUSE, AST_DEVSTATE_CACHABLE, ast_devstate_changed(), ast_sched_del(), ast_calendar_event::bs_end_sched, ast_calendar_event::bs_start_sched, calendar_is_busy(), ast_calendar::name, ast_calendar_event::notify_sched, and ast_calendar_event::owner.
Referenced by clear_events_cb(), and merge_events_cb().
|
static |
Definition at line 676 of file res_calendar.c.
References ao2_ref, ast_calendar_unref_event(), ast_channel_alloc(), ast_channel_datastore_add(), ast_channel_lock, ast_channel_release(), ast_channel_unlock, ast_copy_string(), ast_datastore_alloc(), ast_dial_answered_steal(), ast_dial_append(), ast_dial_create(), ast_dial_destroy(), AST_DIAL_OPTION_ANSWER_EXEC, ast_dial_option_global_enable(), AST_DIAL_RESULT_ANSWERED, ast_dial_run(), ast_dial_set_global_timeout(), AST_FORMAT_SLINEAR, ast_free, ast_log(), ast_pbx_run(), AST_STATE_DOWN, ast_str_buffer(), ast_str_create(), ast_str_set(), ast_strdupa, ast_strlen_zero(), ast_verb, ast_channel::context, ast_datastore::data, DATASTORE_INHERIT_FOREVER, evententry::event, ast_channel::exten, generate_random_string(), ast_datastore::inheritance, LOG_ERROR, LOG_WARNING, ast_calendar::name, ast_channel::nativeformats, ast_calendar::notify_app, ast_calendar::notify_appdata, ast_calendar::notify_channel, ast_calendar::notify_context, ast_calendar::notify_extension, ast_calendar::notify_waittime, null_tech, ast_calendar_event::owner, ast_channel::priority, ast_channel::rawreadformat, ast_channel::rawwriteformat, ast_channel::readformat, ast_channel::tech, and ast_channel::writeformat.
Referenced by calendar_event_notify().
|
static |
Definition at line 1688 of file res_calendar.c.
References ast_cond_timedwait, ast_mutex_lock, ast_mutex_unlock, ast_sched_runq(), ast_sched_wait(), and ast_tvnow().
Referenced by load_module().
|
static |
Definition at line 1461 of file res_calendar.c.
References ast_localtime(), and ast_strftime().
Referenced by handle_show_calendar().
|
static |
Definition at line 286 of file res_calendar.c.
References CMP_MATCH, CMP_STOP, and ast_calendar_event::uid.
Referenced by ast_calendar_event_container_alloc(), and build_calendar().
|
static |
Definition at line 280 of file res_calendar.c.
References ast_str_hash(), evententry::event, and ast_calendar_event::uid.
Referenced by ast_calendar_event_container_alloc(), and build_calendar().
|
static |
Definition at line 630 of file res_calendar.c.
References ast_calendar_unref_event(), and evententry::event.
|
static |
Definition at line 638 of file res_calendar.c.
References ao2_ref, and evententry::event.
|
static |
Definition at line 1101 of file res_calendar.c.
References ao2_ref, and events.
|
static |
Definition at line 325 of file res_calendar.c.
References ao2_ref, ast_free, AST_LIST_REMOVE_HEAD, evententry::event, events, and evententry::list.
Referenced by calendar_query_exec().
|
static |
Definition at line 1108 of file res_calendar.c.
References ao2_ref, and events.
|
static |
Definition at line 272 of file res_calendar.c.
References ao2_find, name, ast_calendar::name, and OBJ_POINTER.
Referenced by build_calendar(), calendar_busy_exec(), calendar_query_exec(), calendar_write_exec(), calendarstate(), and handle_show_calendar().
|
static |
Definition at line 292 of file res_calendar.c.
References ao2_find, OBJ_POINTER, and ast_calendar_event::uid.
Referenced by merge_events_cb().
|
static |
Generate 32 byte random string (stolen from chan_sip.c)
Definition at line 652 of file res_calendar.c.
References ast_random().
Referenced by calendar_query_exec(), and do_notify().
|
static |
Definition at line 1558 of file res_calendar.c.
References ast_sched_dump(), CLI_GENERATE, CLI_INIT, CLI_SUCCESS, ast_cli_entry::command, and ast_cli_entry::usage.
|
static |
Definition at line 1478 of file res_calendar.c.
References ast_calendar_event::alarm, ao2_iterator_destroy(), ao2_iterator_init(), ao2_iterator_next, ast_cli_args::argc, ast_cli_args::argv, ast_calendar_unref_event(), ast_cli(), ast_strdup, ast_calendar::autoreminder, ast_calendar_event::categories, CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, ast_calendar_event::description, ast_calendar_event::end, epoch_to_string(), evententry::event, ast_calendar::events, ast_cli_args::fd, find_calendar(), FORMAT, FORMAT2, ast_calendar_event::location, ast_cli_args::n, ast_calendar::name, ast_calendar::notify_app, ast_calendar::notify_appdata, ast_calendar::notify_channel, ast_calendar::notify_context, ast_calendar::notify_extension, ast_calendar_event::organizer, ast_cli_args::pos, ast_calendar_event::priority, ast_calendar::refresh, ast_calendar_event::start, ast_calendar_event::summary, ast_calendar::timeframe, ast_calendar_event::uid, unref_calendar(), ast_cli_entry::usage, and ast_cli_args::word.
|
static |
CLI command to list available calendars.
Definition at line 1431 of file res_calendar.c.
References ao2_iterator_destroy(), ao2_iterator_init(), ao2_iterator_next, ast_cli(), calendar_is_busy(), CLI_GENERATE, CLI_INIT, CLI_SUCCESS, ast_cli_entry::command, ast_cli_args::fd, FORMAT, ast_calendar::name, ast_calendar::tech, ast_calendar_tech::type, unref_calendar(), and ast_cli_entry::usage.
|
static |
Definition at line 973 of file res_calendar.c.
References ast_config_destroy(), ast_config_load2(), ast_log(), ast_rwlock_unlock, ast_rwlock_wrlock, calendar_config, CONFIG_FLAG_FILEUNCHANGED, config_lock, CONFIG_STATUS_FILEINVALID, CONFIG_STATUS_FILEUNCHANGED, and LOG_ERROR.
Referenced by load_module(), and reload().
|
static |
Definition at line 1753 of file res_calendar.c.
References ao2_container_alloc, ARRAY_LEN, ast_cli_register_multiple(), ast_cond_init, ast_custom_function_register, ast_devstate_prov_add(), ast_log(), AST_MODULE_LOAD_DECLINE, AST_MODULE_LOAD_FAILURE, AST_MODULE_LOAD_SUCCESS, ast_mutex_init, ast_pthread_create_background, CALENDAR_BUCKETS, calendar_busy_function, calendar_cli, calendar_cmp_fn(), calendar_event_function, calendar_hash_fn(), calendar_query_function, calendar_query_result_function, calendar_write_function, calendarstate(), do_refresh(), load_config(), LOG_ERROR, and sched_context_create().
|
static |
Definition at line 454 of file res_calendar.c.
References ast_calendar_unregister(), ast_category_browse(), ast_log(), ast_rwlock_unlock, ast_rwlock_wrlock, ast_variable_retrieve(), build_calendar(), calendar_config, config_lock, LOG_WARNING, ast_calendar_tech::type, and unref_calendar().
Referenced by ast_calendar_register(), and reload().
|
static |
Definition at line 511 of file res_calendar.c.
References CMP_MATCH, and ast_calendar::tech.
Referenced by ast_calendar_unregister().
|
static |
Definition at line 924 of file res_calendar.c.
References ao2_unlink, ast_calendar_unref_event(), CMP_MATCH, copy_event_data(), destroy_event(), find_event(), ast_calendar_event::owner, schedule_calendar_event(), and ast_calendar_event::uid.
Referenced by ast_calendar_merge_events().
|
static |
Definition at line 665 of file res_calendar.c.
|
static |
Definition at line 1662 of file res_calendar.c.
References ao2_callback, AST_LIST_LOCK, AST_LIST_TRAVERSE, AST_LIST_UNLOCK, ast_log(), ast_mutex_lock, ast_mutex_unlock, cb_pending_deletion(), cb_rm_pending_deletion(), evententry::list, load_config(), load_tech_calendars(), LOG_WARNING, OBJ_MULTIPLE, OBJ_NODATA, OBJ_UNLINK, and ast_calendar_tech::type.
|
static |
Definition at line 862 of file res_calendar.c.
References ast_calendar_event::alarm, ao2_lock, ao2_unlock, ast_cond_signal, ast_debug, ast_mutex_lock, ast_mutex_unlock, AST_SCHED_REPLACE, ast_tvnow(), ast_calendar::autoreminder, ast_calendar_event::bs_end_sched, ast_calendar_event::bs_start_sched, calendar_devstate_change(), calendar_event_notify(), ast_calendar_event::end, evententry::event, ast_calendar_event::notify_sched, and ast_calendar_event::start.
Referenced by add_new_event_cb(), and merge_events_cb().
|
static |
Definition at line 1719 of file res_calendar.c.
References ao2_callback, ARRAY_LEN, ast_cli_unregister_multiple(), ast_cond_signal, ast_config_destroy(), ast_custom_function_unregister(), ast_devstate_prov_del(), AST_LIST_LOCK, AST_LIST_TRAVERSE_SAFE_BEGIN, AST_LIST_TRAVERSE_SAFE_END, AST_LIST_UNLOCK, ast_mutex_lock, ast_mutex_unlock, ast_unload_resource(), calendar_busy_function, calendar_cli, calendar_config, calendar_event_function, calendar_query_function, calendar_query_result_function, calendar_write_function, evententry::list, ast_calendar_tech::module, OBJ_MULTIPLE, OBJ_NODATA, and OBJ_UNLINK.
|
static |
Definition at line 254 of file res_calendar.c.
References ao2_ref.
Referenced by build_calendar(), calendar_busy_exec(), calendar_query_exec(), calendar_write_exec(), calendarstate(), handle_show_calendar(), handle_show_calendars(), and load_tech_calendars().
|
static |
Definition at line 1794 of file res_calendar.c.
|
static |
Definition at line 1794 of file res_calendar.c.
|
static |
Definition at line 1022 of file res_calendar.c.
Referenced by load_module(), and unload_module().
|
static |
Definition at line 1577 of file res_calendar.c.
Referenced by load_module(), and unload_module().
|
static |
Definition at line 234 of file res_calendar.c.
Referenced by ast_calendar_config_acquire(), load_config(), load_tech_calendars(), and unload_module().
|
static |
Definition at line 1641 of file res_calendar.c.
Referenced by load_module(), and unload_module().
|
static |
Definition at line 1207 of file res_calendar.c.
Referenced by load_module(), and unload_module().
|
static |
Definition at line 1318 of file res_calendar.c.
Referenced by load_module(), and unload_module().
|
static |
Definition at line 1425 of file res_calendar.c.
Referenced by load_module(), and unload_module().
|
static |
Definition at line 201 of file res_calendar.c.
|
static |
Definition at line 235 of file res_calendar.c.
Referenced by ast_calendar_config_release(), load_config(), and load_tech_calendars().
|
static |
Definition at line 214 of file res_calendar.c.
|
static |
Definition at line 220 of file res_calendar.c.
|
static |
Definition at line 207 of file res_calendar.c.
|
static |
Definition at line 670 of file res_calendar.c.
Referenced by do_notify().
|
static |
Definition at line 205 of file res_calendar.c.
|
static |
Definition at line 203 of file res_calendar.c.
|
static |
Definition at line 204 of file res_calendar.c.
Referenced by caldav_load_calendar(), ewscal_load_calendar(), exchangecal_load_calendar(), and ical_load_calendar().
|
static |
Definition at line 206 of file res_calendar.c.
|
static |
Definition at line 202 of file res_calendar.c.