Home | History | Annotate | Download | only in mail

Lines Matching refs:Store

23 import com.android.email.mail.store.ImapStore;
24 import com.android.email.mail.store.Pop3Store;
25 import com.android.email.mail.store.ServiceStore;
41 * Store is the legacy equivalent of the Account class
43 public abstract class Store {
45 * A global suggestion to Store implementors on how much of the body
51 static final HashMap<HostAuth, Store> sStores = new HashMap<HostAuth, Store>();
58 static final HashMap<String, Class<? extends Store>> sStoreClasses =
59 new HashMap<String, Class<? extends Store>>();
65 static Store newInstance(Account account) throws MessagingException {
66 throw new MessagingException("Store#newInstance: Unknown scheme in "
71 * Get an instance of a mail store for the given account. The account must be valid (i.e. has
74 * NOTE: The internal algorithm used to find a cached store depends upon the account's
79 * @param account The account of the store.
81 * @return an initialized store of the appropriate class
82 * @throws MessagingException If the store cannot be obtained or if the account is invalid.
84 public synchronized static Store getInstance(Account account, Context context)
94 Store store = sStores.get(hostAuth);
95 if (store == null) {
96 store = createInstanceInternal(account, context, true);
99 store.mAccount = account;
101 return store;
107 private synchronized static Store createInstanceInternal(final Account account,
112 Class<? extends Store> klass = sStoreClasses.get(hostAuth.mProtocol);
116 final Store store;
120 store = (Store)m.invoke(null, account, appContext);
125 throw new MessagingException("Can't instantiate Store for " + account.mDisplayName);
129 sStores.put(hostAuth, store);
131 return store;
135 * Delete the mail store associated with the given account. The account must be valid (i.e. has
138 * The store should have been notified already by calling delete(), and the caller should
141 * @throws MessagingException If the store cannot be removed or if the account is invalid.
143 public synchronized static Store removeInstance(Account account, Context context)
151 * allows a given store to indicate which mode(s) it supports.
152 * @return true if the store requires an upload into "sent", false if this happens automatically
160 * Some protocols allow for syncing of folder types other than inbox. The store for any such