Functions | |
| switch_status_t | switch_core_directory_open (switch_directory_handle_t *dh, char *module_name, char *source, char *dsn, char *passwd, switch_memory_pool_t *pool) |
| Open a directory handle. | |
| switch_status_t | switch_core_directory_query (switch_directory_handle_t *dh, char *base, char *query) |
| Query a directory handle. | |
| switch_status_t | switch_core_directory_next (switch_directory_handle_t *dh) |
| Obtain the next record in a lookup. | |
| switch_status_t | switch_core_directory_next_pair (switch_directory_handle_t *dh, char **var, char **val) |
| Obtain the next name/value pair in the current record. | |
| switch_status_t | switch_core_directory_close (switch_directory_handle_t *dh) |
| Close an open directory handle. | |
|
|
Close an open directory handle.
00076 {
00077 switch_status_t status;
00078
00079 status = dh->directory_interface->directory_close(dh);
00080
00081 if (switch_test_flag(dh, SWITCH_DIRECTORY_FLAG_FREE_POOL)) {
00082 switch_core_destroy_memory_pool(&dh->memory_pool);
00083 }
00084
00085 return status;
00086 }
|
|
|
Obtain the next record in a lookup.
00066 {
00067 return dh->directory_interface->directory_next(dh);
00068 }
|
|
||||||||||||||||
|
Obtain the next name/value pair in the current record.
00071 {
00072 return dh->directory_interface->directory_next_pair(dh, var, val);
00073 }
|
|
||||||||||||||||||||||||||||
|
Open a directory handle.
00040 {
00041 switch_status_t status;
00042
00043 if ((dh->directory_interface = switch_loadable_module_get_directory_interface(module_name)) == 0) {
00044 switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "invalid directory module [%s]!\n", module_name);
00045 return SWITCH_STATUS_GENERR;
00046 }
00047
00048 if (pool) {
00049 dh->memory_pool = pool;
00050 } else {
00051 if ((status = switch_core_new_memory_pool(&dh->memory_pool)) != SWITCH_STATUS_SUCCESS) {
00052 return status;
00053 }
00054 switch_set_flag(dh, SWITCH_DIRECTORY_FLAG_FREE_POOL);
00055 }
00056
00057 return dh->directory_interface->directory_open(dh, source, dsn, passwd);
00058 }
|
Here is the call graph for this function:

|
||||||||||||||||
|
Query a directory handle.
00061 {
00062 return dh->directory_interface->directory_query(dh, base, query);
00063 }
|
1.3.9.1