view libfaim/aim_ads.c @ 1046:4593605da0e2

[gaim-migrate @ 1056] 1. made it compile again (gc->groups instead of just groups, account_online(user, gc) instead of just (gc), and most things are GSLists now, oh yeah, serv_got_update(gc, ...) and add_buddy(gc, ...)). 2. took out the stuff to set up the buddy list window, because account_online handles that now 3. change the init function to use load_protocol(), which is the new interface for loading a new protocol. it's basically the same but without actually touching the protocols list. committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Wed, 01 Nov 2000 11:34:56 +0000
parents 595ac7759563
children
line wrap: on
line source

/*
 *
 *
 */

#include <faim/aim.h>

faim_export unsigned long aim_ads_clientready(struct aim_session_t *sess,
					      struct aim_conn_t *conn)
{
  struct command_tx_struct *newpacket;
  int i;

  if (!(newpacket = aim_tx_new(AIM_FRAMETYPE_OSCAR, 0x0002, conn, 0x1a)))
    return -1;

  newpacket->lock = 1;

  i = aim_putsnac(newpacket->data, 0x0001, 0x0002, 0x0000, sess->snac_nextid);

  i+= aimutil_put16(newpacket->data+i, 0x0001);
  i+= aimutil_put16(newpacket->data+i, 0x0002);

  i+= aimutil_put16(newpacket->data+i, 0x0001);
  i+= aimutil_put16(newpacket->data+i, 0x0013);

  i+= aimutil_put16(newpacket->data+i, 0x0005);
  i+= aimutil_put16(newpacket->data+i, 0x0001);
  i+= aimutil_put16(newpacket->data+i, 0x0001);
  i+= aimutil_put16(newpacket->data+i, 0x0001);

  newpacket->lock = 0;
  aim_tx_enqueue(sess, newpacket);

  return (sess->snac_nextid++);
}

faim_export unsigned long aim_ads_requestads(struct aim_session_t *sess,
					     struct aim_conn_t *conn)
{
  return aim_genericreq_n(sess, conn, 0x0005, 0x0002);
}