Lines Matching defs:Mailbox

34 public class Mailbox extends EmailContent implements SyncColumns, MailboxColumns, Parcelable {
35 public static final String TABLE_NAME = "Mailbox";
124 // Sentinel values for the mSyncInterval field of both Mailbox records
130 // Push-Hold indicates an EAS push or ping Mailbox shouldn't sync just yet
139 public static final Integer[] INVALID_DROP_TARGETS = new Integer[] {Mailbox.TYPE_DRAFTS,
140 Mailbox.TYPE_OUTBOX, Mailbox.TYPE_SENT};
143 MailboxColumns.TYPE + "<" + Mailbox.TYPE_NOT_EMAIL +
210 public Mailbox() {
215 * Restore a Mailbox from the database, given its unique id
218 * @return the instantiated Mailbox
220 public static Mailbox restoreMailboxWithId(Context context, long id) {
221 return EmailContent.restoreContentWithId(context, Mailbox.class,
222 Mailbox.CONTENT_URI, Mailbox.CONTENT_PROJECTION, id);
231 public static Mailbox newSystemMailbox(long accountId, int mailboxType, String name) {
232 if (mailboxType == Mailbox.TYPE_MAIL) {
235 Mailbox box = new Mailbox();
241 box.mParentKey = Mailbox.NO_MAILBOX;
242 box.mFlags = Mailbox.FLAG_HOLDS_MAIL;
247 * Returns a Mailbox from the database, given its pathname and account id. All mailbox
254 public static Mailbox restoreMailboxForPath(Context context, long accountId, String path) {
256 Mailbox.CONTENT_URI,
257 Mailbox.CONTENT_PROJECTION,
258 Mailbox.PATH_AND_ACCOUNT_SELECTION,
263 Mailbox mailbox = null;
265 mailbox = getContent(c, Mailbox.class);
279 * Returns a {@link Mailbox} for the given path. If the path is not in the database, a new
282 public static Mailbox getMailboxForPath(Context context, long accountId, String path) {
283 Mailbox mailbox = restoreMailboxForPath(context, accountId, path);
285 mailbox = new Mailbox();
337 * Convenience method to return the id of a given type of Mailbox for a given Account; the
338 * common Mailbox types (Inbox, Outbox, Sent, Drafts, Trash, and Search) are all cached by
366 return Utility.getFirstRowLong(context, Mailbox.CONTENT_URI,
374 public static Mailbox restoreMailboxOfType(Context context, long accountId, int type) {
376 if (mailboxId != Mailbox.NO_MAILBOX) {
377 return Mailbox.restoreMailboxWithId(context, mailboxId);
384 return Utility.getFirstRowInt(context, Mailbox.CONTENT_URI,
392 return Utility.getFirstRowInt(context, Mailbox.CONTENT_URI,
399 return Utility.getFirstRowInt(context, Mailbox.CONTENT_URI,
411 public static Mailbox getMailboxForMessageId(Context context, long messageId) {
415 return Mailbox.restoreMailboxWithId(context, mailboxId);
424 Uri url = ContentUris.withAppendedId(Mailbox.CONTENT_URI, mailboxId);
433 Uri url = ContentUris.withAppendedId(Mailbox.CONTENT_URI, mailboxId);
476 return mType != Mailbox.TYPE_DRAFTS
477 && mType != Mailbox.TYPE_OUTBOX
478 && mType != Mailbox.TYPE_SEARCH
479 && mType < Mailbox.TYPE_NOT_SYNCABLE;
484 return mType != Mailbox.TYPE_DRAFTS
485 && mType != Mailbox.TYPE_OUTBOX
486 && mType != Mailbox.TYPE_SEARCH;
578 public Mailbox(Parcel in) {
600 public static final Parcelable.Creator<Mailbox> CREATOR = new Parcelable.Creator<Mailbox>() {
602 public Mailbox createFromParcel(Parcel source) {
603 return new Mailbox(source);
607 public Mailbox[] newArray(int size) {
608 return new Mailbox[size];