mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-24 05:02:10 +00:00
sync changes in branch rupa_limit
This commit is contained in:
@@ -81,6 +81,8 @@ SWITCH_BEGIN_EXTERN_C
|
||||
switch_asr_interface_t *asr_interface;
|
||||
/*! the table of management interfaces the module has implmented */
|
||||
switch_management_interface_t *management_interface;
|
||||
/*! the table of limit interfaces the module has implmented */
|
||||
switch_limit_interface_t *limit_interface;
|
||||
switch_thread_rwlock_t *rwlock;
|
||||
int refs;
|
||||
switch_memory_pool_t *pool;
|
||||
@@ -204,6 +206,13 @@ SWITCH_DECLARE(switch_say_interface_t *) switch_loadable_module_get_say_interfac
|
||||
*/
|
||||
SWITCH_DECLARE(switch_management_interface_t *) switch_loadable_module_get_management_interface(const char *relative_oid);
|
||||
|
||||
/*!
|
||||
\brief Retrieve the limit interface by it's registered name
|
||||
\param name the name of the limit interface
|
||||
\return the desired limit interface
|
||||
*/
|
||||
SWITCH_DECLARE(switch_limit_interface_t *) switch_loadable_module_get_limit_interface(const char *name);
|
||||
|
||||
/*!
|
||||
\brief Retrieve the list of loaded codecs into an array
|
||||
\param array the array to populate
|
||||
@@ -315,6 +324,18 @@ SWITCH_MOD_DECLARE(switch_status_t) switch_module_shutdown(void);
|
||||
break; \
|
||||
}
|
||||
|
||||
#define SWITCH_ADD_LIMIT(limit_int, int_name, incrptr, releaseptr, usageptr, resetptr, statusptr) \
|
||||
for (;;) { \
|
||||
limit_int = (switch_limit_interface_t *)switch_loadable_module_create_interface(*module_interface, SWITCH_LIMIT_INTERFACE); \
|
||||
limit_int->incr = incrptr; \
|
||||
limit_int->release = releaseptr; \
|
||||
limit_int->usage = usageptr; \
|
||||
limit_int->reset = resetptr; \
|
||||
limit_int->status = statusptr; \
|
||||
limit_int->interface_name = int_name; \
|
||||
break; \
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(uint32_t) switch_core_codec_next_id(void);
|
||||
|
||||
#define SWITCH_ADD_CODEC(codec_int, int_name) \
|
||||
|
||||
Reference in New Issue
Block a user