Home | History | Annotate | Download | only in email

Lines Matching refs:accountId

152     public void updateMailboxList(final long accountId, final Result callback) {
154 IEmailService service = getServiceForAccount(accountId);
158 service.updateFolderList(accountId);
169 mLegacyController.listFolders(accountId, mLegacyListener);
181 public void serviceCheckMail(final long accountId, final long mailboxId, final long tag,
183 IEmailService service = getServiceForAccount(accountId);
190 callback.serviceCheckMailCallback(null, accountId, mailboxId, 100, tag);
201 mLegacyController.checkMail(accountId, tag, mLegacyListener);
214 public void updateMailbox(final long accountId, final long mailboxId, final Result callback) {
216 IEmailService service = getServiceForAccount(accountId);
233 EmailContent.Account.restoreAccountWithId(mProviderContext, accountId);
292 long accountId = message.mAccountKey;
293 long mailboxId = findOrCreateMailboxOfType(accountId, mailboxType);
299 * @param accountId the account id
302 * Returns Mailbox.NO_MAILBOX if the accountId or mailboxType are negative.
305 public long findOrCreateMailboxOfType(long accountId, int mailboxType) {
306 if (accountId < 0 || mailboxType < 0) {
310 Mailbox.findMailboxOfType(mProviderContext, accountId, mailboxType);
311 return mailboxId == Mailbox.NO_MAILBOX ? createMailbox(accountId, mailboxType) : mailboxId;
349 /* package */ long createMailbox(long accountId, int mailboxType) {
350 if (accountId < 0 || mailboxType < 0) {
351 String mes = "Invalid arguments " + accountId + ' ' + mailboxType;
356 box.mAccountKey = accountId;
372 public void sendMessage(long messageId, long accountId) {
374 if (accountId == -1) {
375 accountId = lookupAccountForMessage(messageId);
377 if (accountId == -1) {
386 long outboxId = findOrCreateMailboxOfType(accountId, Mailbox.TYPE_OUTBOX);
407 EmailContent.Account.restoreAccountWithId(mProviderContext, accountId);
411 final long sentboxId = findOrCreateMailboxOfType(accountId, Mailbox.TYPE_SENT);
424 * @param accountId the account for which to send messages (-1 for all accounts)
427 public void sendPendingMessages(long accountId, Result callback) {
430 Mailbox.findMailboxOfType(mProviderContext, accountId, Mailbox.TYPE_OUTBOX);
436 IEmailService service = getServiceForAccount(accountId);
449 EmailContent.Account.restoreAccountWithId(mProviderContext, accountId);
453 final long sentboxId = findOrCreateMailboxOfType(accountId, Mailbox.TYPE_SENT);
481 long accountId = c.getLong(Account.ID_PROJECTION_COLUMN);
482 Account account = Account.restoreAccountWithId(mProviderContext, accountId);
492 new String[] { Long.toString(accountId) });
544 * @return the accountId corresponding to the given messageId, or -1 if not found.
577 * @param accountId The id of the message's account, or -1 if not known by caller
583 public void deleteMessage(long messageId, long accountId) {
587 if (accountId == -1) {
588 accountId = lookupAccountForMessage(messageId);
590 if (accountId == -1) {
595 long trashMailboxId = findOrCreateMailboxOfType(accountId, Mailbox.TYPE_TRASH);
611 AttachmentProvider.deleteAllAttachmentFiles(mProviderContext, accountId, messageId);
627 Account account = Account.restoreAccountWithId(mProviderContext, accountId);
632 final long syncAccountId = accountId;
740 * @param accountId the owner account
744 final long accountId, final Result callback) {
747 accountId, attachmentId);
769 AttachmentProvider.getAttachmentUri(accountId, attachmentId).toString());
780 mLegacyController.loadAttachment(accountId, messageId, mailboxId, attachmentId,
807 * @param accountId the message of interest
810 private IEmailService getServiceForAccount(long accountId) {
812 Account account = EmailContent.Account.restoreAccountWithId(mProviderContext, accountId);
823 * TODO this should not require a full account, just an accountId
849 * @param accountId The account being operated on
852 public void updateMailboxListCallback(MessagingException result, long accountId,
860 * @param accountId The account being operated on
865 public void updateMailboxCallback(MessagingException result, long accountId,
895 * @param accountId The account being operated on
900 public void serviceCheckMailCallback(MessagingException result, long accountId,
908 * @param accountId The account being operated on
912 public void sendMailCallback(MessagingException result, long accountId,
923 public void listFoldersStarted(long accountId) {
926 l.updateMailboxListCallback(null, accountId, 0);
932 public void listFoldersFailed(long accountId, String message) {
935 l.updateMailboxListCallback(new MessagingException(message), accountId, 0);
941 public void listFoldersFinished(long accountId) {
944 l.updateMailboxListCallback(null, accountId, 100);
950 public void synchronizeMailboxStarted(long accountId, long mailboxId) {
953 l.updateMailboxCallback(null, accountId, mailboxId, 0, 0);
959 public void synchronizeMailboxFinished(long accountId, long mailboxId,
963 l.updateMailboxCallback(null, accountId, mailboxId, 100, numNewMessages);
969 public void synchronizeMailboxFailed(long accountId, long mailboxId, Exception e) {
978 l.updateMailboxCallback(me, accountId, mailboxId, 0, 0);
984 public void checkMailStarted(Context context, long accountId, long tag) {
987 l.serviceCheckMailCallback(null, accountId, -1, 0, tag);
993 public void checkMailFinished(Context context, long accountId, long folderId, long tag) {
996 l.serviceCheckMailCallback(null, accountId, folderId, 100, tag);
1030 public void loadAttachmentStarted(long accountId, long messageId, long attachmentId,
1040 public void loadAttachmentFinished(long accountId, long messageId, long attachmentId) {
1049 public void loadAttachmentFailed(long accountId, long messageId, long attachmentId,
1060 synchronized public void sendPendingMessagesStarted(long accountId, long messageId) {
1063 listener.sendMailCallback(null, accountId, messageId, 0);
1069 synchronized public void sendPendingMessagesCompleted(long accountId) {
1072 listener.sendMailCallback(null, accountId, -1, 100);
1078 synchronized public void sendPendingMessagesFailed(long accountId, long messageId,
1088 listener.sendMailCallback(me, accountId, messageId, 0);
1137 long accountId = -1; // This should be in the callback
1154 listener.sendMailCallback(result, accountId, messageId, progress);
1159 public void syncMailboxListStatus(long accountId, int statusCode, int progress) {
1174 listener.updateMailboxListCallback(result, accountId, progress);
1198 long accountId = mbx.mAccountKey;
1201 listener.updateMailboxCallback(result, accountId, mailboxId, progress, 0);