Protocols/OSCAR/Services/BART/Tutorials: Difference between revisions
No edit summary |
No edit summary |
||
Line 176: | Line 176: | ||
=== From Aleksandr Shutko: Upload/download server-stored buddy icons (SSBI) sequences === | |||
<table width=640 bgcolor=darkblue cellSpacing=0 cellPadding=0 border=0><tr><td> | |||
<table width=100% cellSpacing=2 cellPadding=0 border=0><tr><td bgcolor=#4040FF > | |||
<table width=100% cellSpacing=0 cellPadding=0 border=0> | |||
<tr> | |||
<td><b><font color="white"> OSCAR sequences </font></b></td> | |||
<td width=40% align=right><b><font color="white"> </font></b></td> | |||
</tr> | |||
</table> | |||
</td></tr> | |||
</table> | |||
</td></tr></table> | |||
<br> | |||
<table width=640 bgcolor=darkblue cellSpacing=0 cellPadding=0 border=0><tr><td> | |||
<table width=100% cellSpacing=2 cellPadding=0 border=0><tr><td bgcolor=#E9E9E9> | |||
<table width=100% cellSpacing=0 cellPadding=0 bgcolor="#4040FF" border=0> | |||
<tr> | |||
<td><b><font size=2 color="white"> Upload/download server-stored buddy icons (SSBI) sequences</font></b></td> | |||
</tr> | |||
</table> | |||
</td></tr> | |||
<tr><td bgcolor=#E9E9E9> | |||
<table width=100% cellSpacing=0 cellPadding=0 border=0> | |||
<tr><td colspan=3 height=5></td></tr> | |||
<tr><td width=5> </td> | |||
<td> | |||
| |||
SSBI service allows clients to store and retrieve little buddy icons called | |||
ICQ avatars. Icon size is limited by size of flap packet (~8kb). Every icon has | |||
unique combination of id (word), flags (byte) and md5 hash. AOL BOS server | |||
doesn't support [[Protocols/OSCAR/SNAC_10|SSBI]] service so you should | |||
request it and setup as described [[Protocols/OSCAR/SNAC/OSERVICE_SERVICE_REQUEST|here]]. | |||
<br><br> | |||
| |||
To upload own icon to server you should calculate icon md5 hash and store it | |||
as ssi type=0x14 item. Then you'll get [[Protocols/OSCAR/SNAC_01_21|SNAC(01,21)]] | |||
with icon flags bit8=1 - this is a command for you to start icon upload. | |||
Here is the sequence description ([[Protocols/OSCAR/Services/BART/Tutorials|example dump]]): | |||
<br><br> | |||
<table width=100% cellSpacing=0 cellPadding=0 align=center border=0> | |||
<tr><td width=20></td> | |||
<td> | |||
<table width=580 bgcolor=darkblue cellSpacing=0 cellPadding=0 border=0><tr><td> | |||
<table width=100% cellSpacing=2 cellPadding=0 border=0><tr><td bgcolor=#7070D0><b><font size=2 color=white> Upload own icon to server</font></b></td></tr> | |||
<tr><td bgcolor=#E5E5E5> | |||
<table width=580 cellSpacing=1 cellPadding=1 border=0> | |||
<tr> | |||
<td bgcolor=#f9f9f9 width=35 valign=top> <b>>></b></td> | |||
<td bgcolor=#f9f9f9 width=120 valign=top> <b>[[Protocols/OSCAR/SNAC_13_08|SNAC(13,08)]]</b></td> | |||
<td bgcolor=#f9f9f9 valign=top> [BOS] User add icon id/flags/md5 hash to server (ssi type=14)</td> | |||
</tr> | |||
<tr> | |||
<td bgcolor=#f9f9f9 valign=top> <b><<</b></td> | |||
<td bgcolor=#f9f9f9 valign=top> <b>[[Protocols/OSCAR/SNAC_13_0e|SNAC(13,0E)]]</b></td> | |||
<td bgcolor=#f9f9f9 valign=top> [BOS] Server reply command ok (errcode=0x00)</td> | |||
</tr> | |||
<tr> | |||
<td bgcolor=#f9f9f9 valign=top> <b><<</b></td> | |||
<td bgcolor=#f9f9f9 valign=top> <b>[[Protocols/OSCAR/SNAC_01_21|SNAC(01,21)]]</b></td> | |||
<td bgcolor=#f9f9f9 valign=top> [BOS] Server command to upload icon (icon flags bit8=1)</td> | |||
</tr> | |||
<tr> | |||
<td bgcolor=#f9f9f9 colspan=3 height=25 valign=middle><font size=2> Client check/prepare SSBI connection</font></td> | |||
</tr> | |||
<tr> | |||
<td bgcolor=#f9f9f9 valign=top> <b>>></b></td> | |||
<td bgcolor=#f9f9f9 valign=top> <b>[[Protocols/OSCAR/SNAC_10_02|SNAC(10,02)]]</b></td> | |||
<td bgcolor=#f9f9f9 valign=top> [SSBI] Client sends icon to server</td> | |||
</tr> | |||
<tr> | |||
<td bgcolor=#f9f9f9 valign=top> <b><<</b></td> | |||
<td bgcolor=#f9f9f9 valign=top> <b>[[Protocols/OSCAR/SNAC_10_03|SNAC(10,03)]]</b></td> | |||
<td bgcolor=#f9f9f9 valign=top> [SSBI] Server reply with icon id/flags/md5 hash or with error</td> | |||
</tr> | |||
<tr> | |||
<td bgcolor=#f9f9f9 colspan=3 height=25 valign=middle><font size=2> All your buddies will receive [[Protocols/OSCAR/SNAC_03_0b|SNAC(03,0B)]] with TLV(0x1D) here</td> | |||
</tr> | |||
<tr> | |||
<td bgcolor=#f9f9f9 valign=top> <b><<</b></td> | |||
<td bgcolor=#f9f9f9 valign=top> <b>[[Protocols/OSCAR/SNAC_01_21|SNAC(01,21)]]</b></td> | |||
<td bgcolor=#f9f9f9 valign=top> [BOS] Server ext status notification (icon flags bit8=0)</td> | |||
</tr> | |||
</table> | |||
</td></tr></table> | |||
</td></tr></table> | |||
</td></tr></table> | |||
<br> | |||
To download icon from server you should know user | |||
uin/screenname, icon id, icon flags and its md5 hash. You can get all needed | |||
information from [[Protocols/OSCAR/SNAC_03_0b|SNAC(03,0B)]] containing TLV(0x1D). | |||
Official ICQ clients also use [[Protocols/OSCAR/SNAC_10_06|SNAC(10,06)]] to get | |||
client own icon after receiving [[Protocols/OSCAR/SNAC_01_21|SNAC(01,21)]]. Here | |||
is the sequence ([[Protocols/OSCAR/Services/BART/Tutorials#Download|example dump]]): | |||
<br><br> | |||
<table width=100% cellSpacing=0 cellPadding=0 align=center border=0> | |||
<tr><td width=20></td> | |||
<td> | |||
<table width=580 bgcolor=darkblue cellSpacing=0 cellPadding=0 border=0><tr><td> | |||
<table width=100% cellSpacing=2 cellPadding=0 border=0><tr><td bgcolor=#7070D0><b><font size=2 color=white> Downloading buddy/own icon from server</font></b></td></tr> | |||
<tr><td bgcolor=#E5E5E5> | |||
<table width=580 cellSpacing=1 cellPadding=1 border=0> | |||
<tr> | |||
<td bgcolor=#f9f9f9 width=35 valign=top> <b>>></b></td> | |||
<td bgcolor=#f9f9f9 width=120 valign=top> <b>[[Protocols/OSCAR/SNAC_03_0B|SNAC(03,0B)]]</b></td> | |||
<td bgcolor=#f9f9f9 valign=top> [BOS] User status notification from server (with TLV(0x1D))</td> | |||
</tr> | |||
<tr> | |||
<td bgcolor=#f9f9f9 colspan=3 height=25 valign=middle><font size=2> Client check/prepare SSBI connection</font></td> | |||
</tr> | |||
<tr> | |||
<td bgcolor=#f9f9f9 valign=top> <b>>></b></td> | |||
<td bgcolor=#f9f9f9 valign=top> <b>[[Protocols/OSCAR/SNAC_10_06|SNAC(10,06)]]</b></td> | |||
<td bgcolor=#f9f9f9 valign=top> [SSBI] Client sends icon request to server</td> | |||
</tr> | |||
<tr> | |||
<td bgcolor=#f9f9f9 valign=top> <b>>></b></td> | |||
<td bgcolor=#f9f9f9 valign=top> <b>[[Protocols/OSCAR/SNAC_10_07|SNAC(10,07)]]</b></td> | |||
<td bgcolor=#f9f9f9 valign=top> [SSBI] Server reply with requested icon</td> | |||
</tr> | |||
</table> | |||
</td></tr></table> | |||
</td></tr></table> | |||
</td></tr></table> | |||
<br> | |||
</td><td width=15> | |||
</td></tr></table> | |||
</td></tr></table> | |||
</td></tr></table> | |||
[[Category:With_Contrib]] | [[Category:With_Contrib]] | ||
Latest revision as of 00:19, 14 February 2021
OSCAR Protocol |
Introduction • Terms • Clients |
Basic |
Datatypes • FLAP • SNAC • TLV |
UUIDs • Errors • Tool IDs |
Host Interaction |
Rate Limits • Migration • Messages |
Other Services |
ADMIN • ADVERT • ALERT |
BART • BOS • BUCP • CHAT |
CHAT_NAV |
Tutorials |
Sign On • BART • Rendezvous |
ICBM • Locate • Buddies |
Foodgroups |
OSERVICE (0x0001) |
LOCATE (0x0002) |
BUDDY (0x0003) |
ICBM (0x0004) |
ADVERT (0x0005) |
INVITE (0x0006) |
ADMIN (0x0007) |
POPUP (0x0008) |
PD (0x0009) |
USER_LOOKUP (0x000A) |
STATS (0x000B) |
TRANSLATE (0x000C) |
CHAT_NAV (0x000D) |
CHAT (0x000E) |
ODIR (0x000F) |
BART (0x0010) |
FEEDBAG (0x0013) |
ICQ (0x0015) |
BUCP (0x0017) |
ALERT (0x0018) |
PLUGIN (0x0022) |
UNNAMED_FG_24 (0x0024) |
MDIR (0x0025) |
ARS (0x044A) |
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.
- Send a OSERVICE__SERVICE_REQUEST to BOSS with the foodgroup of BART.
- Wait for a OSERVICE__SERVICE_RESPONSE from BOSS.
- Using the RECONNECT_HERE tag, connect to the BART server.
- Using the LOGIN_COOKIE tag send a FLAP SIGNON packet, just like connecting to BOSS.
- 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.
From Aleksandr Shutko: Upload icon sequence example dump
|
|
Download
From Aleksandr Shutko: Download icon sequence example dump
|
|
From Aleksandr Shutko: Upload/download server-stored buddy icons (SSBI) sequences
|
|