Home | History | Annotate | Download | only in transport

Lines Matching refs:attachment

29 import com.android.emailcommon.provider.EmailContent.Attachment;
134 * Test: Open and send a single message with an empty attachment (no file) (sunny day)
146 // Creates an attachment with a bogus file (so we get headers only)
147 Attachment attachment = setupSimpleAttachment(mProviderContext, message.mId);
148 attachment.save(mProviderContext);
154 expectSimpleAttachment(mockTransport, attachment);
192 * Prepare to send a simple attachment
194 private Attachment setupSimpleAttachment(Context context, long messageId) {
195 Attachment attachment = new Attachment();
196 attachment.mFileName = "the file.jpg";
197 attachment.mMimeType = "image/jpg";
198 attachment.mSize = 0;
199 attachment.mContentId = null;
200 attachment.setContentUri("content://com.android.email/1/1");
201 attachment.mMessageKey = messageId;
202 attachment.mLocation = null;
203 attachment.mEncoding = null;
205 return attachment;
209 * Prepare to receive a simple attachment (note, no multipart support here)
211 private void expectSimpleAttachment(MockTransport mockTransport, Attachment attachment) {
212 mockTransport.expect("Content-Type: " + attachment.mMimeType + ";");
213 mockTransport.expect(" name=\"" + attachment.mFileName + "\"");
215 mockTransport.expect("Content-Disposition: attachment;");
216 mockTransport.expect(" filename=\"" + attachment.mFileName + "\";");
217 mockTransport.expect(" size=" + Long.toString(attachment.mSize));
219 String attachmentContentUri = attachment.getContentUri();