Mercurial > pidgin.yaz
comparison src/connection.c @ 7035:feb3d21a7794
[gaim-migrate @ 7598]
Standardized the UI op accessor functions in every file. They're now
properly namespaced.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Mon, 29 Sep 2003 23:39:02 +0000 |
parents | 0c5637b5462e |
children | bf630f7dfdcd |
comparison
equal
deleted
inserted
replaced
7034:f7ff0dfa6b9f | 7035:feb3d21a7794 |
---|---|
107 g_return_if_fail(gc != NULL); | 107 g_return_if_fail(gc != NULL); |
108 | 108 |
109 gaim_debug(GAIM_DEBUG_INFO, "connection", | 109 gaim_debug(GAIM_DEBUG_INFO, "connection", |
110 "Registering. gc = %p\n", gc); | 110 "Registering. gc = %p\n", gc); |
111 | 111 |
112 ops = gaim_get_connection_ui_ops(); | 112 ops = gaim_connections_get_ui_ops(); |
113 | 113 |
114 if (gc->prpl != NULL) | 114 if (gc->prpl != NULL) |
115 prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(gc->prpl); | 115 prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(gc->prpl); |
116 else { | 116 else { |
117 gchar *message = g_strdup_printf(_("Missing protocol plugin for %s"), | 117 gchar *message = g_strdup_printf(_("Missing protocol plugin for %s"), |
155 g_return_if_fail(gc != NULL); | 155 g_return_if_fail(gc != NULL); |
156 | 156 |
157 gaim_debug(GAIM_DEBUG_INFO, "connection", | 157 gaim_debug(GAIM_DEBUG_INFO, "connection", |
158 "Connecting. gc = %p\n", gc); | 158 "Connecting. gc = %p\n", gc); |
159 | 159 |
160 ops = gaim_get_connection_ui_ops(); | 160 ops = gaim_connections_get_ui_ops(); |
161 | 161 |
162 if (gc->prpl != NULL) | 162 if (gc->prpl != NULL) |
163 prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(gc->prpl); | 163 prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(gc->prpl); |
164 else { | 164 else { |
165 gchar *message = g_strdup_printf(_("Missing protocol plugin for %s"), | 165 gchar *message = g_strdup_printf(_("Missing protocol plugin for %s"), |
293 if (gc->state == state) | 293 if (gc->state == state) |
294 return; | 294 return; |
295 | 295 |
296 gc->state = state; | 296 gc->state = state; |
297 | 297 |
298 ops = gaim_get_connection_ui_ops(); | 298 ops = gaim_connections_get_ui_ops(); |
299 | 299 |
300 if (gc->state == GAIM_CONNECTING) { | 300 if (gc->state == GAIM_CONNECTING) { |
301 connections_connecting = g_list_append(connections_connecting, gc); | 301 connections_connecting = g_list_append(connections_connecting, gc); |
302 } | 302 } |
303 else { | 303 else { |
434 g_return_if_fail(gc != NULL); | 434 g_return_if_fail(gc != NULL); |
435 g_return_if_fail(text != NULL); | 435 g_return_if_fail(text != NULL); |
436 g_return_if_fail(step < count); | 436 g_return_if_fail(step < count); |
437 g_return_if_fail(count > 1); | 437 g_return_if_fail(count > 1); |
438 | 438 |
439 ops = gaim_get_connection_ui_ops(); | 439 ops = gaim_connections_get_ui_ops(); |
440 | 440 |
441 if (ops != NULL && ops->connect_progress != NULL) | 441 if (ops != NULL && ops->connect_progress != NULL) |
442 ops->connect_progress(gc, text, step, count); | 442 ops->connect_progress(gc, text, step, count); |
443 } | 443 } |
444 | 444 |
448 GaimConnectionUiOps *ops; | 448 GaimConnectionUiOps *ops; |
449 | 449 |
450 g_return_if_fail(gc != NULL); | 450 g_return_if_fail(gc != NULL); |
451 g_return_if_fail(text != NULL); | 451 g_return_if_fail(text != NULL); |
452 | 452 |
453 ops = gaim_get_connection_ui_ops(); | 453 ops = gaim_connections_get_ui_ops(); |
454 | 454 |
455 if (ops != NULL && ops->notice != NULL) | 455 if (ops != NULL && ops->notice != NULL) |
456 ops->notice(gc, text); | 456 ops->notice(gc, text); |
457 } | 457 } |
458 | 458 |
466 | 466 |
467 /* If we've already got one error, we don't need any more */ | 467 /* If we've already got one error, we don't need any more */ |
468 if (gc->disconnect_timeout) | 468 if (gc->disconnect_timeout) |
469 return; | 469 return; |
470 | 470 |
471 ops = gaim_get_connection_ui_ops(); | 471 ops = gaim_connections_get_ui_ops(); |
472 | 472 |
473 if (ops != NULL) { | 473 if (ops != NULL) { |
474 if (ops->report_disconnect != NULL) | 474 if (ops->report_disconnect != NULL) |
475 ops->report_disconnect(gc, text); | 475 ops->report_disconnect(gc, text); |
476 | 476 |
506 { | 506 { |
507 return connections_connecting; | 507 return connections_connecting; |
508 } | 508 } |
509 | 509 |
510 void | 510 void |
511 gaim_connections_set_ui_ops(GaimConnectionUiOps *ops) | |
512 { | |
513 connection_ui_ops = ops; | |
514 } | |
515 | |
516 GaimConnectionUiOps * | |
517 gaim_connections_get_ui_ops(void) | |
518 { | |
519 return connection_ui_ops; | |
520 } | |
521 | |
522 void | |
511 gaim_connections_init(void) | 523 gaim_connections_init(void) |
512 { | 524 { |
513 void *handle = gaim_connections_get_handle(); | 525 void *handle = gaim_connections_get_handle(); |
514 | 526 |
515 gaim_signal_register(handle, "signing-on", | 527 gaim_signal_register(handle, "signing-on", |
542 void * | 554 void * |
543 gaim_connections_get_handle(void) | 555 gaim_connections_get_handle(void) |
544 { | 556 { |
545 return &connections_handle; | 557 return &connections_handle; |
546 } | 558 } |
547 | |
548 void | |
549 gaim_set_connection_ui_ops(GaimConnectionUiOps *ops) | |
550 { | |
551 connection_ui_ops = ops; | |
552 } | |
553 | |
554 GaimConnectionUiOps * | |
555 gaim_get_connection_ui_ops(void) | |
556 { | |
557 return connection_ui_ops; | |
558 } |