Asterisk - The Open Source Telephony Project  21.4.1
Data Structures | Enumerations | Functions | Variables
res_calendar_ews.c File Reference

Resource for handling MS Exchange Web Service calendars. More...

#include "asterisk.h"
#include <ne_request.h>
#include <ne_session.h>
#include <ne_uri.h>
#include <ne_socket.h>
#include <ne_auth.h>
#include <ne_xml.h>
#include <ne_xmlreq.h>
#include <ne_utils.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  calendar_id
 
struct  ewscal_pvt
 
struct  xml_context::ids
 
struct  xml_context
 

Enumerations

enum  {
  XML_EVENT_CALENDAR_ITEM = 9, XML_EVENT_NAME = 10, XML_EVENT_DESCRIPTION, XML_EVENT_START,
  XML_EVENT_END, XML_EVENT_BUSY, XML_EVENT_ORGANIZER, XML_EVENT_LOCATION,
  XML_EVENT_ATTENDEE_LIST, XML_EVENT_ATTENDEE, XML_EVENT_MAILBOX, XML_EVENT_EMAIL_ADDRESS,
  XML_EVENT_CATEGORIES, XML_EVENT_CATEGORY, XML_EVENT_IMPORTANCE
}
 
enum  xml_op { XML_OP_FIND = 100, XML_OP_GET, XML_OP_CREATE }
 

Functions

static void __reg_module (void)
 
static void __unreg_module (void)
 
struct ast_moduleAST_MODULE_SELF_SYM (void)
 
static int auth_credentials (void *userdata, const char *realm, int attempts, char *username, char *secret)
 
static int cdata (void *userdata, int state, const char *cdata, size_t len)
 
static int endelm (void *userdata, int state, const char *nspace, const char *name)
 
static void ewscal_destructor (void *obj)
 
static void * ewscal_load_calendar (void *data)
 
static int ewscal_write_event (struct ast_calendar_event *event)
 
static struct calendar_idget_ewscal_ids_for (struct ewscal_pvt *pvt)
 
static const char * get_soap_action (enum xml_op op)
 
static int load_module (void)
 
static const char * msstatus (enum ast_calendar_busy_state state)
 
static const char * mstime (time_t t, char *buf, size_t buflen)
 
static time_t mstime_to_time_t (char *mstime)
 
static int parse_ewscal_id (struct ewscal_pvt *pvt, const char *id)
 
static int send_ews_request_and_parse (struct ast_str *request, struct xml_context *ctx)
 
static int ssl_verify (void *userdata, int failures, const ne_ssl_certificate *cert)
 
static int startelm (void *userdata, int parent, const char *nspace, const char *name, const char **atts)
 
static int unload_module (void)
 
static void * unref_ewscal (void *obj)
 
static int update_ewscal (struct ewscal_pvt *pvt)
 

Variables

static struct ast_module_info __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_LOAD_ORDER , .description = "Asterisk MS Exchange Web Service 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 = "da6642af068ee5e6490c5b1d2cc1d238" , .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_infoast_module_info = &__mod_info
 
static struct ast_calendar_tech ewscal_tech
 

Detailed Description

Resource for handling MS Exchange Web Service calendars.

Definition in file res_calendar_ews.c.