bool CMsnContactManager::BuildGetContactRequest(const CMsnTicket& ticket, acl::string& out)
{
	const TICKET* tt = ticket.GetTicket("contacts.msn.com");
	if (tt == NULL)
	{
		logger_error("contacts.msn.com no found");
		return (false);
	}
	else if (tt->ticket == NULL)
	{
		logger_error("contactts.msn.com's ticket null");
		return (false);
	}

	acl::string buf;
	buf.format("t=%s&p=", tt->ticket, tt->p ? tt->p : "");
	out.format(MSN_GET_CONTACT_TEMPLATE, "Initial", buf.c_str(), "");
	return (true);
}
bool CMsnContactManager::BuildGetAddressRequest(const CMsnTicket& ticket,
	acl::string& out)
{
	const TICKET* tt = ticket.GetTicket("contacts.msn.com");
	if (tt == NULL)
	{
		logger_error("contacts.msn.com no found");
		return (false);
	}
	else if (tt->ticket == NULL)
	{
		logger_error("contactts.msn.com's ticket null");
		return (false);
	}

	acl::string buf, cache_key;
	if (cache_key_)
		cache_key << "<CacheKey>" << cache_key_ << "</CacheKey>";
	buf.format("t=%s&amp;p=", tt->ticket, tt->p ? tt->p : "");
	out.format(MSN_GET_ADDRESS_TEMPLATE, "Initial",
		cache_key.empty() ? "" : cache_key.c_str(), buf.c_str(), "");
	return (true);
}