mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-02-24 18:41:57 +00:00
73 lines
1.9 KiB
C
73 lines
1.9 KiB
C
/*
|
|
* mod_v8 for FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
|
* Copyright (C) 2013-2014, Peter Olsson <peter@olssononline.se>
|
|
*
|
|
* Version: MPL 1.1
|
|
*
|
|
* The contents of this file are subject to the Mozilla Public License Version
|
|
* 1.1 (the "License"); you may not use this file except in compliance with
|
|
* the License. You may obtain a copy of the License at
|
|
* http://www.mozilla.org/MPL/
|
|
*
|
|
* Software distributed under the License is distributed on an "AS IS" basis,
|
|
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
|
* for the specific language governing rights and limitations under the
|
|
* License.
|
|
*
|
|
* The Original Code is ported from FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
|
*
|
|
* The Initial Developer of the Original Code is
|
|
* Anthony Minessale II <anthm@freeswitch.org>
|
|
* Portions created by the Initial Developer are Copyright (C)
|
|
* the Initial Developer. All Rights Reserved.
|
|
*
|
|
* Contributor(s):
|
|
* Peter Olsson <peter@olssononline.se>
|
|
* Anthony Minessale II <anthm@freeswitch.org>
|
|
*
|
|
* mod_v8.h -- JavaScript FreeSWITCH module header file
|
|
*
|
|
*/
|
|
|
|
#ifndef MOD_V8_H
|
|
#define MOD_V8_H
|
|
|
|
#include "javascript.hpp"
|
|
#include <switch.h>
|
|
|
|
SWITCH_BEGIN_EXTERN_C
|
|
|
|
#define JS_BUFFER_SIZE 1024 * 32
|
|
#define JS_BLOCK_SIZE JS_BUFFER_SIZE
|
|
|
|
typedef switch_status_t (*v8_mod_load_t) (const v8::FunctionCallbackInfo<v8::Value>& info);
|
|
|
|
typedef struct {
|
|
const char *name;
|
|
v8_mod_load_t v8_mod_load;
|
|
} v8_mod_interface_t;
|
|
|
|
typedef switch_status_t (*v8_mod_init_t) (const v8_mod_interface_t **module_interface);
|
|
|
|
typedef struct {
|
|
switch_hash_t *load_hash;
|
|
switch_memory_pool_t *pool;
|
|
} module_manager_t;
|
|
|
|
extern module_manager_t module_manager;
|
|
|
|
SWITCH_END_EXTERN_C
|
|
|
|
#endif /* MOD_V8_H */
|
|
|
|
/* For Emacs:
|
|
* Local Variables:
|
|
* mode:c
|
|
* indent-tabs-mode:t
|
|
* tab-width:4
|
|
* c-basic-offset:4
|
|
* End:
|
|
* For VIM:
|
|
* vim:set softtabstop=4 shiftwidth=4 tabstop=4 noet:
|
|
*/
|