#include "asterisk.h"
#include <sys/types.h>
#include <stdlib.h>
#include <fcntl.h>
#include <unistd.h>
#include <stdio.h>
#include <string.h>
#include <stdarg.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/options.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 | AST_MODFLAG_BUILDSUM, .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 = "361d7bb937402d51e4658efb5b4d76e4" , .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_MUTEX_INITIALIZER ) |
static GtkWidget * | window |
Definition in file pbx_gtkconsole.c.
static void __reg_module | ( | void | ) | [static] |
Definition at line 515 of file pbx_gtkconsole.c.
static void __unreg_module | ( | void | ) | [static] |
Definition at line 515 of file pbx_gtkconsole.c.
static void __verboser | ( | const char * | _stuff | ) | [static] |
Definition at line 107 of file pbx_gtkconsole.c.
References ast_strdupa, ast_tvdiff_ms(), ast_tvzero(), cleanup(), and term_strip().
Referenced by cliinput(), and verboser().
00108 { 00109 char *s2[2]; 00110 struct timeval tv; 00111 int ms; 00112 char *stuff; 00113 00114 stuff = ast_strdupa(_stuff); 00115 term_strip(stuff, stuff, strlen(stuff) + 1); 00116 00117 s2[0] = (char *)stuff; 00118 s2[1] = NULL; 00119 gtk_clist_freeze(GTK_CLIST(verb)); 00120 gtk_clist_append(GTK_CLIST(verb), s2); 00121 if (!ast_tvzero(last)) { 00122 gdk_threads_leave(); 00123 gettimeofday(&tv, NULL); 00124 if (cleanupid > -1) 00125 gtk_timeout_remove(cleanupid); 00126 ms = ast_tvdiff_ms(tv, last); 00127 if (ms < 100) { 00128 /* We just got a message within 100ms, so just schedule an update 00129 in the near future */ 00130 cleanupid = gtk_timeout_add(200, cleanup, NULL); 00131 } else { 00132 cleanup(&cleanupid); 00133 } 00134 last = tv; 00135 } else { 00136 gettimeofday(&last, NULL); 00137 } 00138 }
static int add_mod | ( | const char * | module, | |
const char * | description, | |||
int | usecount, | |||
const char * | like | |||
) | [static] |
Definition at line 284 of file pbx_gtkconsole.c.
Referenced by mod_update().
00285 { 00286 char use[10]; 00287 const char *pass[4]; 00288 int row; 00289 snprintf(use, sizeof(use), "%d", usecount); 00290 pass[0] = module; 00291 pass[1] = description; 00292 pass[2] = use; 00293 pass[3] = NULL; 00294 row = gtk_clist_append(GTK_CLIST(modules), (char **) pass); 00295 gtk_clist_set_row_data(GTK_CLIST(modules), row, (char *) module); 00296 return 0; 00297 }
static void add_module | ( | void | ) | [static] |
Definition at line 270 of file pbx_gtkconsole.c.
References ast_config_AST_MODULE_DIR, and file_ok_sel().
Referenced by show_console().
00271 { 00272 char tmp[PATH_MAX]; 00273 GtkWidget *filew; 00274 snprintf(tmp, sizeof(tmp), "%s/*.so", ast_config_AST_MODULE_DIR); 00275 filew = gtk_file_selection_new("Load Module"); 00276 gtk_signal_connect(GTK_OBJECT (GTK_FILE_SELECTION(filew)->ok_button), 00277 "clicked", GTK_SIGNAL_FUNC(file_ok_sel), filew); 00278 gtk_signal_connect_object(GTK_OBJECT (GTK_FILE_SELECTION(filew)->cancel_button), 00279 "clicked", GTK_SIGNAL_FUNC(gtk_widget_destroy), GTK_OBJECT(filew)); 00280 gtk_file_selection_set_filename(GTK_FILE_SELECTION(filew), (char *)tmp); 00281 gtk_widget_show(filew); 00282 }
static int cleanup | ( | void * | useless | ) | [static] |
Definition at line 95 of file pbx_gtkconsole.c.
Referenced by __verboser(), and build_user().
00096 { 00097 gdk_threads_enter(); 00098 gtk_clist_thaw(GTK_CLIST(verb)); 00099 gtk_widget_queue_resize(verb->parent); 00100 gtk_clist_moveto(GTK_CLIST(verb), GTK_CLIST(verb)->rows - 1, 0, 0, 0); 00101 cleanupid = -1; 00102 gdk_threads_leave(); 00103 return 0; 00104 }
static int cli_activate | ( | void | ) | [static] |
Definition at line 353 of file pbx_gtkconsole.c.
References ast_cli_command(), and TRUE.
Referenced by show_console().
00354 { 00355 char buf[256] = ""; 00356 strncpy(buf, gtk_entry_get_text(GTK_ENTRY(cli)), sizeof(buf) - 1); 00357 gtk_entry_set_text(GTK_ENTRY(cli), ""); 00358 if (strlen(buf)) { 00359 ast_cli_command(clipipe[1], buf); 00360 } 00361 return TRUE; 00362 }
static void cliinput | ( | void * | data, | |
int | source, | |||
GdkInputCondition | ic | |||
) | [static] |
Definition at line 152 of file pbx_gtkconsole.c.
References __verboser(), and offset.
Referenced by show_console().
00153 { 00154 static char buf[256]; 00155 static int offset = 0; 00156 int res; 00157 char *c; 00158 char *l; 00159 char n; 00160 /* Read as much stuff is there */ 00161 res = read(source, buf + offset, sizeof(buf) - 1 - offset); 00162 if (res > -1) 00163 buf[res + offset] = '\0'; 00164 /* make sure we've null terminated whatever we have so far */ 00165 c = buf; 00166 l = buf; 00167 while(*c) { 00168 if (*c == '\n') { 00169 /* Keep the trailing \n */ 00170 c++; 00171 n = *c; 00172 *c = '\0'; 00173 __verboser(l); 00174 *(c - 1) = '\0'; 00175 *c = n; 00176 l = c; 00177 } else 00178 c++; 00179 } 00180 if (strlen(l)) { 00181 /* We have some left over */ 00182 memmove(buf, l, strlen(l) + 1); 00183 offset = strlen(buf); 00184 } else { 00185 offset = 0; 00186 } 00187 00188 }
static void* consolethread | ( | void * | data | ) | [static] |
Definition at line 344 of file pbx_gtkconsole.c.
00345 { 00346 gtk_widget_show(window); 00347 gdk_threads_enter(); 00348 gtk_main(); 00349 gdk_threads_leave(); 00350 return NULL; 00351 }
static void exit_completely | ( | GtkWidget * | widget, | |
gpointer | data | |||
) | [static] |
Definition at line 328 of file pbx_gtkconsole.c.
References ast_cli_command().
Referenced by show_console().
00329 { 00330 #if 0 00331 /* Clever... */ 00332 ast_cli_command(clipipe[1], "quit"); 00333 #else 00334 kill(getpid(), SIGTERM); 00335 #endif 00336 }
static void exit_nicely | ( | GtkWidget * | widget, | |
gpointer | data | |||
) | [static] |
Definition at line 338 of file pbx_gtkconsole.c.
Referenced by show_console().
00339 { 00340 fflush(stdout); 00341 gtk_widget_destroy(window); 00342 }
static void exit_now | ( | GtkWidget * | widget, | |
gpointer | data | |||
) | [static] |
Definition at line 315 of file pbx_gtkconsole.c.
References ast_loader_unregister(), ast_unload_resource(), ast_unregister_verbose(), ast_update_use_count(), ast_verbose(), mod_update(), option_verbose, VERBOSE_PREFIX_2, and verboser().
Referenced by show_console().
00316 { 00317 ast_loader_unregister(mod_update); 00318 gtk_main_quit(); 00319 inuse--; 00320 ast_update_use_count(); 00321 ast_unregister_verbose(verboser); 00322 ast_unload_resource("pbx_gtkconsole", 0); 00323 if (option_verbose > 1) 00324 ast_verbose(VERBOSE_PREFIX_2 "GTK Console Monitor Exiting\n"); 00325 /* XXX Trying to quit after calling this makes asterisk segfault XXX */ 00326 }
static void file_ok_sel | ( | GtkWidget * | w, | |
GtkFileSelection * | fs | |||
) | [static] |
Definition at line 250 of file pbx_gtkconsole.c.
References ast_config_AST_MODULE_DIR, ast_load_resource(), and update_statusbar().
Referenced by add_module().
00251 { 00252 char tmp[PATH_MAX]; 00253 char *module = gtk_file_selection_get_filename(fs); 00254 char buf[256]; 00255 snprintf(tmp, sizeof(tmp), "%s/", ast_config_AST_MODULE_DIR); 00256 if (!strncmp(module, (char *)tmp, strlen(tmp))) 00257 module += strlen(tmp); 00258 gdk_threads_leave(); 00259 if (ast_load_resource(module)) { 00260 snprintf(buf, sizeof(buf), "Error loading module '%s'.", module); 00261 update_statusbar(buf); 00262 } else { 00263 snprintf(buf, sizeof(buf), "Module '%s' loaded", module); 00264 update_statusbar(buf); 00265 } 00266 gdk_threads_enter(); 00267 gtk_widget_destroy(GTK_WIDGET(fs)); 00268 }
static int load_module | ( | void | ) | [static] |
Definition at line 487 of file pbx_gtkconsole.c.
References ast_log(), ast_update_use_count(), ast_verbose(), LOG_DEBUG, LOG_WARNING, option_debug, option_verbose, show_console(), and VERBOSE_PREFIX_2.
00488 { 00489 if (pipe(clipipe)) { 00490 ast_log(LOG_WARNING, "Unable to create CLI pipe\n"); 00491 return -1; 00492 } 00493 g_thread_init(NULL); 00494 if (gtk_init_check(NULL, NULL)) { 00495 if (!show_console()) { 00496 inuse++; 00497 ast_update_use_count(); 00498 if (option_verbose > 1) 00499 ast_verbose( VERBOSE_PREFIX_2 "Launched GTK Console monitor\n"); 00500 } else 00501 ast_log(LOG_WARNING, "Unable to start GTK console\n"); 00502 } else { 00503 if (option_debug) 00504 ast_log(LOG_DEBUG, "Unable to start GTK console monitor -- ignoring\n"); 00505 else if (option_verbose > 1) 00506 ast_verbose( VERBOSE_PREFIX_2 "GTK is not available -- skipping monitor\n"); 00507 } 00508 return 0; 00509 }
static int mod_update | ( | void | ) | [static] |
Definition at line 299 of file pbx_gtkconsole.c.
References add_mod(), and ast_update_module_list().
Referenced by exit_now(), and show_console().
00300 { 00301 char *module= NULL; 00302 /* Update the mod stuff */ 00303 if (GTK_CLIST(modules)->selection) { 00304 module= (char *)gtk_clist_get_row_data(GTK_CLIST(modules), (long) GTK_CLIST(modules)->selection->data); 00305 } 00306 gtk_clist_freeze(GTK_CLIST(modules)); 00307 gtk_clist_clear(GTK_CLIST(modules)); 00308 ast_update_module_list(add_mod, NULL); 00309 if (module) 00310 gtk_clist_select_row(GTK_CLIST(modules), gtk_clist_find_row_from_data(GTK_CLIST(modules), module), -1); 00311 gtk_clist_thaw(GTK_CLIST(modules)); 00312 return 1; 00313 }
static int reload | ( | void | ) | [static] |
Definition at line 210 of file pbx_gtkconsole.c.
References ast_load_resource(), ast_unload_resource(), free, strdup, and update_statusbar().
00211 { 00212 int res, x; 00213 char *module; 00214 char buf[256]; 00215 if (GTK_CLIST(modules)->selection) { 00216 module= (char *)gtk_clist_get_row_data(GTK_CLIST(modules), (long) GTK_CLIST(modules)->selection->data); 00217 module = strdup(module); 00218 if (module) { 00219 gdk_threads_leave(); 00220 res = ast_unload_resource(module, 0); 00221 gdk_threads_enter(); 00222 if (res) { 00223 snprintf(buf, sizeof(buf), "Module '%s' is in use", module); 00224 update_statusbar(buf); 00225 } else { 00226 gdk_threads_leave(); 00227 res = ast_load_resource(module); 00228 gdk_threads_enter(); 00229 if (res) { 00230 snprintf(buf, sizeof(buf), "Error reloading module '%s'", module); 00231 } else { 00232 snprintf(buf, sizeof(buf), "Module '%s' reloaded", module); 00233 } 00234 for (x=0; x < GTK_CLIST(modules)->rows; x++) { 00235 if (!strcmp((char *)gtk_clist_get_row_data(GTK_CLIST(modules), x), module)) { 00236 gtk_clist_select_row(GTK_CLIST(modules), x, -1); 00237 break; 00238 } 00239 } 00240 update_statusbar(buf); 00241 00242 } 00243 free(module); 00244 } 00245 } 00246 00247 return 0; 00248 }
static void remove_module | ( | void | ) | [static] |
Definition at line 190 of file pbx_gtkconsole.c.
References ast_unload_resource(), and update_statusbar().
Referenced by show_console().
00191 { 00192 int res; 00193 char *module; 00194 char buf[256]; 00195 if (GTK_CLIST(modules)->selection) { 00196 module = (char *) gtk_clist_get_row_data(GTK_CLIST(modules), (long) GTK_CLIST(modules)->selection->data); 00197 gdk_threads_leave(); 00198 res = ast_unload_resource(module, 0); 00199 gdk_threads_enter(); 00200 if (res) { 00201 snprintf(buf, sizeof(buf), "Module '%s' is in use", module); 00202 update_statusbar(buf); 00203 } else { 00204 snprintf(buf, sizeof(buf), "Module '%s' removed", module); 00205 update_statusbar(buf); 00206 } 00207 } 00208 }
static int show_console | ( | void | ) | [static] |
Definition at line 364 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().
00365 { 00366 GtkWidget *hbox; 00367 GtkWidget *wbox; 00368 GtkWidget *notebook; 00369 GtkWidget *sw; 00370 GtkWidget *bbox, *hbbox, *add, *removew, *reloadw; 00371 char *modtitles[3] = { "Module", "Description", "Use Count" }; 00372 window = gtk_window_new(GTK_WINDOW_TOPLEVEL); 00373 00374 statusbar = gtk_statusbar_new(); 00375 gtk_widget_show(statusbar); 00376 00377 gtk_signal_connect(GTK_OBJECT(window), "delete_event", 00378 GTK_SIGNAL_FUNC (exit_nicely), window); 00379 gtk_signal_connect(GTK_OBJECT(window), "destroy", 00380 GTK_SIGNAL_FUNC (exit_now), window); 00381 gtk_container_set_border_width(GTK_CONTAINER(window), 10); 00382 00383 quit = gtk_button_new_with_label("Quit Asterisk"); 00384 gtk_signal_connect(GTK_OBJECT(quit), "clicked", 00385 GTK_SIGNAL_FUNC (exit_completely), window); 00386 gtk_widget_show(quit); 00387 00388 closew = gtk_button_new_with_label("Close Window"); 00389 gtk_signal_connect(GTK_OBJECT(closew), "clicked", 00390 GTK_SIGNAL_FUNC (exit_nicely), window); 00391 gtk_widget_show(closew); 00392 00393 notebook = gtk_notebook_new(); 00394 verb = gtk_clist_new(1); 00395 gtk_clist_columns_autosize(GTK_CLIST(verb)); 00396 sw = gtk_scrolled_window_new(NULL, NULL); 00397 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS); 00398 gtk_container_add(GTK_CONTAINER(sw), verb); 00399 gtk_widget_show(verb); 00400 gtk_widget_show(sw); 00401 gtk_widget_set_usize(verb, 640, 400); 00402 gtk_notebook_append_page(GTK_NOTEBOOK(notebook), sw, gtk_label_new("Verbose Status")); 00403 00404 00405 modules = gtk_clist_new_with_titles(3, modtitles); 00406 gtk_clist_columns_autosize(GTK_CLIST(modules)); 00407 gtk_clist_set_column_auto_resize(GTK_CLIST(modules), 0, TRUE); 00408 gtk_clist_set_column_auto_resize(GTK_CLIST(modules), 1, TRUE); 00409 gtk_clist_set_column_auto_resize(GTK_CLIST(modules), 2, TRUE); 00410 gtk_clist_set_sort_column(GTK_CLIST(modules), 0); 00411 gtk_clist_set_auto_sort(GTK_CLIST(modules), TRUE); 00412 gtk_clist_column_titles_passive(GTK_CLIST(modules)); 00413 sw = gtk_scrolled_window_new(NULL, NULL); 00414 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS); 00415 gtk_container_add(GTK_CONTAINER(sw), modules); 00416 gtk_clist_set_selection_mode(GTK_CLIST(modules), GTK_SELECTION_BROWSE); 00417 gtk_widget_show(modules); 00418 gtk_widget_show(sw); 00419 00420 add = gtk_button_new_with_label("Load..."); 00421 gtk_widget_show(add); 00422 removew = gtk_button_new_with_label("Unload"); 00423 gtk_widget_show(removew); 00424 reloadw = gtk_button_new_with_label("Reload"); 00425 gtk_widget_show(reloadw); 00426 gtk_signal_connect(GTK_OBJECT(removew), "clicked", 00427 GTK_SIGNAL_FUNC (remove_module), window); 00428 gtk_signal_connect(GTK_OBJECT(add), "clicked", 00429 GTK_SIGNAL_FUNC (add_module), window); 00430 gtk_signal_connect(GTK_OBJECT(reloadw), "clicked", 00431 GTK_SIGNAL_FUNC (reload), window); 00432 00433 bbox = gtk_vbox_new(FALSE, 5); 00434 gtk_widget_show(bbox); 00435 00436 gtk_widget_set_usize(bbox, 100, -1); 00437 gtk_box_pack_start(GTK_BOX(bbox), add, FALSE, FALSE, 5); 00438 gtk_box_pack_start(GTK_BOX(bbox), removew, FALSE, FALSE, 5); 00439 gtk_box_pack_start(GTK_BOX(bbox), reloadw, FALSE, FALSE, 5); 00440 00441 hbbox = gtk_hbox_new(FALSE, 5); 00442 gtk_widget_show(hbbox); 00443 00444 gtk_box_pack_start(GTK_BOX(hbbox), sw, TRUE, TRUE, 5); 00445 gtk_box_pack_start(GTK_BOX(hbbox), bbox, FALSE, FALSE, 5); 00446 00447 gtk_notebook_append_page(GTK_NOTEBOOK(notebook), hbbox, gtk_label_new("Module Information")); 00448 00449 gtk_widget_show(notebook); 00450 00451 wbox = gtk_hbox_new(FALSE, 5); 00452 gtk_widget_show(wbox); 00453 gtk_box_pack_end(GTK_BOX(wbox), quit, FALSE, FALSE, 5); 00454 gtk_box_pack_end(GTK_BOX(wbox), closew, FALSE, FALSE, 5); 00455 00456 hbox = gtk_vbox_new(FALSE, 0); 00457 gtk_widget_show(hbox); 00458 00459 /* Command line */ 00460 cli = gtk_entry_new(); 00461 gtk_widget_show(cli); 00462 00463 gtk_signal_connect(GTK_OBJECT(cli), "activate", 00464 GTK_SIGNAL_FUNC (cli_activate), NULL); 00465 00466 gtk_box_pack_start(GTK_BOX(hbox), notebook, TRUE, TRUE, 5); 00467 gtk_box_pack_start(GTK_BOX(hbox), wbox, FALSE, FALSE, 5); 00468 gtk_box_pack_start(GTK_BOX(hbox), cli, FALSE, FALSE, 0); 00469 gtk_box_pack_start(GTK_BOX(hbox), statusbar, FALSE, FALSE, 0); 00470 gtk_container_add(GTK_CONTAINER(window), hbox); 00471 gtk_window_set_title(GTK_WINDOW(window), "Asterisk Console"); 00472 gtk_widget_grab_focus(cli); 00473 ast_pthread_create(&console_thread, NULL, consolethread, NULL); 00474 /* XXX Okay, seriously fix me! XXX */ 00475 usleep(100000); 00476 ast_register_verbose(verboser); 00477 gtk_clist_freeze(GTK_CLIST(verb)); 00478 ast_loader_register(mod_update); 00479 gtk_clist_thaw(GTK_CLIST(verb)); 00480 gdk_input_add(clipipe[0], GDK_INPUT_READ, cliinput, NULL); 00481 mod_update(); 00482 update_statusbar("Asterisk Console Ready"); 00483 return 0; 00484 }
static int unload_module | ( | void | ) | [static] |
Definition at line 81 of file pbx_gtkconsole.c.
00082 { 00083 if (inuse) { 00084 /* Kill off the main thread */ 00085 pthread_cancel(console_thread); 00086 gdk_threads_enter(); 00087 gtk_widget_destroy(window); 00088 gdk_threads_leave(); 00089 close(clipipe[0]); 00090 close(clipipe[1]); 00091 } 00092 return 0; 00093 }
static void update_statusbar | ( | char * | msg | ) | [static] |
Definition at line 75 of file pbx_gtkconsole.c.
Referenced by file_ok_sel(), reload(), remove_module(), and show_console().
00076 { 00077 gtk_statusbar_pop(GTK_STATUSBAR(statusbar), 1); 00078 gtk_statusbar_push(GTK_STATUSBAR(statusbar), 1, msg); 00079 }
static void verboser | ( | const char * | stuff | ) | [static] |
Definition at line 140 of file pbx_gtkconsole.c.
References __verboser(), ast_mutex_lock(), ast_mutex_unlock(), and verb_lock.
Referenced by exit_now(), and show_console().
00141 { 00142 if (*stuff == 127) { 00143 stuff++; 00144 } 00145 00146 ast_mutex_lock(&verb_lock); 00147 /* Lock appropriately if we're really being called in verbose mode */ 00148 __verboser(stuff); 00149 ast_mutex_unlock(&verb_lock); 00150 }
struct ast_module_info __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_DEFAULT | AST_MODFLAG_BUILDSUM, .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 = "361d7bb937402d51e4658efb5b4d76e4" , .load = load_module, .unload = unload_module, .reload = reload, } [static] |
Definition at line 515 of file pbx_gtkconsole.c.
const struct ast_module_info* ast_module_info = &__mod_info [static] |
Definition at line 515 of file pbx_gtkconsole.c.
int cleanupid = -1 [static] |
Definition at line 63 of file pbx_gtkconsole.c.
GtkWidget* cli [static] |
Definition at line 71 of file pbx_gtkconsole.c.
int clipipe[2] [static] |
Definition at line 62 of file pbx_gtkconsole.c.
GtkWidget* closew [static] |
Definition at line 67 of file pbx_gtkconsole.c.
pthread_t console_thread [static] |
Definition at line 59 of file pbx_gtkconsole.c.
int inuse = 0 [static] |
Definition at line 61 of file pbx_gtkconsole.c.
struct timeval last [static] |
Definition at line 73 of file pbx_gtkconsole.c.
GtkWidget* modules [static] |
Definition at line 69 of file pbx_gtkconsole.c.
GtkWidget* quit [static] |
GtkWidget* statusbar [static] |
Definition at line 70 of file pbx_gtkconsole.c.
GtkWidget* verb [static] |
ast_mutex_t verb_lock = ((ast_mutex_t) PTHREAD_MUTEX_INITIALIZER ) [static] |
GtkWidget* window [static] |
Definition at line 65 of file pbx_gtkconsole.c.