Asterisk - The Open Source Telephony Project GIT-master-b023714
|
Calendaring API. More...
#include "asterisk.h"
#include "asterisk/_private.h"
#include "asterisk/channel.h"
#include "asterisk/calendar.h"
#include "asterisk/utils.h"
#include "asterisk/astobj2.h"
#include "asterisk/module.h"
#include "asterisk/config.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"
#include "asterisk/format_cache.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 "%-10.10s %-30.30s\n" |
#define | FORMAT "%-18.18s : %-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) |
static const char * | ast_calendar_busy_state_to_str (enum ast_calendar_busy_state busy_state) |
void | ast_calendar_clear_events (struct ast_calendar *cal) |
Remove all events from calendar. | |
const struct ast_config * | ast_calendar_config_acquire (void) |
Grab and lock pointer to the calendar config (read only) | |
void | ast_calendar_config_release (void) |
Release the calendar config. | |
struct ast_calendar_event * | ast_calendar_event_alloc (struct ast_calendar *cal) |
Allocate an astobj2 ast_calendar_event object. | |
struct ao2_container * | ast_calendar_event_container_alloc (void) |
Allocate an astobj2 container for ast_calendar_event objects. | |
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. | |
int | ast_calendar_register (struct ast_calendar_tech *tech) |
Register a new calendar technology. | |
struct ast_calendar_event * | ast_calendar_unref_event (struct ast_calendar_event *event) |
Unreference an ast_calendar_event. | |
void | ast_calendar_unregister (struct ast_calendar_tech *tech) |
Unregister a new calendar technology. | |
struct ast_module * | AST_MODULE_SELF_SYM (void) |
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. | |
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) | |
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. | |
static char * | handle_show_calendars_types (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
CLI command to list of all calendars types currently loaded on the backend. | |
static int | load_config (int reload) |
static int | load_module (void) |
Load the module. | |
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) |
Calendaring API.
Support responding to a meeting invite
Support writing attendees
Definition in file res_calendar.c.
#define CALENDAR_BUCKETS 19 |
Definition at line 237 of file res_calendar.c.
#define FORMAT "%-20.20s %-10.10s %-6.6s\n" |
#define FORMAT "%-10.10s %-30.30s\n" |
#define FORMAT "%-18.18s : %-20.20s\n" |
#define FORMAT2 "%-12.12s: %-40.60s\n" |
|
static |
Definition at line 1984 of file res_calendar.c.
|
static |
Definition at line 1984 of file res_calendar.c.
|
static |
Definition at line 1141 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, end, ast_calendar_event::end, evententry::event, events, 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 1065 of file res_calendar.c.
References ao2_link, CMP_MATCH, events, NULL, ast_calendar_event::owner, schedule_calendar_event(), and ast_calendar_event::start.
Referenced by ast_calendar_merge_events().
|
static |
Definition at line 1626 of file res_calendar.c.
References AST_CALENDAR_BS_BUSY, AST_CALENDAR_BS_BUSY_TENTATIVE, and AST_CALENDAR_BS_FREE.
Referenced by handle_show_calendar().
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 677 of file res_calendar.c.
References ao2_callback, ast_debug, clear_events_cb(), NULL, OBJ_MULTIPLE, OBJ_NODATA, OBJ_UNLINK, and ast_calendar_event::start.
Referenced by calendar_destructor().
const struct ast_config * ast_calendar_config_acquire | ( | void | ) |
Grab and lock pointer to the calendar config (read only)
Definition at line 275 of file res_calendar.c.
References ast_rwlock_rdlock, ast_rwlock_unlock, calendar_config, config_lock, and NULL.
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 287 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 684 of file res_calendar.c.
References ao2_alloc, ast_calendar_unref_event(), AST_LIST_HEAD_INIT_NOLOCK, ast_string_field_init, calendar_event_destructor(), NULL, and ast_calendar_event::start.
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 706 of file res_calendar.c.
References AO2_ALLOC_OPT_LOCK_MUTEX, ao2_container_alloc_hash, CALENDAR_BUCKETS, event_cmp_fn(), event_hash_fn(), and NULL.
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 1075 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 566 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, calendar_config, ast_calendar_tech::description, ast_calendar_tech::list, load_tech_calendars(), LOG_WARNING, NULL, ast_calendar_tech::type, and ast_calendar_tech::user.
Referenced by load_module(), load_module(), load_module(), and 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 338 of file res_calendar.c.
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 |
Definition at line 604 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, calendars, ast_calendar_tech::list, match_caltech_cb(), OBJ_MULTIPLE, OBJ_NODATA, OBJ_UNLINK, ast_calendar_tech::type, and ast_calendar_tech::user.
Referenced by load_tech_calendars(), unload_module(), unload_module(), unload_module(), and unload_module().
struct ast_module * AST_MODULE_SELF_SYM | ( | void | ) |
Definition at line 1984 of file res_calendar.c.
|
static |
Create new calendar, old will be removed during reload
Definition at line 417 of file res_calendar.c.
References ao2_alloc, AO2_ALLOC_OPT_LOCK_MUTEX, ao2_container_alloc_hash, ao2_link, ao2_unlink, ast_cond_init, ast_free, ast_log, ast_pthread_create, AST_PTHREADT_NULL, ast_strdup, ast_string_field_init, ast_string_field_set, ast_strip(), ast_strlen_zero(), ast_true(), ast_variable_browse(), ast_variable_new, ast_calendar::autoreminder, CALENDAR_BUCKETS, calendar_destructor(), calendars, event_cmp_fn(), event_hash_fn(), ast_calendar::events, ast_calendar::fetch_again_at_reload, find_calendar(), last, ast_calendar_tech::load_calendar, LOG_ERROR, LOG_WARNING, name, ast_calendar::name, ast_variable::name, sla_ringing_trunk::next, ast_variable::next, ast_calendar::notify_channel, notify_channel(), ast_calendar::notify_waittime, NULL, ast_calendar::pending_deletion, ast_calendar::refresh, strsep(), ast_calendar::tech, ast_calendar::thread, ast_calendar::timeframe, ast_calendar::unload, unref_calendar(), ast_variable::value, value, var, and ast_calendar::vars.
Referenced by load_tech_calendars().
|
static |
Definition at line 375 of file res_calendar.c.
References AST_CALENDAR_BS_FREE, ast_tvnow(), and CMP_STOP.
Referenced by calendar_is_busy().
|
static |
A dialplan function that can be used to determine the busy status of a calendar.
Definition at line 1114 of file res_calendar.c.
References ast_log, ast_strlen_zero(), buf, calendar_is_busy(), find_calendar(), LOG_WARNING, and unref_calendar().
|
static |
Definition at line 304 of file res_calendar.c.
References CMP_MATCH, CMP_STOP, and ast_calendar::name.
Referenced by load_module().
|
static |
Definition at line 344 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_variables_destroy(), ast_calendar::events, ast_calendar::name, NULL, ast_calendar::tech, ast_calendar::tech_pvt, ast_calendar::thread, ast_calendar::unload, ast_calendar::unloading, ast_calendar_tech::unref_calendar, and ast_calendar::vars.
Referenced by build_calendar().
|
static |
Definition at line 909 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(), and LOG_WARNING.
Referenced by schedule_calendar_event().
|
static |
Definition at line 626 of file res_calendar.c.
References ast_debug, ast_free, AST_LIST_REMOVE_HEAD, ast_string_field_free_memory, ast_calendar_attendee::data, and ast_calendar_attendee::next.
Referenced by ast_calendar_event_alloc().
|
static |
Definition at line 885 of file res_calendar.c.
References ao2_ref, ast_log, ast_pthread_create_background, AST_PTHREADT_NULL, do_notify(), LOG_ERROR, NULL, and ast_calendar_event::start.
Referenced by schedule_calendar_event().
|
static |
Definition at line 1754 of file res_calendar.c.
References ast_channel_datastore_find(), ast_channel_lock, ast_channel_name(), ast_channel_unlock, ast_copy_string(), ast_log, ast_strlen_zero(), buf, calendar_join_attendees(), event_notification_datastore, len(), LOG_WARNING, NULL, and ast_calendar_event::start.
|
static |
Definition at line 298 of file res_calendar.c.
References ast_str_case_hash(), and ast_calendar::name.
Referenced by load_module().
|
static |
Definition at line 389 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 1326 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, buf, ast_calendar_attendee::data, len(), LOG_ERROR, and ast_calendar_attendee::next.
Referenced by calendar_event_read(), and calendar_query_result_exec().
|
static |
Definition at line 1235 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(), buf, ast_datastore::data, DATASTORE_INHERIT_FOREVER, end, eventlist_datastore_info, eventlist_destructor(), events, ast_calendar::events, find_calendar(), generate_random_string(), ast_datastore::inheritance, len(), LOG_ERROR, LOG_WARNING, and unref_calendar().
|
static |
Definition at line 1344 of file res_calendar.c.
References args, AST_APP_ARG, ast_channel_datastore_find(), ast_channel_lock, ast_channel_name(), ast_channel_unlock, ast_copy_string(), AST_DECLARE_APP_ARGS, AST_LIST_TRAVERSE, ast_log, AST_STANDARD_APP_ARGS, ast_strlen_zero(), buf, 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, eventlist_datastore_info, events, len(), evententry::list, ast_calendar_event::location, LOG_WARNING, ast_calendar::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 1437 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(), categories, find_calendar(), LOG_ERROR, LOG_WARNING, ast_calendar::name, NULL, pbx_builtin_setvar_helper(), ast_calendar::tech, unref_calendar(), value, and ast_calendar_tech::write_event.
|
static |
Definition at line 398 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, ast_calendar::tech, and unref_calendar().
Referenced by load_module().
|
static |
Definition at line 1817 of file res_calendar.c.
References CMP_MATCH, and ast_calendar::pending_deletion.
Referenced by reload().
|
static |
Definition at line 1826 of file res_calendar.c.
References CMP_MATCH, and ast_calendar::pending_deletion.
Referenced by reload().
|
static |
Definition at line 668 of file res_calendar.c.
References CMP_MATCH, and destroy_event().
Referenced by ast_calendar_clear_events().
|
static |
Definition at line 943 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, categories, ast_calendar_event::description, ast_calendar_event::end, ast_calendar_event::location, ast_calendar_attendee::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 643 of file res_calendar.c.
References ast_debug, AST_DEVICE_BUSY, AST_DEVICE_NOT_INUSE, AST_DEVSTATE_CACHABLE, ast_devstate_changed(), ast_sched_del(), calendar_is_busy(), and NULL.
Referenced by clear_events_cb(), and merge_events_cb().
|
static |
Definition at line 758 of file res_calendar.c.
References ao2_ref, ast_calendar_unref_event(), ast_channel_alloc, ast_channel_context_set(), ast_channel_datastore_add(), ast_channel_exten_set(), ast_channel_lock, ast_channel_nativeformats_set(), ast_channel_priority_set(), ast_channel_release(), ast_channel_set_rawreadformat(), ast_channel_set_rawwriteformat(), ast_channel_set_readformat(), ast_channel_set_writeformat(), ast_channel_tech_set(), ast_channel_unlock, 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_cap_alloc, ast_format_cap_append, AST_FORMAT_CAP_FLAG_DEFAULT, ast_format_slin, ast_free, ast_log, ast_pbx_run(), AST_STATE_DOWN, ast_str_buffer(), ast_str_create, ast_str_set(), ast_str_substitute_variables(), ast_strdupa, ast_strlen_zero(), ast_verb, buf, ast_datastore::data, DATASTORE_INHERIT_FOREVER, event_notification_datastore, generate_random_string(), ast_datastore::inheritance, LOG_ERROR, LOG_WARNING, ast_variable::name, ast_variable::next, NULL, null_tech, pbx_builtin_setvar_helper(), and ast_variable::value.
Referenced by calendar_event_notify().
|
static |
Definition at line 1859 of file res_calendar.c.
References ast_cond_timedwait, ast_mutex_lock, ast_mutex_unlock, ast_sched_runq(), ast_sched_wait(), ast_tvnow(), module_unloading, NULL, refresh_condition, and refreshlock.
Referenced by load_module().
|
static |
Definition at line 1609 of file res_calendar.c.
References ast_localtime(), ast_strftime(), buf, and NULL.
Referenced by handle_show_calendar().
|
static |
Definition at line 324 of file res_calendar.c.
References CMP_MATCH, CMP_STOP, and ast_calendar_event::start.
Referenced by ast_calendar_event_container_alloc(), and build_calendar().
|
static |
Definition at line 318 of file res_calendar.c.
References ast_str_hash().
Referenced by ast_calendar_event_container_alloc(), and build_calendar().
|
static |
Definition at line 712 of file res_calendar.c.
References ast_calendar_unref_event().
|
static |
Definition at line 720 of file res_calendar.c.
|
static |
|
static |
Definition at line 364 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 |
|
static |
Definition at line 310 of file res_calendar.c.
References ao2_find, calendars, 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 330 of file res_calendar.c.
References ao2_find, events, OBJ_POINTER, ast_calendar_event::start, and ast_calendar_event::uid.
Referenced by merge_events_cb().
|
static |
Generate 32 byte random string (stolen from chan_sip.c)
Definition at line 734 of file res_calendar.c.
References ast_random(), buf, and ast_calendar_event::start.
Referenced by calendar_query_exec(), do_notify(), and rtp_allocate_transport().
|
static |
Definition at line 1728 of file res_calendar.c.
References ast_sched_dump(), CLI_GENERATE, CLI_INIT, CLI_SUCCESS, ast_cli_entry::command, NULL, and ast_cli_entry::usage.
|
static |
Definition at line 1641 of file res_calendar.c.
References a, ao2_iterator_destroy(), ao2_iterator_init(), ao2_iterator_next, ast_calendar_busy_state_to_str(), ast_calendar_unref_event(), ast_cli(), ast_strdup, buf, calendars, CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, epoch_to_string(), find_calendar(), FORMAT, FORMAT2, test_val::name, NULL, ast_calendar_event::start, unref_calendar(), and ast_cli_entry::usage.
|
static |
CLI command to list available calendars.
Definition at line 1550 of file res_calendar.c.
References a, ao2_iterator_destroy(), ao2_iterator_init(), ao2_iterator_next, ast_cli(), calendar_is_busy(), calendars, CLI_GENERATE, CLI_INIT, CLI_SUCCESS, ast_cli_entry::command, FORMAT, ast_calendar::name, NULL, ast_calendar::tech, ast_calendar_tech::type, unref_calendar(), and ast_cli_entry::usage.
|
static |
CLI command to list of all calendars types currently loaded on the backend.
Definition at line 1581 of file res_calendar.c.
References a, ast_cli(), AST_LIST_LOCK, AST_LIST_TRAVERSE, AST_LIST_UNLOCK, CLI_GENERATE, CLI_INIT, CLI_SUCCESS, ast_cli_entry::command, ast_calendar_tech::description, FORMAT, ast_calendar_tech::list, NULL, ast_calendar_tech::type, and ast_cli_entry::usage.
|
static |
Definition at line 1087 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, LOG_ERROR, and reload().
|
static |
Load the module.
Module loading including tests for configuration or dependencies. This function can return AST_MODULE_LOAD_FAILURE, AST_MODULE_LOAD_DECLINE, or AST_MODULE_LOAD_SUCCESS. If a dependency or environment variable fails tests return AST_MODULE_LOAD_FAILURE. If the module can not load the configuration file or other non-critical problem return AST_MODULE_LOAD_DECLINE. On success return AST_MODULE_LOAD_SUCCESS.
Definition at line 1938 of file res_calendar.c.
References AO2_ALLOC_OPT_LOCK_MUTEX, ao2_container_alloc_hash, ARRAY_LEN, ast_cli_register_multiple, ast_cond_init, ast_config_destroy(), ast_custom_function_register, ast_devstate_prov_add(), ast_log, AST_MODULE_LOAD_DECLINE, AST_MODULE_LOAD_SUCCESS, ast_mutex_init, ast_pthread_create_background, ast_sched_context_create(), CALENDAR_BUCKETS, calendar_busy_function, calendar_cli, calendar_cmp_fn(), calendar_config, calendar_event_function, calendar_hash_fn(), calendar_query_function, calendar_query_result_function, calendar_write_function, calendars, calendarstate(), do_refresh(), load_config(), LOG_ERROR, NULL, refresh_condition, refresh_thread, refreshlock, and reloadlock.
|
static |
Definition at line 530 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, NULL, ast_calendar::tech, ast_calendar_tech::type, and unref_calendar().
Referenced by ast_calendar_register(), and reload().
|
static |
Definition at line 592 of file res_calendar.c.
References CMP_MATCH, and ast_calendar::tech.
Referenced by ast_calendar_unregister().
|
static |
Definition at line 1038 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(), ast_calendar_event::start, and ast_calendar_event::uid.
Referenced by ast_calendar_merge_events().
|
static |
Definition at line 747 of file res_calendar.c.
|
static |
Definition at line 1833 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, calendars, cb_pending_deletion(), cb_rm_pending_deletion(), ast_calendar_tech::list, load_config(), load_tech_calendars(), LOG_WARNING, NULL, OBJ_MULTIPLE, OBJ_NODATA, OBJ_UNLINK, reloadlock, and ast_calendar_tech::type.
Referenced by load_config().
|
static |
Definition at line 971 of file res_calendar.c.
References ao2_lock, ao2_unlock, ast_cond_signal, ast_debug, ast_log, ast_mutex_lock, ast_mutex_unlock, AST_SCHED_REPLACE, ast_strlen_zero(), ast_tvnow(), calendar_devstate_change(), calendar_event_notify(), LOG_WARNING, refresh_condition, refreshlock, and ast_calendar_event::start.
Referenced by add_new_event_cb(), and merge_events_cb().
|
static |
Definition at line 1890 of file res_calendar.c.
References ao2_callback, ao2_cleanup, 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_sched_context_destroy(), ast_unload_resource(), calendar_busy_function, calendar_cli, calendar_config, calendar_event_function, calendar_query_function, calendar_query_result_function, calendar_write_function, calendars, ast_calendar_tech::list, module_unloading, NULL, OBJ_MULTIPLE, OBJ_NODATA, OBJ_UNLINK, refresh_condition, refresh_thread, and refreshlock.
|
static |
Definition at line 292 of file res_calendar.c.
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 1984 of file res_calendar.c.
|
static |
Definition at line 1984 of file res_calendar.c.
|
static |
Definition at line 1136 of file res_calendar.c.
Referenced by load_module(), and unload_module().
|
static |
Definition at line 1747 of file res_calendar.c.
Referenced by load_module(), and unload_module().
|
static |
Definition at line 272 of file res_calendar.c.
Referenced by ast_calendar_config_acquire(), ast_calendar_register(), load_config(), load_module(), load_tech_calendars(), and unload_module().
|
static |
Definition at line 1812 of file res_calendar.c.
Referenced by load_module(), and unload_module().
|
static |
Definition at line 1321 of file res_calendar.c.
Referenced by load_module(), and unload_module().
|
static |
Definition at line 1432 of file res_calendar.c.
Referenced by load_module(), and unload_module().
|
static |
Definition at line 1544 of file res_calendar.c.
Referenced by load_module(), and unload_module().
|
static |
Definition at line 239 of file res_calendar.c.
Referenced by ast_calendar_unregister(), build_calendar(), find_calendar(), handle_show_calendar(), handle_show_calendars(), load_module(), reload(), and unload_module().
|
static |
Definition at line 273 of file res_calendar.c.
Referenced by ast_calendar_config_acquire(), ast_calendar_config_release(), load_config(), and load_tech_calendars().
|
static |
Definition at line 252 of file res_calendar.c.
Referenced by calendar_event_read(), and do_notify().
|
static |
Definition at line 258 of file res_calendar.c.
Referenced by calendar_query_exec(), and calendar_query_result_exec().
|
static |
Definition at line 245 of file res_calendar.c.
Referenced by do_refresh(), and unload_module().
|
static |
Definition at line 752 of file res_calendar.c.
Referenced by do_notify().
|
static |
Definition at line 243 of file res_calendar.c.
Referenced by do_refresh(), load_module(), schedule_calendar_event(), and unload_module().
|
static |
Definition at line 241 of file res_calendar.c.
Referenced by load_module(), and unload_module().
|
static |
Definition at line 242 of file res_calendar.c.
Referenced by caldav_load_calendar(), do_refresh(), ewscal_load_calendar(), exchangecal_load_calendar(), ical_load_calendar(), load_module(), schedule_calendar_event(), and unload_module().
|
static |
Definition at line 244 of file res_calendar.c.
Referenced by load_module(), and reload().
|
static |
Definition at line 240 of file res_calendar.c.
|
static |