Home | History | Annotate | Download | only in email

Lines Matching refs:accountId

273     public Mailbox getSearchMailbox(long accountId) {
274 Mailbox m = Mailbox.restoreMailboxOfType(mContext, accountId, Mailbox.TYPE_SEARCH);
277 m.mAccountKey = accountId;
342 public void updateMailboxList(final long accountId) {
346 final IEmailService service = getServiceForAccount(accountId);
350 service.updateFolderList(accountId);
358 mLegacyController.listFolders(accountId, mLegacyListener);
370 public void serviceCheckMail(final long accountId, final long mailboxId, final long tag) {
371 IEmailService service = getServiceForAccount(accountId);
378 mLegacyListener.checkMailFinished(mContext, accountId, mailboxId, tag);
388 accountId, tag, mLegacyListener);
401 public void updateMailbox(final long accountId, final long mailboxId, boolean userRequest) {
403 IEmailService service = getServiceForAccount(accountId);
418 Account.restoreAccountWithId(mProviderContext, accountId);
453 final long accountId = Account.getAccountIdForMessageId(mProviderContext, messageId);
456 listener.loadMessageForViewCallback(null, accountId, messageId, 100);
478 long accountId = message.mAccountKey;
479 long mailboxId = findOrCreateMailboxOfType(accountId, mailboxType);
490 * @param accountId the account id
493 * Returns Mailbox.NO_MAILBOX if the accountId or mailboxType are negative.
496 public synchronized long findOrCreateMailboxOfType(long accountId, int mailboxType) {
497 if (accountId < 0 || mailboxType < 0) {
501 Mailbox.findMailboxOfType(mProviderContext, accountId, mailboxType);
502 return mailboxId == Mailbox.NO_MAILBOX ? createMailbox(accountId, mailboxType) : mailboxId;
540 long createMailbox(long accountId, int mailboxType) {
541 if (accountId < 0 || mailboxType < 0) {
542 String mes = "Invalid arguments " + accountId + ' ' + mailboxType;
547 accountId, mailboxType, getMailboxServerName(mContext, mailboxType));
563 long accountId = message.mAccountKey;
565 if (accountId == Account.NO_ACCOUNT) {
566 accountId = lookupAccountForMessage(messageId);
568 if (accountId == Account.NO_ACCOUNT) {
577 long outboxId = findOrCreateMailboxOfType(accountId, Mailbox.TYPE_OUTBOX);
593 sendPendingMessages(accountId);
596 private void sendPendingMessagesSmtp(long accountId) {
599 Account.restoreAccountWithId(mProviderContext, accountId);
603 final long sentboxId = findOrCreateMailboxOfType(accountId, Mailbox.TYPE_SENT);
614 * @param accountId the account for which to send messages
616 public void sendPendingMessages(long accountId) {
619 Mailbox.findMailboxOfType(mProviderContext, accountId, Mailbox.TYPE_OUTBOX);
625 IEmailService service = getServiceForAccount(accountId);
637 sendPendingMessagesSmtp(accountId);
658 long accountId = c.getLong(Account.ID_PROJECTION_COLUMN);
659 String protocol = Account.getProtocol(mProviderContext, accountId);
665 new String[] { Long.toString(accountId) });
718 * @return the accountId corresponding to the given messageId, or -1 if not found.
893 long accountId = Account.getAccountIdForMessageId(mProviderContext, messageId);
894 if (accountId == Account.NO_ACCOUNT) return;
895 if (isMessagingController(accountId)) {
896 mLegacyController.processPendingActions(accountId);
965 public void searchMore(long accountId) throws MessagingException {
966 SearchParams params = sSearchParamsMap.get(accountId);
969 searchMessages(accountId, params);
974 * @param accountId the id of the account to be searched
978 public int searchMessages(final long accountId, final SearchParams searchParams)
981 Mailbox searchMailbox = getSearchMailbox(accountId);
985 sSearchParamsMap.put(accountId, searchParams);
999 IEmailService service = getServiceForAccount(accountId);
1003 return service.searchMessages(accountId, searchParams, searchMailboxId);
1022 return mLegacyController.searchMailbox(accountId, searchParams, searchMailboxId);
1053 * @param accountId the owner account
1056 final long accountId) {
1067 listener.loadAttachmentCallback(null, accountId, messageId, attachmentId, 0);
1070 listener.loadAttachmentCallback(null, accountId, messageId, attachmentId, 100);
1100 * @param accountId the message of interest
1103 private IEmailService getServiceForAccount(long accountId) {
1104 if (isMessagingController(accountId)) return null;
1120 public boolean isMessagingController(long accountId) {
1121 Boolean isLegacyController = mLegacyControllerMap.get(accountId);
1123 String protocol = Account.getProtocol(mProviderContext, accountId);
1125 mLegacyControllerMap.put(accountId, isLegacyController);
1133 public void deleteAccount(final long accountId) {
1137 deleteAccountSync(accountId, mProviderContext);
1145 public void deleteAccountSync(long accountId, Context context) {
1147 mLegacyControllerMap.remove(accountId);
1149 final Account account = Account.restoreAccountWithId(context, accountId);
1155 deleteSyncedDataSync(accountId);
1158 Uri uri = ContentUris.withAppendedId(Account.CONTENT_URI, accountId);
1187 * @param accountId The account to wipe.
1189 public void deleteSyncedDataSync(long accountId) {
1193 accountId);
1199 String[] accountIdArgs = new String[] { Long.toString(accountId) };
1215 IEmailService service = getServiceForAccount(accountId);
1217 service.deleteAccountPIMData(accountId);
1244 * @param accountId The account being operated on
1247 public void updateMailboxListCallback(MessagingException result, long accountId,
1256 * @param accountId The account being operated on
1261 public void updateMailboxCallback(MessagingException result, long accountId,
1272 public void loadMessageForViewCallback(MessagingException result, long accountId,
1284 public void loadAttachmentCallback(MessagingException result, long accountId,
1294 * @param accountId The account being operated on
1299 public void serviceCheckMailCallback(MessagingException result, long accountId,
1325 * - accountId is always -1.
1328 * @param accountId The account being operated on
1332 public void sendMailCallback(MessagingException result, long accountId,
1376 public void listFoldersStarted(long accountId) {
1379 l.updateMailboxListCallback(null, accountId, 0);
1385 public void listFoldersFailed(long accountId, String message) {
1388 l.updateMailboxListCallback(new MessagingException(message), accountId, 0);
1394 public void listFoldersFinished(long accountId) {
1397 l.updateMailboxListCallback(null, accountId, 100);
1403 public void synchronizeMailboxStarted(long accountId, long mailboxId) {
1406 l.updateMailboxCallback(null, accountId, mailboxId, 0, 0, null);
1412 public void synchronizeMailboxFinished(long accountId, long mailboxId,
1416 l.updateMailboxCallback(null, accountId, mailboxId, 100, numNewMessages,
1423 public void synchronizeMailboxFailed(long accountId, long mailboxId, Exception e) {
1432 l.updateMailboxCallback(me, accountId, mailboxId, 0, 0, null);
1438 public void checkMailStarted(Context context, long accountId, long tag) {
1441 l.serviceCheckMailCallback(null, accountId, -1, 0, tag);
1447 public void checkMailFinished(Context context, long accountId, long folderId, long tag) {
1450 l.serviceCheckMailCallback(null, accountId, folderId, 100, tag);
1457 final long accountId = Account.getAccountIdForMessageId(mProviderContext, messageId);
1460 listener.loadMessageForViewCallback(null, accountId, messageId, 0);
1467 final long accountId = Account.getAccountIdForMessageId(mProviderContext, messageId);
1470 listener.loadMessageForViewCallback(null, accountId, messageId, 100);
1477 final long accountId = Account.getAccountIdForMessageId(mProviderContext, messageId);
1481 accountId, messageId, 0);
1487 public void loadAttachmentStarted(long accountId, long messageId, long attachmentId,
1496 listener.loadAttachmentCallback(null, accountId, messageId, attachmentId, 0);
1502 public void loadAttachmentFinished(long accountId, long messageId, long attachmentId) {
1510 listener.loadAttachmentCallback(null, accountId, messageId, attachmentId, 100);
1516 public void loadAttachmentFailed(long accountId, long messageId, long attachmentId,
1538 listener.loadAttachmentCallback(background ? null : me, accountId, messageId,
1545 synchronized public void sendPendingMessagesStarted(long accountId, long messageId) {
1548 listener.sendMailCallback(null, accountId, messageId, 0);
1554 synchronized public void sendPendingMessagesCompleted(long accountId) {
1557 listener.sendMailCallback(null, accountId, -1, 100);
1563 synchronized public void sendPendingMessagesFailed(long accountId, long messageId,
1573 listener.sendMailCallback(me, accountId, messageId, 0);
1604 final long accountId = Account.getAccountIdForMessageId(mProviderContext, messageId);
1607 listener.loadAttachmentCallback(result, accountId, messageId, attachmentId,
1621 long accountId = -1; // This should be in the callback
1636 listener.sendMailCallback(result, accountId, messageId, progress);
1641 public void syncMailboxListStatus(long accountId, int statusCode, int progress) {
1656 listener.updateMailboxListCallback(result, accountId, progress);
1678 long accountId = mbx.mAccountKey;
1681 listener.updateMailboxCallback(result, accountId, mailboxId, progress, 0, null);
1775 public void syncMailboxListStatus(long accountId, int statusCode, int progress) {
1848 public void updateFolderList(long accountId) {
1851 public void hostChanged(long accountId) {
1864 public boolean createFolder(long accountId, String name) {
1868 public boolean deleteFolder(long accountId, String name) {
1872 public boolean renameFolder(long accountId, String oldName, String newName) {
1880 public void deleteAccountPIMData(long accountId) {
1883 public int searchMessages(long accountId, SearchParams searchParams,
1894 public void sendMail(long accountId) throws RemoteException {