Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.impl.protocol.jabber.extensions.mailnotification
Class MailboxQueryIQ

java.lang.Object
  extended by org.jivesoftware.smack.packet.Packet
      extended by org.jivesoftware.smack.packet.IQ
          extended by net.java.sip.communicator.impl.protocol.jabber.extensions.mailnotification.MailboxQueryIQ

public class MailboxQueryIQ
extends org.jivesoftware.smack.packet.IQ

A straightforward IQ extension. The QueryNotify object is used to create queries for the Gmail mail server. It creates a simple IQ packet which represents the query.

Author:
Matthieu Helleringer, Alain Knaebel, Emil Ivov

Nested Class Summary
 
Nested classes/interfaces inherited from class org.jivesoftware.smack.packet.IQ
org.jivesoftware.smack.packet.IQ.Type
 
Field Summary
static String NAMESPACE
          The name space for new mail notification packets.
 
Fields inherited from class org.jivesoftware.smack.packet.Packet
DEFAULT_LANGUAGE, ID_NOT_AVAILABLE
 
Constructor Summary
MailboxQueryIQ()
           
 
Method Summary
 String getChildElementXML()
          Returns the sub-element XML section of the IQ packet.
 long getNewerThanTid()
          Returns the value of the "newer-than-tid" attribute.
 long getNewerThanTime()
          Returns the value of the "newer-than-time" attribute.
 void setNewerThanTid(long newerThanTid)
          Sets the value of the "newer-than-tid" attribute.
 void setNewerThanTime(long newerThanTime)
          Sets the value of the "newer-than-time" attribute.
 
Methods inherited from class org.jivesoftware.smack.packet.IQ
createErrorResponse, createResultIQ, getType, setType, toXML
 
Methods inherited from class org.jivesoftware.smack.packet.Packet
addExtension, deleteProperty, equals, getDefaultLanguage, getError, getExtension, getExtension, getExtensions, getExtensionsXML, getFrom, getPacketID, getProperty, getPropertyNames, getTo, getXmlns, hashCode, nextID, removeExtension, setDefaultXmlns, setError, setFrom, setPacketID, setProperty, setTo
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAMESPACE

public static final String NAMESPACE
The name space for new mail notification packets.

See Also:
Constant Field Values
Constructor Detail

MailboxQueryIQ

public MailboxQueryIQ()
Method Detail

getChildElementXML

public String getChildElementXML()
Returns the sub-element XML section of the IQ packet.

Specified by:
getChildElementXML in class org.jivesoftware.smack.packet.IQ
Returns:
the child element section of the IQ XML. String

setNewerThanTime

public void setNewerThanTime(long newerThanTime)
Sets the value of the "newer-than-time" attribute. The value indicates the time of the oldest unread email to retrieve, in milliseconds since the UNIX epoch (00:00:00 UTC, January 1 1970). When querying for the first time, you should omit this attribute (i.e. not call this method or call it with a -1 value) to return a set of the most recent unread mail. The sever will return only unread mail received after this time. If using this attribute, you should also use newer-than-tid for best results.

Parameters:
newerThanTime - the time of the oldest unread email to retrieve or -1 if the newer-than-time attribute should be omitted.

getNewerThanTime

public long getNewerThanTime()
Returns the value of the "newer-than-time" attribute. The value indicates the time of the oldest unread email to retrieve, in milliseconds since the UNIX epoch (00:00:00 UTC, January 1 1970). When querying for the first time, you should omit this attribute (i.e. not call this method or call it with a -1 value) to return a set of the most recent unread mail. The sever will return only unread mail received after this time. If using this attribute, you should also use newer-than-tid for best results.

Returns:
the time of the oldest unread email to retrieve or -1 if the attribute is to be omitted.

setNewerThanTid

public void setNewerThanTid(long newerThanTid)
Sets the value of the "newer-than-tid" attribute. The value indicates the highest thread number of messages to return, where higher numbers are more recent email threads. The server will return only threads newer than that specified by this attribute. If using this attribute, you should also use newer-than-time for best results. When querying for the first time, you should omit this value.

Parameters:
newerThanTid - the time of the oldest unread email to retrieve or -1 if the newer-than-time attribute should be omitted.

getNewerThanTid

public long getNewerThanTid()
Returns the value of the "newer-than-tid" attribute. The value indicates the highest thread number of messages to return, where higher numbers are more recent email threads. The server will return only threads newer than that specified by this attribute. If using this attribute, you should also use newer-than-time for best results. When querying for the first time, you should omit this value.

Returns:
the time of the oldest unread email to retrieve or -1 if the newer-than-time attribute is to be omitted.

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.