Object

spinoco.fs2.mail.imap.IMAPClient

impl

Related Doc: package IMAPClient

Permalink

object impl

Source
IMAPClient.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. impl
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. final case class IMAPBytes(data: ByteVector) extends IMAPData with Product with Serializable

    Permalink

    Streamed data content, that was created as replacement for {sz}\r\n macro containing all content.

    Streamed data content, that was created as replacement for {sz}\r\n macro containing all content. Note that this may emit more bytes as they come in, where the data size will never exceed size of sz in macro nor the max size of chunk as defined by underlying TCP socket.

  2. sealed trait IMAPData extends AnyRef

    Permalink

    Helps to abstract over the results received from IMAP protocol.

    Helps to abstract over the results received from IMAP protocol.

    Essentially solves the situation of resolving {sz}\r\n pattern, where this pattern has to be replaced by sz of bytes in various formats and encodings (i.e. MIME)

  3. final case class IMAPText(s: String) extends IMAPData with Product with Serializable

    Permalink

    text, that is known to be represented by characters.

    text, that is known to be represented by characters. It may be whole line terminated by crlf ( in that case s is w/o crlf) *

  4. type RequestResult[F[_]] = Stream[F, Either[String, Stream[F, IMAPData]]]

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def bytesOfSegment[F[_]](idx: Int, key: String): Pipe[F, (Int, String, IMAPData), Byte]

    Permalink

    For incoming computed data, this will convert to stream of bytes as received.

    For incoming computed data, this will convert to stream of bytes as received. This will strip out any parts where idx and key is different from ones supplied. Also this will strip out any non-binary content

    idx

    Index of result to look for

    key

    Key of the binary segment to receive

  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. def concatLines[F[_]]: Pipe[F, IMAPData, String]

    Permalink

    from the stream of lines build string of string where {sz} expanded segments are returned as ASCII string (not individual lines)*

  8. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  10. def fetchBytesOf[F[_]](contentIdx: Int, contentKey: String, encoding: String): Pipe[F, (Int, String, IMAPData), Byte]

    Permalink

    Causes to transform data from the fetch command to Binary content (Bytes) given the specific contained in pa

    Causes to transform data from the fetch command to Binary content (Bytes) given the specific contained in pa

    This will perfom decoding (i.e. base64 -> bytes) based on the supplied content data, resulting in stream of bytes that contains binary representation of the content .

    contentIdx

    Index of content to take, all other content indexes will be ignored

    contentKey

    Key of the content to retrieve, all other will be ignored

    encoding

    Encoding of the binary format

  11. def fetchLog[F[_]]: Pipe[F, (Int, String, IMAPData), Map[String, Vector[IMAPData]]]

    Permalink

    From any stream of imap data this will strictly collect data for every response in form of Map.

    From any stream of imap data this will strictly collect data for every response in form of Map.

    Note that this strictly collects all data for every result denoted by idx.

  12. def fetchTextOf[F[_]](contentIdx: Int, contentKey: String, encoding: String, charsetName: Option[String])(implicit F: Effect[F]): Pipe[F, (Int, String, IMAPData), Char]

    Permalink

    Causes to perform fetch command for the text of the email body.

    Causes to perform fetch command for the text of the email body. Resulting data are available in text form (strings). The strings may not be whole lines or may contain multiple lines in each string.

    contentIdx

    Index of content to take, all other content indexes will be ignored

    contentKey

    Key of the content to retrieve, all other will be ignored

    encoding

    Encoding of the data

    charsetName

    Name of the charset of the text. If empty, UTF-8 will be used instead

  13. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  14. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  15. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  16. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  17. def lines[F[_]]: Pipe[F, Byte, IMAPData]

    Permalink

    Separates incoming stream based on CRLF (\r\n) separator.

    Separates incoming stream based on CRLF (\r\n) separator. When line contains as last characters chunk macro ({sz}\r\n) then, such macro is expanded to IMAPBytes(bytes) that allows to handle these contents differently (i.e. body in fetch response). There may by multiple IMAPBytes received, up to the size sz specified in macro.

    Please note this will decode incoming bytes (for lines) with ASCII character set hence the content of the IMAP responses is based on 7 bit ASCII subset. The bytes in DataChunk are leaved as received, allowing to apply various encodings.

  18. def mkEmailHeader[F[_]](headerCodec: Codec[EmailHeader]): Pipe[F, Map[String, Vector[IMAPData]], IMAPEmailHeader]

    Permalink

    Creates email header from supplied of Map of Content.

    Creates email header from supplied of Map of Content.

    This requires UID content and BODY[HEADER] content to be present in map otherwise this will fail.

  19. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  20. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  21. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  22. def parseBodyStructure[F[_]](lines: Seq[String])(implicit F: Effect[F]): F[Seq[EmailBodyPart]]

    Permalink

    parses reult of FETCH xyz (BODYSTRUCTURE) request *

  23. def parseCapability[F[_]](lines: Seq[String])(implicit F: Monad[F]): F[Seq[String]]

    Permalink

    parse capability results *

  24. def parseLogin[F[_]](lines: Seq[String])(implicit F: Monad[F]): F[Seq[String]]

    Permalink

    parses login response, returning any supported capabiliites *

  25. def parseMailboxList[F[_]](lines: Seq[String])(implicit F: Monad[F]): F[Seq[IMAPMailbox]]

    Permalink

    parses result of LIST command *

  26. def parseSearchResult[F[_]](lines: Seq[String])(implicit F: Monad[F]): F[Seq[@@[Long, MailUID]]]

    Permalink

    parses result of the search operation encoded as space delimeited ids of messages *

  27. def parseSelect[F[_]](lines: Seq[String])(implicit F: Monad[F]): F[IMAPMailboxStatus]

    Permalink

    parses result of SELECT or EXAMINE commands *

  28. def rawContent[F[_]](result: RequestResult[F]): Stream[F, (Int, String, IMAPData)]

    Permalink

    From the supplied stream this will extract stream of raw content.

    From the supplied stream this will extract stream of raw content.

    This will fail, if result was not 'OK', with failure describing that exception.

    If the fetch will not receive any items, stream will be empty.

    As a result this will start to emit id of the result line (any line prefixed by *) then FETCH result prefix (i.e. UID, BODY, ...) and content for that prefix. When multiple same prefixes (Int, String) are emitted, they has tobe concatenated to form the result desired.

    result

    requestStream that produces result.

  29. def requestCmd[F[_]](idxRef: Ref[F, Long], requestSemaphore: Semaphore[F], fromServer: Stream[F, IMAPData], toServer: (String) ⇒ F[Unit])(cmd: IMAPCommand)(implicit F: Async[F]): RequestResult[F]

    Permalink

    Executes supplied command against the request, expecting the result of the command collected in resulting stream.

    Executes supplied command against the request, expecting the result of the command collected in resulting stream.

    Result is the stream, that either emits once on left with error description, if instead of any content the failure of the commmand was recived. Otherwise, the client emits on right, Strema of the data that were retruned by server. Note that the data retruned on right must be consumed, before command lock is released.

    idxRef

    Ref containing IDX that will be used to generate unique idx, that will be used to pair the response with command. Also note that client will only arrow one command at a time to be run against the server. Command will not complete before the resposne from the server is received.

    requestSemaphore

    Semaphore, that guards only one request to be peformed at any given time. Even though IMAPv4 spec allows for multiple concurrent commands in certain scenarios, this client strictly enforces sequential command execution.

    fromServer

    A stream of responses (lines) fromserver immedaitelly following the command executed.

    toServer

    Will send one line to server

  30. def shortContent[F[_], A](stream: RequestResult[F])(f: (Seq[String]) ⇒ F[A])(implicit F: Catchable[F]): F[Either[String, A]]

    Permalink

    Runs supplied stream, and then will collect any output before OK is received.

    Runs supplied stream, and then will collect any output before OK is received.

    stream

    Stream that perform the request

    f

    A function to be evaluated on successfull response, and is fed with response from server, concatenated w/o any tags from server

  31. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  32. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  33. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  34. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  35. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped