diff options
author | dequis <dx@dxzone.com.ar> | 2015-03-09 07:14:58 -0300 |
---|---|---|
committer | dequis <dx@dxzone.com.ar> | 2015-04-10 14:10:40 -0300 |
commit | d80822c66f79471bc2e12167a14611dd3c49da65 (patch) | |
tree | 5f8013dd11dbe463368cc29c3e05a780b7a33ef3 /protocols/msn/msn.h | |
parent | 11e42dcf7366ee547b9651648724d35d12e36091 (diff) |
msn: implement PUT /user to set status as online
Diffstat (limited to 'protocols/msn/msn.h')
-rw-r--r-- | protocols/msn/msn.h | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/protocols/msn/msn.h b/protocols/msn/msn.h index 3827c992..c4517b78 100644 --- a/protocols/msn/msn.h +++ b/protocols/msn/msn.h @@ -66,13 +66,15 @@ #define MSN_CAP1 0xC000 #define MSN_CAP2 0x0000 -#define MSN_MESSAGE_HEADERS \ +#define MSN_BASE_HEADERS \ "Routing: 1.0\r\n" \ "To: 1:%s\r\n" \ "From: 1:%s;epid={%s}\r\n" \ "\r\n" \ "Reliability: 1.0\r\n" \ - "\r\n" \ + "\r\n" + +#define MSN_MESSAGE_HEADERS MSN_BASE_HEADERS \ "Messaging: 2.0\r\n" \ "Message-Type: Text\r\n" \ "Content-Length: %zd\r\n" \ @@ -81,6 +83,25 @@ "\r\n" \ "%s" +#define MSN_PUT_HEADERS MSN_BASE_HEADERS \ + "Publication: 1.0\r\n" \ + "Uri: %s\r\n" \ + "Content-Type: %s\r\n" \ + "Content-Length: %zd\r\n" \ + "\r\n" \ + "%s" + +#define MSN_PUT_USER_BODY \ + "<user>" \ + "<s n=\"PE\"><UserTileLocation></UserTileLocation><FriendlyName>%s</FriendlyName><PSM>%s</PSM><DDP></DDP>" \ + "<Scene></Scene><ASN></ASN><ColorScheme>-3</ColorScheme><BDG></BDG><RUM>%s</RUM><RUL></RUL><RLT>0</RLT>" \ + "<RID></RID><SUL></SUL><MachineGuid>%s</MachineGuid></s>" \ + "<s n=\"IM\"><Status>%s</Status><CurrentMedia></CurrentMedia></s>" \ + "<sep n=\"PD\"><ClientType>1</ClientType><EpName>%s</EpName><Idle>%s</Idle><State>%s</State></sep>" \ + "<sep n=\"PE\"><VER>BitlBee:" BITLBEE_VERSION "</VER><TYP>1</TYP><Capabilities>%d:%d</Capabilities></sep>" \ + "<sep n=\"IM\"><Capabilities>%d:%d</Capabilities></sep>" \ + "</user>" + #define MSN_TYPING_HEADERS "MIME-Version: 1.0\r\n" \ "Content-Type: text/x-msmsgscontrol\r\n" \ "TypingUser: %s\r\n" \ |