Build 1.0_r1(from source)

android.provider
Class Gmail.LabelMap

java.lang.Object
  extended by java.util.Observable
      extended by android.provider.Gmail.LabelMap
Enclosing class:
Gmail

public static final class Gmail.LabelMap
extends Observable

This is a map of labels. TODO: make it observable.


Constructor Summary
Gmail.LabelMap(ContentResolver contentResolver, String account, boolean keepUpdated)
           
Gmail.LabelMap(Cursor cursor, boolean keepUpdated)
           
 
Method Summary
 void close()
           
 String getCanonicalName(long labelId)
           
static Set<String> getForcedIncludedLabels()
           
static Set<String> getForcedIncludedOrPartialLabels()
           
static Set<String> getForcedUnsyncedLabels()
           
 long getLabelId(String canonicalName)
          Deprecated. this is only needed because most of the UI uses label names instead of ids
 long getLabelIdCached()
           
 long getLabelIdChat()
           
 long getLabelIdDraft()
           
 long getLabelIdInbox()
           
 long getLabelIdOutbox()
           
 long getLabelIdSent()
           
 long getLabelIdSpam()
           
 long getLabelIdStarred()
           
 long getLabelIdTrash()
           
 long getLabelIdUnread()
           
 long getLabelIdVoicemail()
           
 long getLabelIdVoicemailInbox()
           
 String getName(long labelId)
           
 int getNumConversations(long labelId)
          Returns the number of conversation with a given label.
 int getNumConversations(String label)
          Deprecated.  
 int getNumUnreadConversations(long labelId)
          Returns the number of unread conversation with a given label.
 int getNumUnreadConversations(String label)
          Deprecated.  
 SortedSet<String> getSortedUserLabels()
          Returns the list of user-defined labels in alphabetical order.
static List<String> getSortedUserMeaningfulSystemLabels()
           
 boolean hasLabel(long labelId)
           
 boolean labelsSynced()
           
 void requery()
          Force the map to requery.
 
Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Gmail.LabelMap

public Gmail.LabelMap(ContentResolver contentResolver,
                      String account,
                      boolean keepUpdated)

Gmail.LabelMap

public Gmail.LabelMap(Cursor cursor,
                      boolean keepUpdated)
Method Detail

labelsSynced

public boolean labelsSynced()
Returns:
whether at least some labels have been synced.

getLabelIdSent

public long getLabelIdSent()

getLabelIdInbox

public long getLabelIdInbox()

getLabelIdDraft

public long getLabelIdDraft()

getLabelIdUnread

public long getLabelIdUnread()

getLabelIdTrash

public long getLabelIdTrash()

getLabelIdSpam

public long getLabelIdSpam()

getLabelIdStarred

public long getLabelIdStarred()

getLabelIdChat

public long getLabelIdChat()

getLabelIdVoicemail

public long getLabelIdVoicemail()

getLabelIdVoicemailInbox

public long getLabelIdVoicemailInbox()

getLabelIdCached

public long getLabelIdCached()

getLabelIdOutbox

public long getLabelIdOutbox()

getSortedUserLabels

public SortedSet<String> getSortedUserLabels()
Returns the list of user-defined labels in alphabetical order.


getSortedUserMeaningfulSystemLabels

public static List<String> getSortedUserMeaningfulSystemLabels()

getForcedIncludedLabels

public static Set<String> getForcedIncludedLabels()

getForcedIncludedOrPartialLabels

public static Set<String> getForcedIncludedOrPartialLabels()

getForcedUnsyncedLabels

public static Set<String> getForcedUnsyncedLabels()

getNumConversations

public int getNumConversations(String label)
Deprecated. 

Returns the number of conversation with a given label.


getNumConversations

public int getNumConversations(long labelId)
Returns the number of conversation with a given label.


getNumUnreadConversations

public int getNumUnreadConversations(String label)
Deprecated. 

Returns the number of unread conversation with a given label.


getNumUnreadConversations

public int getNumUnreadConversations(long labelId)
Returns the number of unread conversation with a given label.


getCanonicalName

public String getCanonicalName(long labelId)
Returns:
the canonical name for a label

getName

public String getName(long labelId)
Returns:
the human name for a label

hasLabel

public boolean hasLabel(long labelId)
Returns:
whether a given label is known

getLabelId

public long getLabelId(String canonicalName)
Deprecated. this is only needed because most of the UI uses label names instead of ids

Returns:
returns the id of a label given the canonical name

requery

public void requery()
Force the map to requery. This should not be necessary outside tests.


close

public void close()

Build 1.0_r1(from source)

Please submit a feedback, bug or feature