#include "asterisk.h"
#include <fcntl.h>
#include <signal.h>
#include <sys/time.h>
#include <gtk/gtk.h>
#include <glib.h>
#include "asterisk/pbx.h"
#include "asterisk/config.h"
#include "asterisk/module.h"
#include "asterisk/logger.h"
#include "asterisk/cli.h"
#include "asterisk/utils.h"
#include "asterisk/paths.h"
#include "asterisk/term.h"
Go to the source code of this file.
Functions | |
static void | __reg_module (void) |
static void | __unreg_module (void) |
static void | __verboser (const char *_stuff) |
static int | add_mod (const char *module, const char *description, int usecount, const char *like) |
static void | add_module (void) |
static int | cleanup (void *useless) |
static int | cli_activate (void) |
static void | cliinput (void *data, int source, GdkInputCondition ic) |
static void * | consolethread (void *data) |
static void | exit_completely (GtkWidget *widget, gpointer data) |
static void | exit_nicely (GtkWidget *widget, gpointer data) |
static void | exit_now (GtkWidget *widget, gpointer data) |
static void | file_ok_sel (GtkWidget *w, GtkFileSelection *fs) |
static int | load_module (void) |
static int | mod_update (void) |
static int | reload (void) |
static void | remove_module (void) |
static int | show_console (void) |
static int | unload_module (void) |
static void | update_statusbar (char *msg) |
static void | verboser (const char *stuff) |
Variables | |
static struct ast_module_info | __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_DEFAULT , .description = "GTK Console" , .key = "This paragraph is copyright (c) 2006 by Digium, Inc. \In order for your module to load, it must return this \key via a function called \"key\". Any code which \includes this paragraph must be licensed under the GNU \General Public License version 2 or later (at your \option). In addition to Digium's general reservations \of rights, Digium expressly reserves the right to \allow other parties to license this paragraph under \different terms. Any use of Digium, Inc. trademarks or \logos (including \"Asterisk\" or \"Digium\") without \express written permission of Digium, Inc. is prohibited.\n" , .buildopt_sum = "068e67f60f50dd9ee86464c05884a49d" , .load = load_module, .unload = unload_module, .reload = reload, } |
static const struct ast_module_info * | ast_module_info = &__mod_info |
static int | cleanupid = -1 |
static GtkWidget * | cli |
static int | clipipe [2] |
static GtkWidget * | closew |
static pthread_t | console_thread |
static int | inuse = 0 |
static struct timeval | last |
static GtkWidget * | modules |
static GtkWidget * | quit |
static GtkWidget * | statusbar |
static GtkWidget * | verb |
static ast_mutex_t | verb_lock = ((ast_mutex_t) PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP ) |
static GtkWidget * | window |
Definition in file pbx_gtkconsole.c.
static void __reg_module | ( | void | ) | [static] |
Definition at line 510 of file pbx_gtkconsole.c.
static void __unreg_module | ( | void | ) | [static] |
Definition at line 510 of file pbx_gtkconsole.c.
static void __verboser | ( | const char * | _stuff | ) | [static] |
Definition at line 100 of file pbx_gtkconsole.c.
References ast_strdupa, ast_tvdiff_ms(), ast_tvzero(), cleanup(), and term_strip().
Referenced by cliinput(), and verboser().
00101 { 00102 char *s2[2]; 00103 struct timeval tv; 00104 int ms; 00105 char *stuff; 00106 00107 stuff = ast_strdupa(_stuff); 00108 term_strip(stuff, stuff, strlen(stuff) + 1); 00109 00110 s2[0] = (char *)stuff; 00111 s2[1] = NULL; 00112 gtk_clist_freeze(GTK_CLIST(verb)); 00113 gtk_clist_append(GTK_CLIST(verb), s2); 00114 if (!ast_tvzero(last)) { 00115 gdk_threads_leave(); 00116 gettimeofday(&tv, NULL); 00117 if (cleanupid > -1) 00118 gtk_timeout_remove(cleanupid); 00119 ms = ast_tvdiff_ms(tv, last); 00120 if (ms < 100) { 00121 /* We just got a message within 100ms, so just schedule an update 00122 in the near future */ 00123 cleanupid = gtk_timeout_add(200, cleanup, NULL); 00124 } else { 00125 cleanup(&cleanupid); 00126 } 00127 last = tv; 00128 } else { 00129 gettimeofday(&last, NULL); 00130 } 00131 }
static int add_mod | ( | const char * | module, | |
const char * | description, | |||
int | usecount, | |||
const char * | like | |||
) | [static] |
Definition at line 277 of file pbx_gtkconsole.c.
References pass.
Referenced by mod_update().
00278 { 00279 char use[10]; 00280 const char *pass[4]; 00281 int row; 00282 snprintf(use, sizeof(use), "%d", usecount); 00283 pass[0] = module; 00284 pass[1] = description; 00285 pass[2] = use; 00286 pass[3] = NULL; 00287 row = gtk_clist_append(GTK_CLIST(modules), (char **) pass); 00288 gtk_clist_set_row_data(GTK_CLIST(modules), row, (char *) module); 00289 return 0; 00290 }
static void add_module | ( | void | ) | [static] |
Definition at line 263 of file pbx_gtkconsole.c.
References ast_config_AST_MODULE_DIR, and file_ok_sel().
Referenced by show_console().
00264 { 00265 char tmp[PATH_MAX]; 00266 GtkWidget *filew; 00267 snprintf(tmp, sizeof(tmp), "%s/*.so", ast_config_AST_MODULE_DIR); 00268 filew = gtk_file_selection_new("Load Module"); 00269 gtk_signal_connect(GTK_OBJECT (GTK_FILE_SELECTION(filew)->ok_button), 00270 "clicked", GTK_SIGNAL_FUNC(file_ok_sel), filew); 00271 gtk_signal_connect_object(GTK_OBJECT (GTK_FILE_SELECTION(filew)->cancel_button), 00272 "clicked", GTK_SIGNAL_FUNC(gtk_widget_destroy), GTK_OBJECT(filew)); 00273 gtk_file_selection_set_filename(GTK_FILE_SELECTION(filew), (char *)tmp); 00274 gtk_widget_show(filew); 00275 }
static int cleanup | ( | void * | useless | ) | [static] |
Definition at line 88 of file pbx_gtkconsole.c.
Referenced by __verboser(), _sip_tcp_helper_thread(), build_user(), and handle_uri().
00089 { 00090 gdk_threads_enter(); 00091 gtk_clist_thaw(GTK_CLIST(verb)); 00092 gtk_widget_queue_resize(verb->parent); 00093 gtk_clist_moveto(GTK_CLIST(verb), GTK_CLIST(verb)->rows - 1, 0, 0, 0); 00094 cleanupid = -1; 00095 gdk_threads_leave(); 00096 return 0; 00097 }
static int cli_activate | ( | void | ) | [static] |
Definition at line 347 of file pbx_gtkconsole.c.
References ast_cli_command(), buf, and TRUE.
Referenced by show_console().
00348 { 00349 char buf[256] = ""; 00350 strncpy(buf, gtk_entry_get_text(GTK_ENTRY(cli)), sizeof(buf) - 1); 00351 gtk_entry_set_text(GTK_ENTRY(cli), ""); 00352 if (strlen(buf)) { 00353 ast_cli_command(clipipe[1], buf); 00354 } 00355 return TRUE; 00356 }
static void cliinput | ( | void * | data, | |
int | source, | |||
GdkInputCondition | ic | |||
) | [static] |
Definition at line 145 of file pbx_gtkconsole.c.
References __verboser(), and buf.
Referenced by show_console().
00146 { 00147 static char buf[256]; 00148 static int offset = 0; 00149 int res; 00150 char *c; 00151 char *l; 00152 char n; 00153 /* Read as much stuff is there */ 00154 res = read(source, buf + offset, sizeof(buf) - 1 - offset); 00155 if (res > -1) 00156 buf[res + offset] = '\0'; 00157 /* make sure we've null terminated whatever we have so far */ 00158 c = buf; 00159 l = buf; 00160 while(*c) { 00161 if (*c == '\n') { 00162 /* Keep the trailing \n */ 00163 c++; 00164 n = *c; 00165 *c = '\0'; 00166 __verboser(l); 00167 *(c - 1) = '\0'; 00168 *c = n; 00169 l = c; 00170 } else 00171 c++; 00172 } 00173 if (strlen(l)) { 00174 /* We have some left over */ 00175 memmove(buf, l, strlen(l) + 1); 00176 offset = strlen(buf); 00177 } else { 00178 offset = 0; 00179 } 00180 00181 }
static void* consolethread | ( | void * | data | ) | [static] |
Definition at line 338 of file pbx_gtkconsole.c.
00339 { 00340 gtk_widget_show(window); 00341 gdk_threads_enter(); 00342 gtk_main(); 00343 gdk_threads_leave(); 00344 return NULL; 00345 }
static void exit_completely | ( | GtkWidget * | widget, | |
gpointer | data | |||
) | [static] |
Definition at line 322 of file pbx_gtkconsole.c.
References ast_cli_command().
Referenced by show_console().
00323 { 00324 #if 0 00325 /* Clever... */ 00326 ast_cli_command(clipipe[1], "quit"); 00327 #else 00328 kill(getpid(), SIGTERM); 00329 #endif 00330 }
static void exit_nicely | ( | GtkWidget * | widget, | |
gpointer | data | |||
) | [static] |
Definition at line 332 of file pbx_gtkconsole.c.
Referenced by show_console().
00333 { 00334 fflush(stdout); 00335 gtk_widget_destroy(window); 00336 }
static void exit_now | ( | GtkWidget * | widget, | |
gpointer | data | |||
) | [static] |
Definition at line 308 of file pbx_gtkconsole.c.
References ast_loader_unregister(), ast_unload_resource(), ast_unregister_verbose(), ast_update_use_count(), ast_verb, mod_update(), and verboser().
Referenced by show_console().
00309 { 00310 int res; 00311 00312 ast_loader_unregister(mod_update); 00313 gtk_main_quit(); 00314 inuse--; 00315 ast_update_use_count(); 00316 res = ast_unregister_verbose(verboser); 00317 ast_unload_resource("pbx_gtkconsole", 0); 00318 ast_verb(2, "GTK Console Monitor Exiting\n"); 00319 /* XXX Trying to quit after calling this makes asterisk segfault XXX */ 00320 }
static void file_ok_sel | ( | GtkWidget * | w, | |
GtkFileSelection * | fs | |||
) | [static] |
Definition at line 243 of file pbx_gtkconsole.c.
References ast_config_AST_MODULE_DIR, ast_load_resource(), buf, and update_statusbar().
Referenced by add_module().
00244 { 00245 char tmp[PATH_MAX]; 00246 char *module = gtk_file_selection_get_filename(fs); 00247 char buf[256]; 00248 snprintf(tmp, sizeof(tmp), "%s/", ast_config_AST_MODULE_DIR); 00249 if (!strncmp(module, (char *)tmp, strlen(tmp))) 00250 module += strlen(tmp); 00251 gdk_threads_leave(); 00252 if (ast_load_resource(module)) { 00253 snprintf(buf, sizeof(buf), "Error loading module '%s'.", module); 00254 update_statusbar(buf); 00255 } else { 00256 snprintf(buf, sizeof(buf), "Module '%s' loaded", module); 00257 update_statusbar(buf); 00258 } 00259 gdk_threads_enter(); 00260 gtk_widget_destroy(GTK_WIDGET(fs)); 00261 }
static int load_module | ( | void | ) | [static] |
Definition at line 483 of file pbx_gtkconsole.c.
References ast_log(), AST_MODULE_LOAD_FAILURE, AST_MODULE_LOAD_SUCCESS, ast_update_use_count(), ast_verb, LOG_DEBUG, LOG_WARNING, option_debug, and show_console().
00484 { 00485 if (pipe(clipipe)) { 00486 ast_log(LOG_WARNING, "Unable to create CLI pipe\n"); 00487 return AST_MODULE_LOAD_FAILURE; 00488 } 00489 g_thread_init(NULL); 00490 if (gtk_init_check(NULL, NULL)) { 00491 if (!show_console()) { 00492 inuse++; 00493 ast_update_use_count(); 00494 ast_verb(2, "Launched GTK Console monitor\n"); 00495 } else 00496 ast_log(LOG_WARNING, "Unable to start GTK console\n"); 00497 } else { 00498 if (option_debug) 00499 ast_log(LOG_DEBUG, "Unable to start GTK console monitor -- ignoring\n"); 00500 else 00501 ast_verb(2, "GTK is not available -- skipping monitor\n"); 00502 } 00503 return AST_MODULE_LOAD_SUCCESS; 00504 }
static int mod_update | ( | void | ) | [static] |
Definition at line 292 of file pbx_gtkconsole.c.
References add_mod(), and ast_update_module_list().
Referenced by exit_now(), and show_console().
00293 { 00294 char *module= NULL; 00295 /* Update the mod stuff */ 00296 if (GTK_CLIST(modules)->selection) { 00297 module= (char *)gtk_clist_get_row_data(GTK_CLIST(modules), (long) GTK_CLIST(modules)->selection->data); 00298 } 00299 gtk_clist_freeze(GTK_CLIST(modules)); 00300 gtk_clist_clear(GTK_CLIST(modules)); 00301 ast_update_module_list(add_mod, NULL); 00302 if (module) 00303 gtk_clist_select_row(GTK_CLIST(modules), gtk_clist_find_row_from_data(GTK_CLIST(modules), module), -1); 00304 gtk_clist_thaw(GTK_CLIST(modules)); 00305 return 1; 00306 }
static int reload | ( | void | ) | [static] |
Definition at line 203 of file pbx_gtkconsole.c.
References ast_load_resource(), AST_MODULE_LOAD_SUCCESS, ast_unload_resource(), buf, free, strdup, and update_statusbar().
00204 { 00205 int res, x; 00206 char *module; 00207 char buf[256]; 00208 if (GTK_CLIST(modules)->selection) { 00209 module= (char *)gtk_clist_get_row_data(GTK_CLIST(modules), (long) GTK_CLIST(modules)->selection->data); 00210 module = strdup(module); 00211 if (module) { 00212 gdk_threads_leave(); 00213 res = ast_unload_resource(module, 0); 00214 gdk_threads_enter(); 00215 if (res) { 00216 snprintf(buf, sizeof(buf), "Module '%s' is in use", module); 00217 update_statusbar(buf); 00218 } else { 00219 gdk_threads_leave(); 00220 res = ast_load_resource(module); 00221 gdk_threads_enter(); 00222 if (res) { 00223 snprintf(buf, sizeof(buf), "Error reloading module '%s'", module); 00224 } else { 00225 snprintf(buf, sizeof(buf), "Module '%s' reloaded", module); 00226 } 00227 for (x=0; x < GTK_CLIST(modules)->rows; x++) { 00228 if (!strcmp((char *)gtk_clist_get_row_data(GTK_CLIST(modules), x), module)) { 00229 gtk_clist_select_row(GTK_CLIST(modules), x, -1); 00230 break; 00231 } 00232 } 00233 update_statusbar(buf); 00234 00235 } 00236 free(module); 00237 } 00238 } 00239 00240 return AST_MODULE_LOAD_SUCCESS; 00241 }
static void remove_module | ( | void | ) | [static] |
Definition at line 183 of file pbx_gtkconsole.c.
References ast_unload_resource(), buf, and update_statusbar().
Referenced by show_console().
00184 { 00185 int res; 00186 char *module; 00187 char buf[256]; 00188 if (GTK_CLIST(modules)->selection) { 00189 module = (char *) gtk_clist_get_row_data(GTK_CLIST(modules), (long) GTK_CLIST(modules)->selection->data); 00190 gdk_threads_leave(); 00191 res = ast_unload_resource(module, 0); 00192 gdk_threads_enter(); 00193 if (res) { 00194 snprintf(buf, sizeof(buf), "Module '%s' is in use", module); 00195 update_statusbar(buf); 00196 } else { 00197 snprintf(buf, sizeof(buf), "Module '%s' removed", module); 00198 update_statusbar(buf); 00199 } 00200 } 00201 }
static int show_console | ( | void | ) | [static] |
Definition at line 358 of file pbx_gtkconsole.c.
References add_module(), ast_loader_register(), ast_pthread_create, ast_register_verbose(), cli_activate(), cliinput(), consolethread, exit_completely(), exit_nicely(), exit_now(), FALSE, mod_update(), reload, remove_module(), TRUE, update_statusbar(), and verboser().
Referenced by load_module().
00359 { 00360 GtkWidget *hbox; 00361 GtkWidget *wbox; 00362 GtkWidget *notebook; 00363 GtkWidget *sw; 00364 GtkWidget *bbox, *hbbox, *add, *removew, *reloadw; 00365 char *modtitles[3] = { "Module", "Description", "Use Count" }; 00366 int res; 00367 00368 window = gtk_window_new(GTK_WINDOW_TOPLEVEL); 00369 00370 statusbar = gtk_statusbar_new(); 00371 gtk_widget_show(statusbar); 00372 00373 gtk_signal_connect(GTK_OBJECT(window), "delete_event", 00374 GTK_SIGNAL_FUNC (exit_nicely), window); 00375 gtk_signal_connect(GTK_OBJECT(window), "destroy", 00376 GTK_SIGNAL_FUNC (exit_now), window); 00377 gtk_container_set_border_width(GTK_CONTAINER(window), 10); 00378 00379 quit = gtk_button_new_with_label("Quit Asterisk"); 00380 gtk_signal_connect(GTK_OBJECT(quit), "clicked", 00381 GTK_SIGNAL_FUNC (exit_completely), window); 00382 gtk_widget_show(quit); 00383 00384 closew = gtk_button_new_with_label("Close Window"); 00385 gtk_signal_connect(GTK_OBJECT(closew), "clicked", 00386 GTK_SIGNAL_FUNC (exit_nicely), window); 00387 gtk_widget_show(closew); 00388 00389 notebook = gtk_notebook_new(); 00390 verb = gtk_clist_new(1); 00391 gtk_clist_columns_autosize(GTK_CLIST(verb)); 00392 sw = gtk_scrolled_window_new(NULL, NULL); 00393 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS); 00394 gtk_container_add(GTK_CONTAINER(sw), verb); 00395 gtk_widget_show(verb); 00396 gtk_widget_show(sw); 00397 gtk_widget_set_usize(verb, 640, 400); 00398 gtk_notebook_append_page(GTK_NOTEBOOK(notebook), sw, gtk_label_new("Verbose Status")); 00399 00400 00401 modules = gtk_clist_new_with_titles(3, modtitles); 00402 gtk_clist_columns_autosize(GTK_CLIST(modules)); 00403 gtk_clist_set_column_auto_resize(GTK_CLIST(modules), 0, TRUE); 00404 gtk_clist_set_column_auto_resize(GTK_CLIST(modules), 1, TRUE); 00405 gtk_clist_set_column_auto_resize(GTK_CLIST(modules), 2, TRUE); 00406 gtk_clist_set_sort_column(GTK_CLIST(modules), 0); 00407 gtk_clist_set_auto_sort(GTK_CLIST(modules), TRUE); 00408 gtk_clist_column_titles_passive(GTK_CLIST(modules)); 00409 sw = gtk_scrolled_window_new(NULL, NULL); 00410 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS); 00411 gtk_container_add(GTK_CONTAINER(sw), modules); 00412 gtk_clist_set_selection_mode(GTK_CLIST(modules), GTK_SELECTION_BROWSE); 00413 gtk_widget_show(modules); 00414 gtk_widget_show(sw); 00415 00416 add = gtk_button_new_with_label("Load..."); 00417 gtk_widget_show(add); 00418 removew = gtk_button_new_with_label("Unload"); 00419 gtk_widget_show(removew); 00420 reloadw = gtk_button_new_with_label("Reload"); 00421 gtk_widget_show(reloadw); 00422 gtk_signal_connect(GTK_OBJECT(removew), "clicked", 00423 GTK_SIGNAL_FUNC (remove_module), window); 00424 gtk_signal_connect(GTK_OBJECT(add), "clicked", 00425 GTK_SIGNAL_FUNC (add_module), window); 00426 gtk_signal_connect(GTK_OBJECT(reloadw), "clicked", 00427 GTK_SIGNAL_FUNC (reload), window); 00428 00429 bbox = gtk_vbox_new(FALSE, 5); 00430 gtk_widget_show(bbox); 00431 00432 gtk_widget_set_usize(bbox, 100, -1); 00433 gtk_box_pack_start(GTK_BOX(bbox), add, FALSE, FALSE, 5); 00434 gtk_box_pack_start(GTK_BOX(bbox), removew, FALSE, FALSE, 5); 00435 gtk_box_pack_start(GTK_BOX(bbox), reloadw, FALSE, FALSE, 5); 00436 00437 hbbox = gtk_hbox_new(FALSE, 5); 00438 gtk_widget_show(hbbox); 00439 00440 gtk_box_pack_start(GTK_BOX(hbbox), sw, TRUE, TRUE, 5); 00441 gtk_box_pack_start(GTK_BOX(hbbox), bbox, FALSE, FALSE, 5); 00442 00443 gtk_notebook_append_page(GTK_NOTEBOOK(notebook), hbbox, gtk_label_new("Module Information")); 00444 00445 gtk_widget_show(notebook); 00446 00447 wbox = gtk_hbox_new(FALSE, 5); 00448 gtk_widget_show(wbox); 00449 gtk_box_pack_end(GTK_BOX(wbox), quit, FALSE, FALSE, 5); 00450 gtk_box_pack_end(GTK_BOX(wbox), closew, FALSE, FALSE, 5); 00451 00452 hbox = gtk_vbox_new(FALSE, 0); 00453 gtk_widget_show(hbox); 00454 00455 /* Command line */ 00456 cli = gtk_entry_new(); 00457 gtk_widget_show(cli); 00458 00459 gtk_signal_connect(GTK_OBJECT(cli), "activate", 00460 GTK_SIGNAL_FUNC (cli_activate), NULL); 00461 00462 gtk_box_pack_start(GTK_BOX(hbox), notebook, TRUE, TRUE, 5); 00463 gtk_box_pack_start(GTK_BOX(hbox), wbox, FALSE, FALSE, 5); 00464 gtk_box_pack_start(GTK_BOX(hbox), cli, FALSE, FALSE, 0); 00465 gtk_box_pack_start(GTK_BOX(hbox), statusbar, FALSE, FALSE, 0); 00466 gtk_container_add(GTK_CONTAINER(window), hbox); 00467 gtk_window_set_title(GTK_WINDOW(window), "Asterisk Console"); 00468 gtk_widget_grab_focus(cli); 00469 ast_pthread_create(&console_thread, NULL, consolethread, NULL); 00470 /* XXX Okay, seriously fix me! XXX */ 00471 usleep(100000); 00472 res = ast_register_verbose(verboser); 00473 gtk_clist_freeze(GTK_CLIST(verb)); 00474 ast_loader_register(mod_update); 00475 gtk_clist_thaw(GTK_CLIST(verb)); 00476 gdk_input_add(clipipe[0], GDK_INPUT_READ, cliinput, NULL); 00477 mod_update(); 00478 update_statusbar("Asterisk Console Ready"); 00479 return 0; 00480 }
static int unload_module | ( | void | ) | [static] |
Definition at line 74 of file pbx_gtkconsole.c.
00075 { 00076 if (inuse) { 00077 /* Kill off the main thread */ 00078 pthread_cancel(console_thread); 00079 gdk_threads_enter(); 00080 gtk_widget_destroy(window); 00081 gdk_threads_leave(); 00082 close(clipipe[0]); 00083 close(clipipe[1]); 00084 } 00085 return 0; 00086 }
static void update_statusbar | ( | char * | msg | ) | [static] |
Definition at line 68 of file pbx_gtkconsole.c.
Referenced by file_ok_sel(), reload(), remove_module(), and show_console().
00069 { 00070 gtk_statusbar_pop(GTK_STATUSBAR(statusbar), 1); 00071 gtk_statusbar_push(GTK_STATUSBAR(statusbar), 1, msg); 00072 }
static void verboser | ( | const char * | stuff | ) | [static] |
Definition at line 133 of file pbx_gtkconsole.c.
References __verboser(), ast_mutex_lock(), ast_mutex_unlock(), and verb_lock.
Referenced by exit_now(), and show_console().
00134 { 00135 if (*stuff == 127) { 00136 stuff++; 00137 } 00138 00139 ast_mutex_lock(&verb_lock); 00140 /* Lock appropriately if we're really being called in verbose mode */ 00141 __verboser(stuff); 00142 ast_mutex_unlock(&verb_lock); 00143 }
struct ast_module_info __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_DEFAULT , .description = "GTK Console" , .key = "This paragraph is copyright (c) 2006 by Digium, Inc. \In order for your module to load, it must return this \key via a function called \"key\". Any code which \includes this paragraph must be licensed under the GNU \General Public License version 2 or later (at your \option). In addition to Digium's general reservations \of rights, Digium expressly reserves the right to \allow other parties to license this paragraph under \different terms. Any use of Digium, Inc. trademarks or \logos (including \"Asterisk\" or \"Digium\") without \express written permission of Digium, Inc. is prohibited.\n" , .buildopt_sum = "068e67f60f50dd9ee86464c05884a49d" , .load = load_module, .unload = unload_module, .reload = reload, } [static] |
Definition at line 510 of file pbx_gtkconsole.c.
const struct ast_module_info* ast_module_info = &__mod_info [static] |
Definition at line 510 of file pbx_gtkconsole.c.
int cleanupid = -1 [static] |
Definition at line 56 of file pbx_gtkconsole.c.
GtkWidget* cli [static] |
Definition at line 64 of file pbx_gtkconsole.c.
int clipipe[2] [static] |
Definition at line 55 of file pbx_gtkconsole.c.
GtkWidget* closew [static] |
Definition at line 60 of file pbx_gtkconsole.c.
pthread_t console_thread [static] |
Definition at line 52 of file pbx_gtkconsole.c.
int inuse = 0 [static] |
Definition at line 54 of file pbx_gtkconsole.c.
struct timeval last [static] |
Definition at line 66 of file pbx_gtkconsole.c.
GtkWidget* modules [static] |
Definition at line 62 of file pbx_gtkconsole.c.
GtkWidget* quit [static] |
Definition at line 59 of file pbx_gtkconsole.c.
Referenced by launch_asyncagi(), mwi_thread(), and ss_thread().
GtkWidget* statusbar [static] |
Definition at line 63 of file pbx_gtkconsole.c.
GtkWidget* verb [static] |
ast_mutex_t verb_lock = ((ast_mutex_t) PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP ) [static] |
GtkWidget* window [static] |
Definition at line 58 of file pbx_gtkconsole.c.