Build 1.0_r1(from source)

android.provider
Class Gmail.ConversationCursor

java.lang.Object
  extended by android.database.ContentObserver
      extended by android.provider.Gmail.MailCursor
          extended by android.provider.Gmail.ConversationCursor
Enclosing class:
Gmail

public static final class Gmail.ConversationCursor
extends Gmail.MailCursor

A cursor over conversations. "Conversation" refers to the information needed to populate a list of conversations, not all of the messages in a conversation.


Field Summary
 
Fields inherited from class android.provider.Gmail.MailCursor
mAccount, mCursor
 
Method Summary
 void becomeActiveNetworkCursor()
          When a conversation cursor is created it becomes the active network cursor, which means that it will fetch results from the network if it needs to in order to show all mail that matches its query.
 long getConversationId()
          Gets the conversation id.
 long getDateMs()
           
 boolean getForceAllUnread()
           
 String getFromSnippetInstructions()
          Returns the instructions for building from snippets.
 Set<Long> getLabelIds()
           
 Set<String> getLabels()
          Deprecated. use getLabelIds
 Set<String> getLabels(String rawLabelIds, Gmail.LabelMap labelMap)
          Returns the set of labels using the raw labels from a previous getRawLabels() as input.
 long getMaxMessageId()
           
 int getNumMessages()
           
 Gmail.PersonalLevel getPersonalLevel()
          Get's the conversation's personal level.
 String getRawLabelIds()
           
 String getSnippet()
          Gets the conversation's snippet.
 Gmail.CursorStatus getStatus()
           
 String getSubject()
          Gets the conversation's subject.
 boolean hasAttachments()
           
 boolean hasMessagesWithErrors()
           
protected  void onCursorPositionChanged()
          Called whenever mCursor is changed to point to a different row.
 void retry()
          Retry a network request after errors.
 
Methods inherited from class android.provider.Gmail.MailCursor
checkCursor, checkThread, count, deliverSelfNotifications, getAccount, getCursor, getStringInColumn, getUpdateValues, moveTo, next, onChange, position, registerContentObserver, registerDataSetObserver, registerObserver, release, unregisterContentObserver, unregisterDataSetObserver, unregisterObserver
 
Methods inherited from class android.database.ContentObserver
dispatchChange, getContentObserver, releaseContentObserver
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

onCursorPositionChanged

protected void onCursorPositionChanged()
Description copied from class: Gmail.MailCursor
Called whenever mCursor is changed to point to a different row. Subclasses should override this if they need to clear out state when this happens. Subclasses must call the inherited version if they override this.

Overrides:
onCursorPositionChanged in class Gmail.MailCursor

getStatus

public Gmail.CursorStatus getStatus()

retry

public void retry()
Retry a network request after errors.


becomeActiveNetworkCursor

public void becomeActiveNetworkCursor()
When a conversation cursor is created it becomes the active network cursor, which means that it will fetch results from the network if it needs to in order to show all mail that matches its query. If you later want to requery an older cursor and would like that cursor to be the active cursor you need to call this method before requerying.


getConversationId

public long getConversationId()
Gets the conversation id. This must be immutable. (For example, with GMail this should be the original conversation id rather than the default notion of converation id.)

Returns:
the conversation id

getFromSnippetInstructions

public String getFromSnippetInstructions()
Returns the instructions for building from snippets. Pass this to getFromSnippetHtml in order to actually build the snippets.

Returns:
snippet instructions for use by getFromSnippetHtml()

getSubject

public String getSubject()
Gets the conversation's subject.

Returns:
the subject

getSnippet

public String getSnippet()
Gets the conversation's snippet.

Returns:
the snippet

getPersonalLevel

public Gmail.PersonalLevel getPersonalLevel()
Get's the conversation's personal level.

Returns:
the personal level.

getLabels

public Set<String> getLabels()
Deprecated. use getLabelIds

Returns:
a copy of the set of labels. To add or remove labels call MessageCursor.addOrRemoveLabel on each message in the conversation.

getLabelIds

public Set<Long> getLabelIds()
Returns:
a copy of the set of labels. To add or remove labels call MessageCursor.addOrRemoveLabel on each message in the conversation.

getLabels

public Set<String> getLabels(String rawLabelIds,
                             Gmail.LabelMap labelMap)
Returns the set of labels using the raw labels from a previous getRawLabels() as input.

Returns:
a copy of the set of labels. To add or remove labels call MessageCursor.addOrRemoveLabel on each message in the conversation.

getRawLabelIds

public String getRawLabelIds()
Returns:
a joined string of labels separated by spaces. Use getLabels(rawLabels) to convert this to a Set of labels.

getNumMessages

public int getNumMessages()
Returns:
the number of messages in the conversation

getMaxMessageId

public long getMaxMessageId()
Returns:
the max message id in the conversation

getDateMs

public long getDateMs()

hasAttachments

public boolean hasAttachments()

hasMessagesWithErrors

public boolean hasMessagesWithErrors()

getForceAllUnread

public boolean getForceAllUnread()

Build 1.0_r1(from source)

Please submit a feedback, bug or feature