comparison libpurple/protocols/msn/notification.c @ 31120:f56126c5aa44

Save PrivateEndpointData that we've received. I think this only applies to ourselves, so only check if it's our own UBX. This currently only makes use of the endpoint name and type.
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Tue, 15 Dec 2009 02:05:32 +0000
parents fc7798a661f7
children 509c4ffff958
comparison
equal deleted inserted replaced
31119:fee2d38d14bd 31120:f56126c5aa44
1669 data.extcaps = 0; 1669 data.extcaps = 0;
1670 } 1670 }
1671 1671
1672 msn_user_set_endpoint_data(user, id, &data); 1672 msn_user_set_endpoint_data(user, id, &data);
1673 } 1673 }
1674
1675 /* Need to shortcut this check, probably... */
1676 if (user == user->userlist->session->user) {
1677 for (epNode = xmlnode_get_child(payloadNode, "PrivateEndpointData");
1678 epNode;
1679 epNode = xmlnode_get_next_twin(epNode)) {
1680 MsnUserEndpoint *ep;
1681 xmlnode *nameNode, *clientNode;
1682
1683 /* <PrivateEndpointData id='{GUID}'>
1684 <EpName>Endpoint Name</EpName>
1685 <Idle>true/false</Idle>
1686 <ClientType>1</ClientType>
1687 <State>NLN</State>
1688 </PrivateEndpointData>
1689 */
1690 id = xmlnode_get_attrib(epNode, "id");
1691 ep = msn_user_get_endpoint_data(user, id);
1692
1693 if (ep != NULL) {
1694 nameNode = xmlnode_get_child(epNode, "EpName");
1695 if (nameNode != NULL) {
1696 g_free(ep->name);
1697 ep->name = xmlnode_get_data(nameNode);
1698 }
1699
1700 clientNode = xmlnode_get_child(epNode, "ClientType");
1701 if (clientNode != NULL) {
1702 tmp = xmlnode_get_data(clientNode);
1703 ep->type = strtoul(tmp, 10, NULL);
1704 g_free(tmp);
1705 }
1706 }
1707 }
1708 }
1674 } 1709 }
1675 1710
1676 /* 1711 /*
1677 * Get the UBX's PSM info 1712 * Get the UBX's PSM info
1678 * Post it to the User status 1713 * Post it to the User status