]> andersk Git - libfaim.git/blobdiff - utils/faimtest/faimtest.c
- Mon Jun 26 07:53:02 UTC 2000
[libfaim.git] / utils / faimtest / faimtest.c
index 4763eda445d512982b0500b291f5c7ef44526871..fc00748c02233e4ac61de9f15d0db3c0c3b0a91e 100644 (file)
@@ -65,6 +65,7 @@ int faimtest_chat_infoupdate(struct aim_session_t *sess, struct command_rx_struc
 int faimtest_chat_leave(struct aim_session_t *sess, struct command_rx_struct *command, ...);
 int faimtest_chat_join(struct aim_session_t *sess, struct command_rx_struct *command, ...);
 int faimtest_parse_connerr(struct aim_session_t *sess, struct command_rx_struct *command, ...);
+int faimtest_debugconn_connect(struct aim_session_t *sess, struct command_rx_struct *command, ...);
 
 int faimtest_reportinterval(struct aim_session_t *sess, struct command_rx_struct *command, ...)
 {
@@ -128,6 +129,7 @@ int main(void)
   aim_conn_addhandler(&aimsess, authconn, AIM_CB_FAM_GEN, AIM_CB_GEN_SERVERREADY, faimtest_authsvrready, 0);
   aim_send_login(&aimsess, authconn, screenname, password, &info);
 #endif
+  aim_conn_addhandler(&aimsess, authconn, AIM_CB_FAM_SPECIAL, AIM_CB_SPECIAL_DEBUGCONN_CONNECT, faimtest_debugconn_connect, 0);
   printf("faimtest: login sent\n");
 
   while (keepgoing) {
@@ -973,3 +975,19 @@ int faimtest_parse_connerr(struct aim_session_t *sess, struct command_rx_struct
 
   return 1;
 }
+
+int faimtest_debugconn_connect(struct aim_session_t *sess, struct command_rx_struct *command, ...)
+{      
+  printf("faimtest: connecting to an aimdebugd!\n");
+
+  /* convert the authorizer connection to a BOS connection */
+  command->conn->type = AIM_CONN_TYPE_BOS;
+
+  aim_conn_addhandler(sess, command->conn, AIM_CB_FAM_MSG, AIM_CB_MSG_INCOMING, faimtest_parse_incoming_im, 0);
+
+  /* tell the aimddebugd we're ready */
+  aim_debugconn_sendconnect(sess, command->conn); 
+
+  /* go right into main loop (don't open a BOS connection, etc) */
+  return 1;
+}
This page took 0.072646 seconds and 4 git commands to generate.