-cdef void connect_progress (connection.PurpleConnection *gc, const_char *text,
- size_t step, size_t step_count):
- debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "connection",
- "connect_progress\n")
- global connection_cbs
- try:
- (<object>connection_cbs["connect_progress"])("connect_progress")
- except KeyError:
- pass
+cdef void connect_progress(connection.PurpleConnection *gc, const_char *text, \
+ size_t step, size_t step_count):
+ """
+ When an account is connecting, this operation is called to notify the UI
+ of what is happening, as well as which a step out of step_count has been
+ reached (which might be displayed as a progress bar).
+ """
+ debug.purple_debug_info("connection", "%s", "connect-progress\n")
+ if "connect-progress" in connection_cbs:
+ (<object> connection_cbs["connect-progress"]) \
+ (<char *> text, step, step_count)
+
+cdef void connected(connection.PurpleConnection *gc):
+ """
+ Called when a connection is established (just before the signed-on signal).
+ """
+ debug.purple_debug_info("connection", "%s", "connected\n")
+ if "connected" in connection_cbs:
+ (<object> connection_cbs["connected"])("connected: TODO")
+
+cdef void disconnected(connection.PurpleConnection *gc):
+ """
+ Called when a connection is ended (between the signing-off and signed-off
+ signal).
+ """
+ debug.purple_debug_info("connection", "%s", "disconnected\n")
+ if "disconnected" in connection_cbs:
+ (<object> connection_cbs["disconnected"])("disconnected: TODO")
+
+cdef void notice(connection.PurpleConnection *gc, const_char *text):
+ """
+ Used to display connection-specific notices. (Pidgin's Gtk user interface
+ implements this as a no-op; purple_connection_notice(), which uses this
+ operation, is not used by any of the protocols shipped with libpurple.)
+ """
+ debug.purple_debug_info("connection", "%s", "notice\n")
+ if "notice" in connection_cbs:
+ (<object> connection_cbs["notice"])("notice: TODO")