Protocols/MSNP/MSNC/MSNObject

From NINA Wiki
Jump to navigation Jump to search
MSNP Protocol
MSNC
OverviewMSNObject
Client Capabilities
P2P protocol
TransportsMSNSLP
Headers
P2Pv1 Binary headers
P2Pv2 Binary headers
Transfers
Display Pictures
Custom Emoticons
File Transfer
Overview
IntroductionTermsClients
Reference
Error ListCommandsRelying Party SuiteSpotlife
Services
XMPPHTTP GatewayTabsActivities
Documentation
Development ToolsMSNP Grid
PolygamyURLs used by MSN
Documents
Protocol Versions
Version 21
Version 18
Version 16
Version 15
Version 14
Version 13
Version 12
Version 11
Version 9
Version 8
Version 2
MSNC
IntroductionP2PObject DescriptorDisplay PicturesFile Transfer
Scenarios
Microsoft Messenger for Mac
MSNP on WebTV (MSNTV)


The MSNObject was introduced with MSNP9 and is part of the Protocols/MSNP/MSNC1 specification. The MSNObject serves as a way to identify Display Pictures, Custom Emoticons, Backgrounds, Voice Clips etc (basically any "content" except file transfers).

A MSNObject is always in the following format. In the below example you can see the basic fields that will always have to be present. You may add your own properties, too (the client just ignores them). Later clients can also add fields for dynamic content (Dynamic Display Pictures like Meegos) for stamping (a method to verify a digital signature of an object), or fields for things like playback length for signature sounds.

<msnobj Creator="buddy@hotmail.com" Size="24539" Type="3" Location="TFR2C.tmp" Friendly="AAA=" SHA1D="trC8SlFx2sWQxZMIBAWSEnXc8oQ=" SHA1C="U32o6bosZzluJq82eAtMpx5dIEI="/>

The official client stores most of the object descriptors in the so called content store.

Explanation of basic fields

Creator

This field indicates the person who made (and is sending) the object. It is typically the address of a buddy.

Size

The total size of the data the object represents, in bytes.

Type

The Type field indicates what sort of file the object describes. Currently the following fields are known:

  • 1: Avatar (Unknown, but already present since Messenger 6.0)
  • 2: Custom Emoticons
  • 3: User Tile (Static display pictures only)
  • 4: Shared File (Unknown, but already present since Messenger 6.0)
  • 5: Backgrounds (Static backgrounds only)
  • 6: History (Unknown)
  • 7: Deluxe Display Pictures (Dynamic display pictures)
  • 8: Wink
  • 9: Map File (A map file contains a list of items in the store)
  • 10: Dynamic Backgrounds (Animated backgrounds)
  • 11: Voice Clip
  • 12: Plug-In State (Saved state of Add-ins)
  • 13: Roaming Objects (For example your roaming display picture)
  • 14: Signature Sound (Signature sounds introduced in Messenger 9.0)
  • 15: Currently unknown. Possibly related to the photo share feature
  • 16: Scene
  • 17: Web cam Dynamic Display Picture

Note! The value 14 was used for Location information in some BETA clients, but was later removed because of privacy reasons. In the Messenger 9.0 client it was re-used for signature sounds.

Location

The Location field contains the filename under which the file will be, or has been, stored.

Friendly

This field contains the name of the picture in Unicode (UTF-16 Little Endian) format. The string is then encoded with Base64. For most types of descriptors this field is a null character, or AAA= when encoded.

SHA1D

The SHA1D field contains a SHA1 hash of the images data encoded in Base64. It is also known as the Data Hash or the SHA1 Data Field.

SHA1C

This field contains all previous fields hashed with SHA1, and then encoded in Base64. This field is better known as the Checksum, or SHA1 Checksum Field. The string that must be hashed to get the resulting SHA1C value looks similar to:

Creatorbuddy1@hotmail.comSize24539Type3LocationTFR2C.tmpFriendlyAAA=SHA1DtrC8SlFx2sWQxZMIBAWSEnXc8oQ=

It is suspected, but not verified, that the order in which the fields are hashed must be the same as the order of the fields in the XML format.


Sources