Changeset 952bb256 for aim.c


Ignore:
Timestamp:
Dec 22, 2003, 11:25:16 PM (17 years ago)
Author:
James M. Kretchmar <kretch@mit.edu>
Branches:
master, barnowl_perlaim, debian, owl, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
9854278
Parents:
2de4f20
Message:
Added the 'aim search' command.  The popup on callback may be
  dangerous, should switch to an admin msg for results, or add a
  new event queue
File:
1 edited

Legend:

Unmodified
Added
Removed
  • aim.c

    rc8735aa r952bb256  
    280280}
    281281
     282void owl_aim_search(char *email)
     283{
     284  int ret;
     285
     286  owl_function_debugmsg("owl_aim_search: doing search for %s", email);
     287  ret=aim_search_address(owl_global_get_aimsess(&g),
     288                         aim_getconn_type(owl_global_get_aimsess(&g), AIM_CONN_TYPE_BOS),
     289                         email);
     290
     291  if (ret) owl_function_error("owl_aim_search: aim_search_address returned %i", ret);
     292}
     293
    282294
    283295int owl_aim_set_awaymsg(char *msg)
     
    571583  aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_GEN, AIM_CB_GEN_RATECHANGE,         faimtest_parse_ratechange, 0);
    572584  aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_GEN, AIM_CB_GEN_EVIL,               faimtest_parse_evilnotify, 0);
     585
    573586  aim_conn_addhandler(sess, bosconn, 0x000a,         0x0001,                        faimtest_parse_searcherror, 0);
    574587  aim_conn_addhandler(sess, bosconn, 0x000a,         0x0003,                        faimtest_parse_searchreply, 0);
     588
     589  /*
     590  aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_LOK, AIM_CB_LOK_ERROR, faimtest_parse_searcherror, 0);
     591  aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_LOK, 0x0003, faimtest_parse_searchreply, 0);
     592  */
     593 
    575594  aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_MSG, AIM_CB_MSG_ERROR,              faimtest_parse_msgerr, 0);
    576595  aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_LOC, AIM_CB_LOC_USERINFO,           faimtest_parse_userinfo, 0);
     
    18221841  char *address, *SNs;
    18231842  int num, i;
     1843  owl_list list;
    18241844 
    18251845  va_start(ap, fr);
     
    18281848  SNs = va_arg(ap, char *);
    18291849  va_end(ap);
     1850
     1851  owl_list_create(&list);
    18301852 
    18311853  owl_function_debugmsg("faimtest_parse_searchreply: E-Mail Search Results for %s: ", address);
    1832  
    1833   for(i = 0; i < num; i++) {
     1854  for (i=0; i<num; i++) {
    18341855    owl_function_debugmsg("  %s", &SNs[i*(MAXSNLEN+1)]);
    1835   }
    1836  
    1837   return 1;
     1856    owl_list_append_element(&list, &SNs[i*(MAXSNLEN+1)]);
     1857  }
     1858  owl_function_aimsearch_results(address, &list);
     1859  owl_list_free_simple(&list);
     1860  return(1);
    18381861}
    18391862
     
    18461869  address = va_arg(ap, char *);
    18471870  va_end(ap);
    1848  
     1871
     1872  owl_function_error("No results searching for %s", address);
    18491873  owl_function_debugmsg("faimtest_parse_searcherror: E-Mail Search Results for %s: No Results or Invalid Email\n", address);
    18501874 
    1851   return 1;
     1875  return(1);
    18521876}
    18531877
Note: See TracChangeset for help on using the changeset viewer.