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
+22
View File
@@ -512,6 +512,28 @@ struct switch_management_interface {
struct switch_management_interface *next;
};
/*! \brief Abstract interface to a limit module */
struct switch_limit_interface {
/*! name of the interface */
const char *interface_name;
/*! increment */
switch_status_t (*incr) (switch_core_session_t *session, const char *realm, const char *resource, const int max, const int interval);
/*! release */
switch_status_t (*release) (switch_core_session_t *session, const char *realm, const char *resource);
/*! usage for resource */
int (*usage) (const char *realm, const char *resource, uint32_t *rcount);
/*! reset counters */
switch_status_t (*reset) (void);
/*! freform status */
char * (*status) (void);
/* internal */
switch_thread_rwlock_t *rwlock;
int refs;
switch_mutex_t *reflock;
switch_loadable_module_interface_t *parent;
struct switch_limit_interface *next;
};
/*! \brief Abstract interface to a directory module */
struct switch_directory_interface {
/*! the name of the interface */