Protocols/OSCAR/Services/BART

From NINA Wiki
Jump to navigation Jump to search

The Buddy Art, or BART, server provides access to the client for downloading image, sound, and xml assets for expressions.

Examples

Getting a User's Buddy Icon

Step #1 - Finding the icon for a user

First the client will need to discover what the Buddy icon BART ID is for the user. Depending on display, the client will want to look inside the USERINFO for either the ICBM__CHANNEL_MSG_TOCLIENT SNAC or BUDDY__ARRIVED SNAC. The USERINFO will contain an array of BART IDs and the client should select the one with the BART__ID_TYPES Class for which it is looking.

Step #2 - Connecting to BART

If the client is not already connected to the BART server it will need to do so.

  1. Send a OSERVICE__SERVICE_REQUEST to BOSS with the foodgroup of BART.
  2. Wait for a OSERVICE__SERVICE_RESPONSE from BOSS.
  3. Using the RECONNECT_HERE tag, connect to the BART server.
  4. Using the LOGIN_COOKIE tag send a FLAP SIGNON packet, just like connecting to BOSS.
  5. Send a OSERVICE__CLIENT_ONLINE SNAC to the BART server.

Step #3 - Downloading from BART

Once connected to BART, use the BART__DOWNLOAD2_QUERY SNAC to download as many assets as required.

Step #4 - Display Icon

Display the image.