Lines Matching defs:messageId
438 * @param messageId the message to load
441 public void loadMessageForView(final long messageId) {
444 IEmailService service = getServiceForMessage(messageId);
448 Uri uri = ContentUris.withAppendedId(Message.CONTENT_URI, messageId);
453 final long accountId = Account.getAccountIdForMessageId(mProviderContext, messageId);
456 listener.loadMessageForViewCallback(null, accountId, messageId, 100);
463 mLegacyController.loadMessageForView(messageId, mLegacyListener);
564 long messageId = message.mId;
566 accountId = lookupAccountForMessage(messageId);
571 Email.log("no account found for message " + messageId);
582 Uri uri = ContentUris.withAppendedId(Message.CONTENT_URI, messageId);
717 * @param messageId the id of message
718 * @return the accountId corresponding to the given messageId, or -1 if not found.
720 private long lookupAccountForMessage(long messageId) {
724 new String[] { Long.toString(messageId) }, null);
747 public void deleteMessage(final long messageId) {
750 deleteMessageSync(messageId);
764 for (long messageId: messageIds) {
765 deleteMessageSync(messageId);
778 * @param messageId The id of the message to "delete".
780 /* package */ void deleteMessageSync(long messageId) {
782 Account account = Account.getAccountForMessageId(mProviderContext, messageId);
790 Mailbox mailbox = Mailbox.getMailboxForMessageId(mProviderContext, messageId);
796 messageId);
799 messageId);
843 for (long messageId : messageIds) {
845 EmailContent.Message.SYNCED_CONTENT_URI, messageId);
859 * @param messageId the message to update
862 public void setMessageReadSync(long messageId, boolean isRead) {
863 setMessageBooleanSync(messageId, EmailContent.MessageColumns.FLAG_READ, isRead);
869 * @param messageId the message to update
873 public EmailAsyncTask<Void, Void, Void> setMessageRead(final long messageId,
878 setMessageBooleanSync(messageId, EmailContent.MessageColumns.FLAG_READ, isRead);
885 * @param messageId the message to update
888 private void updateMessageSync(long messageId, ContentValues cv) {
889 Uri uri = ContentUris.withAppendedId(EmailContent.Message.SYNCED_CONTENT_URI, messageId);
893 long accountId = Account.getAccountIdForMessageId(mProviderContext, messageId);
903 * @param messageId the message to update
906 public void setMessageAnsweredOrForwarded(final long messageId,
910 Message msg = Message.restoreMessageWithId(mProviderContext, messageId);
917 updateMessageSync(messageId, cv);
925 * @param messageId the message to update
929 public EmailAsyncTask<Void, Void, Void> setMessageFavorite(final long messageId,
934 setMessageBooleanSync(messageId, EmailContent.MessageColumns.FLAG_FAVORITE,
941 * @param messageId the message to update
944 public void setMessageFavoriteSync(long messageId, boolean isFavorite) {
945 setMessageBooleanSync(messageId, EmailContent.MessageColumns.FLAG_FAVORITE, isFavorite);
951 * @param messageId the message to update
955 private void setMessageBooleanSync(long messageId, String columnName, boolean columnValue) {
958 updateMessageSync(messageId, cv);
1029 * @param messageId the id of the invitation being responded to
1032 public void sendMeetingResponse(final long messageId, final int response) {
1034 IEmailService service = getServiceForMessage(messageId);
1038 service.sendMeetingResponse(messageId, response);
1052 * @param messageId the owner message
1055 public void loadAttachment(final long attachmentId, final long messageId,
1067 listener.loadAttachmentCallback(null, accountId, messageId, attachmentId, 0);
1070 listener.loadAttachmentCallback(null, accountId, messageId, attachmentId, 100);
1085 * @param messageId the message of interest
1088 private IEmailService getServiceForMessage(long messageId) {
1090 Message message = Message.restoreMessageWithId(mProviderContext, messageId);
1269 * @param messageId the message which contains the attachment
1273 long messageId, int progress) {
1280 * @param messageId the message which contains the attachment
1285 long messageId, long attachmentId, int progress) {
1312 * result == null, messageId == -1, progress == 0: start batch send
1316 * result == null, messageId == xx, progress == 0: start sending one message
1317 * result == xxxx, messageId == xx, progress == 0; failed sending one message
1320 * result == null, messageId == -1, progres == 100; finish sending batch
1329 * @param messageId The being sent (may be unknown at start)
1333 long messageId, int progress) {
1346 public MessageRetrievalListenerBridge(long messageId, long attachmentId) {
1347 mMessageId = messageId;
1456 public void loadMessageForViewStarted(long messageId) {
1457 final long accountId = Account.getAccountIdForMessageId(mProviderContext, messageId);
1460 listener.loadMessageForViewCallback(null, accountId, messageId, 0);
1466 public void loadMessageForViewFinished(long messageId) {
1467 final long accountId = Account.getAccountIdForMessageId(mProviderContext, messageId);
1470 listener.loadMessageForViewCallback(null, accountId, messageId, 100);
1476 public void loadMessageForViewFailed(long messageId, String message) {
1477 final long accountId = Account.getAccountIdForMessageId(mProviderContext, messageId);
1481 accountId, messageId, 0);
1487 public void loadAttachmentStarted(long accountId, long messageId, long attachmentId,
1490 mCallbackProxy.loadAttachmentStatus(messageId, attachmentId,
1496 listener.loadAttachmentCallback(null, accountId, messageId, attachmentId, 0);
1502 public void loadAttachmentFinished(long accountId, long messageId, long attachmentId) {
1504 mCallbackProxy.loadAttachmentStatus(messageId, attachmentId,
1510 listener.loadAttachmentCallback(null, accountId, messageId, attachmentId, 100);
1516 public void loadAttachmentFailed(long accountId, long messageId, long attachmentId,
1526 mCallbackProxy.loadAttachmentStatus(messageId, attachmentId, status, 0);
1538 listener.loadAttachmentCallback(background ? null : me, accountId, messageId,
1545 synchronized public void sendPendingMessagesStarted(long accountId, long messageId) {
1548 listener.sendMailCallback(null, accountId, messageId, 0);
1563 synchronized public void sendPendingMessagesFailed(long accountId, long messageId,
1573 listener.sendMailCallback(me, accountId, messageId, 0);
1586 public void loadAttachmentStatus(long messageId, long attachmentId, int statusCode,
1604 final long accountId = Account.getAccountIdForMessageId(mProviderContext, messageId);
1607 listener.loadAttachmentCallback(result, accountId, messageId, attachmentId,
1619 public void sendMessageStatus(long messageId, String subject, int statusCode,
1636 listener.sendMailCallback(result, accountId, messageId, progress);
1724 public void loadMessageStatus(long messageId, int statusCode, int progress)
1760 public void loadAttachmentStatus(final long messageId, final long attachmentId,
1765 cb.loadAttachmentStatus(messageId, attachmentId, status, progress);
1771 public void sendMessageStatus(long messageId, String subject, int statusCode, int progress){
1783 public void loadMessageStatus(long messageId, int statusCode, int progress)
1857 public void sendMeetingResponse(long messageId, int response) {
1860 public void loadMore(long messageId) {