Protocols/OSCAR/Foodgroups/FEEDBAG/Items

From NINA Wiki
Revision as of 02:05, 14 February 2021 by AD (talk | contribs) (Item)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
OSCAR Protocol
IntroductionTermsClients
Basic
DatatypesFLAPSNACTLV
UUIDsErrorsTool IDs
Host Interaction
Rate LimitsMigrationMessages
Other Services
ADMINADVERTALERT
BARTBOSBUCPCHAT
CHAT_NAV
Tutorials
Sign OnBARTRendezvous
ICBMLocateBuddies
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)


A Feedbag is the stored Buddy List and server based preferences for an AIM user. The client has direct access to manipulate the Feedbag in any way it sees fit, including corrupting it. The server has some checks in place to prevent destruction, but a client developer must be careful not to corrupt things.

Terms

Class
All the entries in the Feedbag are assigned a class, which defines the characteristics of how they should behave. The class is represented by a numeric classId with each entry.
Item
An item is a generic term that is used for any entry that can be added to a user's Feedbag. An item can be a group, a Buddy, a preference, a permit/deny entry, or anything else. All items have a name (which can be empty), a groupId, an itemId, a classId, and attributes with groupId and itemId being unique. The groupId and itemId can have values between 0 and 32767; values between 32768 and 65535 are reserved. The client is responsible for picking new groupId and itemIds.
Group
A group is a special type of item that is always represented by using an itemId of 0 and classId of GROUP. All items live inside of a group, with items that use a groupId of 0 being called in the Root Group. All group items have an ORDER attribute that describes how the items in the group should be ordered, since the order in Feedbag can be random.

Implementation Overview

A Feedbag consists of zero or more items. Feedbags are interpreted by the server and the client. All strings in Feedbag are UTF8 encoded.

It is mandated that only users or the server shall delete information from the user's Feedbag. A client may not delete, or "forget", information if it does not support or recognize the information; deleting corrupt items is permitted.

For instance, a user loads a special Buddy tagging plugin on a machine at home but does not have this plugin at work. Changes made to the user's Feedbag (aka, Buddy List) at work shall not delete (or "forget") the user's Buddy tagging plugin attributes from the Feedbag.

Finally, subject to the rules outlined below, all items in the Feedbag are optional. If a client does not see an item or attribute on an item, it should adopt a sensible default. For example, if the PDINFO item is not present, the client should assume permit-all mode.

Root Group

In any Feedbag that contains groups there should exist a 'root group' that has an empty name, group id 0, item id 0, and a class id 1 (GROUP). This root group contains the group ordering in an ORDER attribute. If the root group does not exist and a group is to be added, the client should create the root group first. The Root Group should never be deleted by the client.

Note that some classes of items can only be in the root group and some classes of items can only be in regular groups. For example, buddies can only be in regular groups but permit/deny entries can only be in the root group. See the class enumerations for more information where items can exist.

Ordering of Feedbag

For a FEEDBAG__REPLY, the items in the Feedbag are guaranteed to be ordered. They are sorted by group id and then by item id. Thus, the root group is first, followed by groupless items (permits, denies, etc.), followed by the group with the lowest group id, followed by its items, followed by the next group, etc.

Display of Buddy List

A client can offer several methods for sorting the display of the Buddy List. One of the offered methods should be the "Natural Order" which is calculated by using the ORDER attribute of each group. A client should NOT use the order of items in the Feedbag for display, since the items can be in random order. If a user reorders their Buddy List, only the ORDER attribute needs to be changed; the itemIds should stay the same.

Naming rules

The root group must have "" for its name.

Regular groups must have unique names independent of case (e.g., if you have a group "abc", you can also have "a b c" but not "aBc"). This is the way the old client worked, so we need to keep it this way.

Items in the root group must have unique compressed names for their class (e.g., if you have an item "abc" with class==PERMIT, you cannot have "aBc" or "a b c" with class==PERMIT, but you could have "abc" with class==DENY).

Classes limited to a single item, such as Buddy-prefs and pdinfo, should have "" for the name of the item.

Items in groups must have unique compressed names in the group (e.g., if you have a Buddy "abc" in a group, you cannot have a Buddy "a bc").

Preventing corruption

In an effort to prevent corruption of the order attribute, when the client adds a Buddy/group, the client should only send the INSERT/UPDATE for the group/root after the INSERT for the Buddy/group returns its STATUS. This way if there is a failure, the ORDER can be fixed before it is sent in the INSERT/UPDATE. In cases where a group and a Buddy are added, this can mean sending the Buddy INSERT, waiting for the STATUS, sending the group INSERT, waiting for the STATUS, then sending the root INSERT/UPDATE.

Optimizations

The client should strive to optimize its transactions with the server. This means that even if several item attributes are changed by the user, the client should send only one UPDATE_ITEM. Additionally, the client should avoid sending redundant transactions such as an INSERT followed by an UPDATE (the INSERT alone will be sufficient) or an INSERT followed by a DELETE (nothing should be sent), or an UPDATE followed by a DELETE (just send the DELETE).

Sample

groupId itemId classId Name Attributes
0 0 GROUP(0) ORDER(200):321 10
0 1805 DENY(3) spimmer123
0 4046 BART(0x14) 0x05 BART_INFO(213): 00052b000013b9
0 12108 PDINFO(4) PD_MODE(202): 04
PD_MASK(203): ffffffff
PD_FLAGS(204): 00000001
0x0A 0 GROUP(1) Friends ORDER(200): 110 147
0x0A 110 BUDDY(0) ChattingChuck
0x0A 147 BUDDY(0) example@example.com
321 0 GROUP(1) Empty Group ORDER(200):

Special Notes

For email address-style usernames, such as @mac.com screen names to show up in a client's Buddy List, the client must be using a foodgroup version of 0x03. A client using an older version of the foodgroup will have any email address-style usernames sent as "PleaseUpgrade000", "PleaseUpgrade001", etc. The groupId and itemId are the same, because the names are still stored properly in the database. Once a user logs in with a newer client, all incorrect usernames will display correctly.

Item

This is a single Feedbag item.

Name Type Notes
name string16 UTF8 string of the item's name; maximum length of 97 characters
groupId uint16 (word) ID of the group of which the item is part
itemId uint16 (word) ID inside the group; if 0 then this is the definition of the group
classId uint16 (word) [Class: FEEDBAG__CLASS_IDS] ID of the class of which this item is a member
attributes tlvLBlock [Class: FEEDBAG__ATTRIBUTES] All the attributes for the item; a group must contain the ORDER attribute

Class: FEEDBAG__CLASS_IDS

Class index constants:

  • (R) means items of class should only be in the root group
  • (G) means items of class should only be in regular groups
  • (B) means items of class can be anywhere
Name Value Notes
FEEDBAG__CLASS_ID_BUDDY 0x0000 (G) Names for Buddy List
FEEDBAG__CLASS_ID_GROUP 0x0001 (R) Group Name
FEEDBAG__CLASS_ID_PERMIT 0x0002 (R) Names for Permit List
FEEDBAG__CLASS_ID_DENY 0x0003 (R) Names for Deny List
FEEDBAG__CLASS_ID_PDINFO 0x0004 (R) PDMODE/PDMASK/PDFLAGS; Corresponds to attribute TLVs 0x00CA, 0x00CB
FEEDBAG__CLASS_ID_BUDDY_PREFS 0x0005 (R) Buddy List preferences
FEEDBAG__CLASS_ID_NONBUDDY 0x0006 (R) Users not in the Buddy List; use this to store aliases or other information for future use
FEEDBAG__CLASS_ID_TPA_PROVIDER 0x0007 ?(R) NOT CURRENTLY DOCUMENTED
FEEDBAG__CLASS_ID_TPA_SUBSCRIPTION 0x0008 ?(R) NOT CURRENTLY DOCUMENTED
FEEDBAG__CLASS_ID_CLIENT_PREFS 0x0009 (R) Client-specific preferences; name is name of client, e.g., "AIM Express"
FEEDBAG__CLASS_ID_STOCK 0x000A ?(R) NOT CURRENTLY DOCUMENTED
FEEDBAG__CLASS_ID_WEATHER 0x000B ?(R) NOT CURRENTLY DOCUMENTED
FEEDBAG__CLASS_ID_WATCH_LIST 0x000D ?(R) NOT CURRENTLY DOCUMENTED
FEEDBAG__CLASS_ID_IGNORE_LIST 0x000E ?(R) NOT CURRENTLY DOCUMENTED
FEEDBAG__CLASS_ID_DATE_TIME 0x000F (R) Timestamp; when a record of this class is inserted or updated in the Feedbag, the server always adds a TIME_T attribute (overriding any that may have been provided) containing the current date and time (or one second greater than the old value, if required to keep the value increasing)
FEEDBAG__CLASS_ID_EXTERNAL_USER 0x0010 ?(R) NOT CURRENTLY DOCUMENTED
FEEDBAG__CLASS_ID_ROOT_CREATOR 0x0011 ?(R) NOT CURRENTLY DOCUMENTED
FEEDBAG__CLASS_ID_FISH 0x0012 ?(R) NOT CURRENTLY DOCUMENTED
FEEDBAG__CLASS_ID_IMPORT_TIMESTAMP 0x0013 ?(R) NOT CURRENTLY DOCUMENTED
FEEDBAG__CLASS_ID_BART 0x0014 (R) BART IDs; name is the BART Type
FEEDBAG__CLASS_ID_RB_ORDER 0x0015 (R) Order attribute lists recent buddies in the least to most recently used order; Corresponds to attribute TLV 0x00C8
FEEDBAG__CLASS_ID_PERSONALITY 0x0016 (R) Collection of BART ids
FEEDBAG__CLASS_ID_AL_PROF 0x0017 (R) Information about Account Linking preferences (List of the user's linked screen names?)
FEEDBAG__CLASS_ID_AL_INFO 0x0018 (R) Account linking information (Linked screen name?)
FEEDBAG__CLASS_ID_INTERACTION 0x0019 (R) Non-Buddy interaction record
FEEDBAG__CLASS_ID_VANITY_INFO 0x001D (R) Vanity information kept at user logoff
FEEDBAG__CLASS_ID_FAVORITE_LOCATION 0x001E (R) User's favorite locations
FEEDBAG__CLASS_ID_BART_PDINFO 0x001F (R) BART PDMODE
FEEDBAG__CLASS_ID_CUSTOM_EMOTICONS 0x0024 ICQ Custom Emoticons with BART_LIST attributes
FEEDBAG__CLASS_ID_MAX_PREDEFINED 0x0024 Dummy value; Set to highest used ID
FEEDBAG__CLASS_ID_x_ICQ_STATUS_NOTE 0x015C ?(R B?) ICQ status note
FEEDBAG__CLASS_ID_MIN 0x0400 (B) Values above this are valid indexes

TLV Class: FEEDBAG__ATTRIBUTES

The following attributes as found in TLVs of Items:

  • The range 0x0000 - 0x0063 is reserved. At this point in time the server will reject any attribute value that is less than MIN_ATTR (0x0064). This is intended for later system use.
  • The range 0x0064 - 0x00C7 is reserved for attributes that can only be modified by the server. Clients should not attempt to change or remove these attributes. The server will reject any attribute value that hasn't been registered in this file.
  • The range 0x00C8 - 0x012B is reserved for attributes that have special meaning and ordinarily are hidden from the client by some form of abstraction. Clients that fully understand the meaning of these attributes can modify these attributes. The server will reject any attribute value that has not been registered in this file.
  • The range 0x012C - 0x270F is reserved for normal, client-modifiable attributes. The server will reject any attribute value that has not been registered in this file.
  • The range 0x2710 - 0x7FFF is free for use anywhere.
Name Tag Type Notes
FEEDBAG__ATTRIBUTES_SHARED 0x0064 empty GROUP: this is a shared group
FEEDBAG__ATTRIBUTES_INVITED 0x0065 empty BUDDY: invited to join the shared group
FEEDBAG__ATTRIBUTES_PENDING 0x0066 empty BUDDY: pending authorization, a client can insert/delete this record, but not update
FEEDBAG__ATTRIBUTES_TIME_T 0x0067 t70 Timestamp
FEEDBAG__ATTRIBUTES_DENIED 0x0068 empty BUDDY: Denied authorization
FEEDBAG__ATTRIBUTES_SWIM_INDEX 0x0069 NCD NOT CURRENTLY DOCUMENTED
FEEDBAG__ATTRIBUTES_RECENT_BUDDY 0x006A empty GROUP/BUDDY: Tag to mark the group or Buddy as a recent Buddy
FEEDBAG__ATTRIBUTES_AUTO_BOT 0x006B empty GROUP/BUDDY: Tag to mark the group or Buddy as an auto BOT
FEEDBAG__ATTRIBUTES_INTERACTION 0x006D INTERACTION_INFO BUDDY: Interaction data
FEEDBAG__ATTRIBUTES_MEGA_BOT 0x006F empty GROUP/BUDDY: Tag to mark the group or Buddy as a mega BOT
FEEDBAG__ATTRIBUTES_ORDER 0x00C8 Array of uint16 (word) BUDDY/GROUP Array of IDs, this represents order
FEEDBAG__ATTRIBUTES_BUDDY_PREFS 0x00C9 uint32 (dword) [Class: FEEDBAG__BUDDY_PREFS] BUDDY_PREFS: the first 32 of the Buddy List preferences
FEEDBAG__ATTRIBUTES_PD_MODE 0x00CA uint8 (byte) [Class: FEEDBAG__PD_MODE] PD_MODE: permit/deny mode
FEEDBAG__ATTRIBUTES_PD_MASK 0x00CB uint32 (dword) [Class: OSERVICE__USER_FLAGS] PD_MODE: permit/deny mask, usually just 0xffffffff
FEEDBAG__ATTRIBUTES_PD_FLAGS 0x00CC uint32 (dword) [Class: FEEDBAG__PD_FLAGS] PD_MODE: permit/deny flags
FEEDBAG__ATTRIBUTES_CLIENT_PREFS 0x00CD blob CLIENT_PREFS: blob of client data; name of item should be client
FEEDBAG__ATTRIBUTES_LANGUAGE 0x00CE NCD NOT CURRENTLY DOCUMENTED
FEEDBAG__ATTRIBUTES_FISH_URI 0x00CF NCD NOT CURRENTLY DOCUMENTED
FEEDBAG__ATTRIBUTES_WIRELESS_PD_MODE 0x00D0 NCD NOT CURRENTLY DOCUMENTED
FEEDBAG__ATTRIBUTES_WIRELESS_IGNORE_MODE 0x00D1 NCD NOT CURRENTLY DOCUMENTED
FEEDBAG__ATTRIBUTES_FISH_PD_MODE 0x00D2 NCD NOT CURRENTLY DOCUMENTED
FEEDBAG__ATTRIBUTES_FISH_IGNORE_MODE 0x00D3 NCD NOT CURRENTLY DOCUMENTED
FEEDBAG__ATTRIBUTES_CREATE_TIME 0x00D4 NCD NOT CURRENTLY DOCUMENTED
FEEDBAG__ATTRIBUTES_BART_INFO 0x00D5 blob BART: opaque BART data; the item name is the string version of the BART type
FEEDBAG__ATTRIBUTES_BUDDY_PREFS_VALID 0x00D6 uint32 (dword) [Class: FEEDBAG__BUDDY_PREFS] BUDDY_PREFS: mask indicating which of the first 32 BUDDY_PREFS have actually been set and which are uninitialized
FEEDBAG__ATTRIBUTES_BUDDY_PREFS2 0x00D7 Array of uint8 (byte) [Class: FEEDBAG__BUDDY_PREFS] BUDDY_PREFS: For all prefs after the first 32, this is a growing array
FEEDBAG__ATTRIBUTES_BUDDY_PREFS2_VALID 0x00D8 Array of uint8 (byte) [Class: FEEDBAG__BUDDY_PREFS] BUDDY_PREFS: bitmask indicating which of BUDDY_PREFS2 have actually been set
FEEDBAG__ATTRIBUTES_BART_LIST 0x00D9 Array of BART__ID BART: array of complete BART items, the item name is the personality name
FEEDBAG__ATTRIBUTES_ARRIVE_SOUND 0x012C NCD NOT CURRENTLY DOCUMENTED
FEEDBAG__ATTRIBUTES_LEAVE_SOUND 0x012D NCD NOT CURRENTLY DOCUMENTED
FEEDBAG__ATTRIBUTES_IMAGE 0x012E NCD NOT CURRENTLY DOCUMENTED
FEEDBAG__ATTRIBUTES_COLOR_BG 0x012F NCD NOT CURRENTLY DOCUMENTED
FEEDBAG__ATTRIBUTES_COLOR_FG 0x0130 NCD NOT CURRENTLY DOCUMENTED
FEEDBAG__ATTRIBUTES_ALIAS 0x0131 string BUDDY: alias for Item
FEEDBAG__ATTRIBUTES_PASSWORD 0x0132 NCD NOT CURRENTLY DOCUMENTED
FEEDBAG__ATTRIBUTES_DISABLED 0x0133 NCD NOT CURRENTLY DOCUMENTED
FEEDBAG__ATTRIBUTES_COLLAPSED 0x0134 empty GROUP: If present the group is collapsed when initially shown
FEEDBAG__ATTRIBUTES_URL 0x0135 NCD NOT CURRENTLY DOCUMENTED
FEEDBAG__ATTRIBUTES_ACTIVE_LIST 0x0136 NCD NOT CURRENTLY DOCUMENTED
FEEDBAG__ATTRIBUTES_EMAIL_ADDR 0x0137 string BUDDY: string for user's Email address
FEEDBAG__ATTRIBUTES_PHONE_NUMBER 0x0138 string BUDDY: string for user's normal phone number
FEEDBAG__ATTRIBUTES_CELL_PHONE_NUMBER 0x0139 string BUDDY: string for user's cell phone number
FEEDBAG__ATTRIBUTES_SMS_PHONE_NUMBER 0x013A string BUDDY: string for user's SMS phone number
FEEDBAG__ATTRIBUTES_WIRELESS 0x013B NCD NOT CURRENTLY DOCUMENTED
FEEDBAG__ATTRIBUTES_NOTE 0x013C string BUDDY: string for "notes" about item
FEEDBAG__ATTRIBUTES_ALERT_PREFS 0x013D uint16 (word) [Class: FEEDBAG__BUDALERT_MASK] BUDDY: alert prefs
FEEDBAG__ATTRIBUTES_BUDALERT_SOUND 0x013E string BUDDY: Alert sound to play
FEEDBAG__ATTRIBUTES_STOCKALERT_VALUE 0x013F NCD NOT CURRENTLY DOCUMENTED
FEEDBAG__ATTRIBUTES_TPALERT_EDIT_URL 0x0140 NCD NOT CURRENTLY DOCUMENTED
FEEDBAG__ATTRIBUTES_TPALERT_DELETE_URL 0x0141 NCD NOT CURRENTLY DOCUMENTED
FEEDBAG__ATTRIBUTES_TPPROV_MOREALERTS_URL 0x0142 NCD NOT CURRENTLY DOCUMENTED
FEEDBAG__ATTRIBUTES_FISH 0x0143 NCD NOT CURRENTLY DOCUMENTED
FEEDBAG__ATTRIBUTES_XUNCONFIRMEDX_LAST_ACCESS 0x0145 NCD NOT CURRENTLY DOCUMENTED
FEEDBAG__ATTRIBUTES_IM_SENT 0x0150 uint32 (dword) VANITY_INFO: Client read only, number of IMs sent
FEEDBAG__ATTRIBUTES_ONLINE_TIME 0x0151 uint32 (dword) VANITY_INFO: Client read only, number of seconds a user is online
FEEDBAG__ATTRIBUTES_AWAY_MSG 0x0152 uint32 (dword) VANITY_INFO: Client read only, number of times a user has the away message set
FEEDBAG__ATTRIBUTES_IM_RECEIVED 0x0153 uint32 (dword) VANITY_INFO: Client read only, number of IMs received
FEEDBAG__ATTRIBUTES_BUDDYFEED_VIEW 0x0154 t70 BUDDY: When did I last view this person's Buddy Feed ?
FEEDBAG__ATTRIBUTES_WORK_PHONE_NUMBER 0x0158 string BUDDY: string for user's work phone number
FEEDBAG__ATTRIBUTES_OTHER_PHONE_NUMBER 0x0159 string BUDDY: string for user's other phone number
FEEDBAG__ATTRIBUTES_WEB_PD_MODE 0x015F uint8 (byte) [Class: FEEDBAG__WEB_PD_MODE] PDINFO: When to show anonymous presence
FEEDBAG__ATTRIBUTES_FIRST_CREATION_TIME_XC 0x0167 NCD NOT CURRENTLY DOCUMENTED
FEEDBAG__ATTRIBUTES_PD_MODE_XC 0x016E NCD NOT CURRENTLY DOCUMENTED

Datatype: FEEDBAG__INTERACTION_INFO

The server tracks the last interaction time and generates a score with time decay for a frequency display.

Name Type Notes
lastUpdate t70 The last interaction with this Buddy
score f32 The score; higher means more interactions

Class: FEEDBAG__PD_MODE

The permit deny system can be in the following different modes.

Name Value Notes
FEEDBAG__PD_MODE_PERMIT_ALL 0x01 Allow all users
FEEDBAG__PD_MODE_DENY_ALL 0x02 Deny all users
FEEDBAG__PD_MODE_PERMIT_SOME 0x03 Permit users listed
FEEDBAG__PD_MODE_DENY_SOME 0x04 Deny users listed
FEEDBAG__PD_MODE_PERMIT_ON_LIST 0x05 Allow users on the Buddy List

Class: FEEDBAG__WEB_PD_MODE

These are the different modes that control anonymous web queries.

Name Value Notes
PD_MODE 0 Only show my anonymous queries on web pages when user is in Allow All or Deny Some mode [DEFAULT]
PERMIT_ALL 0x01 Permit anonymous queries always
DENY_ALL 0x02 Deny anonymous queries always

Class: FEEDBAG__PD_FLAGS

This class changes how the permit deny settings work.

Name Value Notes
FEEDBAG__PD_FLAGS_APPLIES_IM 0x0001 The permit/deny settings should apply also to the IM permit/deny settings. If not set, the IM permit/deny settings can be different and is controlled by sending IMs to $im_off & $im_on. This is turned on for AIM users no matter the setting.
FEEDBAG__PD_FLAGS_HIDE_WIRELESS 0x002 Hide the fact that the user is on a wireless device from other users

Class: FEEDBAG__BUDDY_PREFS

These are all the server based preferences and their defaults.

Name Value Notes
DISPLAY_LOGIN 0x00 [1] Whether or not to display Buddy List at login
DISPLAY_EBUDDY 0x01 [1] Whether or not to display the EBuddy group
PLAY_ENTER 0x02 [1] Whether or not to play a sound when a Buddy enters
PLAY_EXIT 0x03 [1] Whether or not to play a sound when a Buddy exits
VIEW_IMSTAMP 0x04 [1] Whether or not to display the timestamp in IMs
VIEW_SMILEYS 0x05 [1] Whether or not to display :) as a graphic
ACCEPT_ICONS 0x06 [1] Accept Buddy icons
RESERVED 0x07 [1] Legacy pref
KNOCK_NONAOLIMS 0x08 [1] Want knock-knocks for IMs from non-AOL users
KNOCK_NONLISTIMS 0x09 [1] Want knock-knocks for IMs from people not on your Buddy List
DISCLOSE_IDLE 0x0A [1] Let other users know if you are idle
ACCEPT_CUSTOMBART 0x0B [0] Accept non-official icons, chromes
ACCEPT_NONLISTBART 0x0C [0] Accept icon, chromes, from non-buddies (official only)
ACCEPT_BGS 0x0D [1] Accept IM window backgrounds
ACCEPT_CHROMES 0x0E [1] Accept IM window chromes
ACCEPT_BLSOUNDS 0x0F [1] Accept Buddy List arrive/depart sounds
ACCEPT_IMSOUNDS 0x10 [1] Accept IM sounds
NO_SEE_RECENT_BUDDIES 0x11 [0] Use does not see RECENT BUDDIES group
ACCEPT_SMS_LEGAL 0x12 [0] User has accepted to SMS legal agreement
ENTER_DOES_CRLF 0x14 [0] Enter does not send IM
PLAY_IM_SOUND 0x15 [1] Play sound on IM receipt
DISCLOSE_TYPING 0x16 [1] Send typing notifications
ACCEPT_SUPERICONS 0x18 [1] Accept 'super-buddies'
ACCEPT_BLRICHTEXT 0x19 [1] Display rich-text screennames in Buddy List
REDUCE_IM_SOUND 0x1A [1] Attenuate IM sounds after first sound
CONFIRM_DIRECT_IM 0x1B [1] Confirm with local user before starting DIM
ONE_TABBED_IM_WINDOW 0x1C [1] Show all IMs in one tabbed window
BUDDYINFO_ON_MOUSEOVER 0x1D [1] Popup information when mouse pauses above Buddy
DISCLOSE_BUDDY_MATCHES 0x1E [1] Let other users know if they have Buddy matches
CATCH_IMS 0x1F [0] For server use only; clients use CATCH_IMS_FOR_CLIENT
SHOW_FRIENDLY_NAME 0x20 [1] Show alias instead of screenname?
DISCLOSE_RADIO 0x21 [1] Buddies know when user listening to AOL radio
SHOW_CAPABILIITES 0x22 [1] Show capabilities in the Buddy List
SHOW_BUDDYLIST_FILTER 0x23 [1] Show Buddy List filter
SHOW_AWAY_IDLE 0x24 [1] Show away and idle buddies
SHOW_MOBILE 0x25 [1] Show mobile buddies
SORT_BUDDYLIST 0x26 [0] Keep Buddy List sorted A-Z
CATCH_IMS_FOR_CLIENT 0x27 [0] IM catcher window enabled?
NEW_MESSAGE_SMALL_NOTIFICATION 0x28 [1] show small notification after new message arrives
NO_FREQUENT_BUDDIES 0x29 [0] User does not see FREQUENT BUDDIES group
BLOG_AWAY_MESSAGES 0x2A [0] Send away messages to journals ?
BLOG_AIMSIG_MESSAGES 0x2B [0] Send AIM signature to journals ?
BLOG_NOCOMMENTS 0x2C [0] User allows comments ?
FRIEND_OF_FRIEND 0x2D [0] Allow Friend of Friend queries
FRIEND_GET_CONTACT_LIST 0x2E [0] Allow friend to get my Buddy List
COMPAD_INIT 0x2F [0] ICQ Compad Init
SEND_BUDDYFEED 0x30 [1] Send Buddy Feed; Young Teens(YT)/Kids Only(KO) - KO default to OFF
BLK_SEND_IM_WHILE_AWAY 0x31 [0] Block send IM while away
SHOW_BUDDYFEED 0x32 [1] Show What is New indicator
NO_SAVE_VANITY_INFO 0x33 [0] Do not save vanity related information (IM sent, idle, etc.)
ACCEPT_OFFLINE_IM 0x34 [1] Accept Offline IMs
SHOW_GROUPS 0x35 [0] ICQ: Show buddies in groups ?
SORT_GROUP 0x36 [1] ICQ: Sort groups ?
SHOW_OFFLINE_BUDDIES 0x37 [1] ICQ: Show/Hide Offline Buddies
EXPAND_BUDDIES 0x38 [0] ICQ: Show multiline information on some buddies
THIRD_PARTY_FEEDS 0x39 [0] BUDDY FEED: Does the owner have third party feeds
NOTIFY_RECEIVED_INVITE 0x3A [1] Notify at login about received AIMPages invitations
APF_AUTO_ACCEPT 0x3B [0] Auto accept AIMPages invitations
APF_AUTO_ACCEPT_BUDDY 0x3C [0] If APF_AUTO_ACCEPT and APF_AUTO_ACCEPT_BUDDY, auto accept invites only from buddies
BLOCK_AWAY_MSG_FEED 0x3D [0] Block feed storage for away messages
BLOCK_AIM_PROFILE_FEED 0x3E [0] Block feed storage for AIM Profiles
BLOCK_AIM_PAGES_FEED 0x3F [0] Block feed storage for AIM Pages
BLOCK_JOURNALS_FEED 0x40 [0] Block feed storage for AOL Journals
BLOCK_LOCATION_FEED 0x41 [0] Block feed storage for Location data
BLOCK_STICKIES_FEED 0x42 [0] Block feed storage for Stickies
BLOCK_UNCUT_FEED 0x43 [0] Block feed storage for Uncut video
BLOCK_LINKS_FEED 0x44 [0] Block feed storage for Interesting Links
BLOCK_AIM_BULLETIN_FEED 0x45 [0] Block feed storage for AIM Bulletins
SAVE_STATUS_MSG 0x46 [1] Save status message
APF_NOTIFY_RECEIVED_INVITE_BY_EMAIL 0x47 [0] Should email be sent when user invited ?
SHOW_OFFLINE_GRP 0x48 [1] Show Offline group
OFFLINE_GRP_COLLAPSED 0x49 [0] Offline Group is collapsed
FIRST_IM_SOUND_ONLY 0x4A [0] Only play the sound on the first IM
IMBLAST_INVITE_NOTIFY 0x4B [1] ALLOWS IMSERV invite notify message

Class: FEEDBAG__BUDALERT_MASK

Masks for when to trigger Buddy alerts or pounces.

Name Value Notes
FEEDBAG__BUDALERT_PREF_MASK_WHEN_ONLINE 0x0001 Trigger when online
FEEDBAG__BUDALERT_PREF_MASK_WHEN_NOTIDLE 0x0002 Trigger when no longer idle
FEEDBAG__BUDALERT_PREF_MASK_WHEN_NOTAWAY 0x0004 Trigger when no longer away
FEEDBAG__BUDALERT_PREF_MASK_DISPLAY_DIALOG 0x0100 Display dialog
FEEDBAG__BUDALERT_PREF_MASK_PLAY_SOUND 0x0200 Play sound

From Aleksandr Shutko: Format of SSI item

 Format of SSI item   


 

     SSI service allow you to store various information on the server. Server-side information is stored as a list of items. Here is common structure of item:

 xx xx   word   Length of the item name
 xx ..   string   Item name string
 xx xx   word   Group ID#
 xx xx   word   Item ID#
 xx xx   word   Type of item flag (see list bellow)
 xx xx   word   Length of the additional data
 xx xx   word   TLV.Type (TLV #1)
 xx xx   word   TLV.Length
 .. ..   xxxx   TLV.Value
 ....   ....   ....
 xx xx   word   TLV.Type (TLV #n)
 xx xx   word   TLV.Length
 .. ..   xxxx   TLV.Value


     About name of the item. It can be icq uin, aim screenname, group name or special id. SSI contains a "master group" which contains all other groups. Master group has a group ID# of 0x0000. All groups have item ID# of 0x0000. You can't have groups or items with same group/item ID#.

     Every item can have additional data stored as tlv chain. For example group item can store its buddy ID numbers in TLV(0x00C8). Buddy item may contain buddy comment in TLV(0x013C) or/and SMS number in TLV(0x013A) or/and alerts settings in TLV(0x013D). You can't add buddy that requires authorization without permission. You can add it only with TLV(0x0066) as a buddy record awaiting authorization.

     Each item has a type. It can be buddy record, group record, permit record, presence permissions or something other. Each item type have its limitations and you can request them via SNAC(13,02). Here is the list of known item types:

  0x0000   Buddy record (name: uin for ICQ and screenname for AIM)
  0x0001   Group record
  0x0002   Permit record ("Allow" list in AIM, and "Visible" list in ICQ)
  0x0003   Deny record ("Block" list in AIM, and "Invisible" list in ICQ)
  0x0004   Permit/deny settings or/and bitmask of the AIM classes
  0x0005   Presence info (if others can see your idle status, etc)
  0x0009   Unknown. ICQ2k shortcut bar items ?
  0x000E   Ignore list record.
  0x000F   Last update date (name: "LastUpdateDate").
  0x0010   Non-ICQ contact (to send SMS). Name: 1#EXT, 2#EXT, etc
  0x0013   Item that contain roster import time (name: "Import time")
  0x0014   Own icon (avatar) info. Name is an avatar id number as text


     Here is the list of known TLVs in additional data blob (itype - item type that may have this tlv in its data blob):

     [TLV(0x0066), itype 0x00, size 00] - Signifies that you are awaiting authorization for this buddy. The client is in charge of putting this TLV, but you will not receiving status updates for the contact until they authorize you, regardless if this is here or not. Meaning, this is only here to tell your client that you are waiting for authorization for the person. This TLV is always empty.

     [TLV(0x00C8), itype 0x01, size XX] - If group is the master group, this contains the group ID#s of all groups in the list. If the group is a normal group, this contains the buddy ID#s of all buddies in the group. Each ID# is 2 bytes. If there are no groups in the list (if in the master group), or no buddies in the group (if in a normal group), then this TLV is not present.

     [TLV(0x00C9), itype 0x05, size 04] - Unknown (contain 0x0000006f when others could not see idle time, contain 0x0000046f when others could see idle time).

     [TLV(0x00CA), itype 0x04, size 01] - This is the byte that tells the AIM servers your privacy setting. If 1, then allow all users to see you. If 2, then block all users from seeing you. If 3, then allow only the users in the permit list. If 4, then block only the users in the deny list. If 5, then allow only users on your buddy list.

     [TLV(0x00CB), itype 0x04, size 04] - This is a bit mask which tells the AIM servers which class of users you want to be visible to. If 0xffffffff, then all users can see you. If 0x00000004, then AIM users can not see you. See known user classes here.

     [TLV(0x00CC), itype 0x04, size 04] - Bitmask of flags containing "Allow others to see..." options. The default is 0x00000000. The flags are the following, logically ORed together:

  • 0x00000002 - Do not allow others to see that I am using a wireless device
  • 0x00000400 - Allow others to see my idle time
  • 0x00400000 - Allow others to see that I am typing a response

     [TLV(0x00CD), itype 0x09, size XX] - This item type (9) looks like ICQ2k shortcut list. Examples: "2672,0,2,1" and "3097,0,0,0"

     [TLV(0x00D4), itype 0x13, size 04] - TLV for import time item (type 0x0013). Contains timestamp in unix_t format (seconds since 1.1.1970) when the buddylist has been first time uploaded to the server

     [TLV(0x00D5), itype 0x14, size XX] - TLV for buddy icon info (type 0x0014). Contains the icon flags (1 byte), md5 hash size (1 byte) and md5 hash of the you are using (allways 16 bytes).

     [TLV(0x0131), itype 0x00, size XX] - This stores the name that the contact should show up as in the contact list. It should initially be set to the contact's nick name, and can be changed to anything by the client.

     [TLV(0x0137), itype 0x00, size XX] - Your buddy locally assigned mail address.

     [TLV(0x013A), itype 0x00, size XX] - Your buddy locally assigned SMS number.

     [TLV(0x013C), itype 0x00, size XX] - This stores the "buddy comment" field. The max length winaim lets you use is 0x0054. I'm not sure if that is a true limit or not.

     [TLV(0x013D), itype 0x00, size 02] - Personal alerts for this buddy.
First byte:

  • 0x01 - Pop up window notification
  • 0x02 - Play sound (sound file specified in 0x013e TLV)

Second byte:

  • 0x01 - When contact comes online
  • 0x02 - When contact becomes unidle
  • 0x04 - When contact returns from away

     [TLV(0x013E), itype 0x00, size XX] - Sound client should play as alert for this buddy.

     [TLV(0x0145), itype 0x00, size XX] - Date/time (unix time() format) when you send message to this you first time. Actually I noticed that ICQLite adds this TLV then you first open message dialog at this user. Also I've seen this tlv in LastUpdateDate item.



 


SSI item examples:


  Buddy item ('6218897', gid=0x0A1E, iid=0x4318, nick='FunBoo')
  00 07 36 32 31 38 38 39  37 0A 1E 43 18 00 00 00  ..6218897..C....
  0A 01 31 00 06 46 75 6E  42 6F 6F                 ..1..FunBoo

  Group item ('General', gid=0x1DCA, iid=0, contain iid=0x1f11)
  00 07 47 65 6e 65 72 61  6c 1d ca 00 00 00 01 00  ..General.......
  06 00 c8 00 02 1f 11                              .......

  System item ('LastUpdateDate', gid=0, iid=0x69D9, type=0x0f)
  00 0e 4c 61 73 74 55 70  64 61 74 65 44 61 74 65  ..LastUpdateDate
  00 00 69 d9 00 0f 00 08  01 45 00 04 41 e2 e4 e8  ..i......E..A...

  Own icon hash ('1', gid=0, iid=0x1813, type=0x14, +tlv(0x00D5))
  00 01 31 00 00 18 13 00  14 00 1A 00 D5 00 12 01  ..1.............
  10 FC 23 B3 F7 C8 00 D3  92 EF 5E 06 8A D3 66 7F  ..#.......^...f.
  C7 01 31 00 00                                    ..1..

  Non-icq contact ('1#EXT', gid=0, iid=0x2BD6, type=0x10)
  00 05 31 23 45 58 54 00  00 2b d6 00 10 00 20 01  ..1#EXT..+.... .
  31 00 08 41 6c 65 78 61  6e 64 72 01 3a 00 10 2b  1..Alexandr.:..+
  37 20 28 39 30 32 29 20  35 34 32 32 39 39 33     7 (902) 5422993