Skip to content

Commit

Permalink
Added Pop3Client.GetStream() to allow downloading raw streams
Browse files Browse the repository at this point in the history
Fixes issue #198
  • Loading branch information
jstedfast committed May 29, 2015
1 parent 513abe6 commit eebfb26
Show file tree
Hide file tree
Showing 6 changed files with 796 additions and 98 deletions.
25 changes: 25 additions & 0 deletions MailKit/IMailSpool.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
//

using System;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
using System.Collections.Generic;
Expand Down Expand Up @@ -431,6 +432,30 @@ public interface IMailSpool : IMailService, IEnumerable<MimeMessage>
/// <param name="cancellationToken">The cancellation token.</param>
Task<IList<MimeMessage>> GetMessagesAsync (int startIndex, int count, CancellationToken cancellationToken = default (CancellationToken));

/// <summary>
/// Get the message or header stream at the specified index.
/// </summary>
/// <remarks>
/// Gets the message or header stream at the specified index.
/// </remarks>
/// <returns>The message or header stream.</returns>
/// <param name="index">The index of the message.</param>
/// <param name="headersOnly"><c>true</c> if only the headers should be retrieved; otherwise, <c>false</c>.</param>
/// <param name="cancellationToken">The cancellation token.</param>
Stream GetStream (int index, bool headersOnly, CancellationToken cancellationToken = default (CancellationToken));

/// <summary>
/// Asynchronously get the message or header stream at the specified index.
/// </summary>
/// <remarks>
/// Asynchronously gets the message or header stream at the specified index.
/// </remarks>
/// <returns>The message or header stream.</returns>
/// <param name="index">The index of the message.</param>
/// <param name="headersOnly"><c>true</c> if only the headers should be retrieved; otherwise, <c>false</c>.</param>
/// <param name="cancellationToken">The cancellation token.</param>
Task<Stream> GetStreamAsync (int index, bool headersOnly, CancellationToken cancellationToken = default (CancellationToken));

/// <summary>
/// Mark the specified message for deletion.
/// </summary>
Expand Down
Loading

0 comments on commit eebfb26

Please sign in to comment.