sync changes in branch rupa_limit

This commit is contained in:
Rupa Schomaker
2010-04-01 21:31:14 -05:00
parent f6eda2c23b
commit 0e8a26f840
19 changed files with 2165 additions and 1546 deletions
+21
View File
@@ -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) \