()
| 38 | static long lastQueryTime; |
| 39 | |
| 40 | public static JabberDataBlock query() { |
| 41 | JabberDataBlock result = new Iq(null, Iq.TYPE_GET, "mail-request"); |
| 42 | JabberDataBlock mailQuery = new JabberDataBlock("query"); |
| 43 | mailQuery.setNameSpace(NS_MAIL_NOTIFY); |
| 44 | if (lastQueryTime > 0) { |
| 45 | mailQuery.setAttribute("newer-than-time", String.valueOf(lastQueryTime)); |
| 46 | } |
| 47 | result.addChild(mailQuery); |
| 48 | return result; |
| 49 | } |
| 50 | |
| 51 | public int blockArrived(JabberDataBlock data) { |
| 52 | if (!(data instanceof Iq)) { |
no test coverage detected