module MrMime_quotedPrintable:sig
..end
module Decoder:sig
..end
module Encoder:sig
..end
module Input:module type of RingBuffer.Committed
with type 'a t = 'a RingBuffer.Committed.t
type 'a
decoder
typedecoding =
[ `Continue
| `Dirty of char
| `End of string
| `Error of Parser.err
| `String of string ]
val decoder : unit Parser.t * unit Parser.t ->
'a Input.t -> 'a decoder
decoder (boundary, rollback) input
is a QuotedPrintable decoder that
inputs from input
. boundary
specifies the limit of the decoding and
rollback
allows the decoder to keep the boundary inside the input
.val decoder_src : 'a decoder -> 'a Input.t
decoder_src decoder
is decoder
's input source.val decode : 'a decoder -> decoding
decode decoder
is:`Continue
if decoder
awaits for more input. The client muse use MrMime_quotedPrintable.src
to provide it.`Dirty chr
if decoder
recognizes an unsafe character (according
RFC2045: safe-char := <any octet with decimal value of 33 through
60 inclusive, and 62 through 126>
; Characters not listed as "mail-safe" in
; RFC2049 are also not recommended.
In this case, the character is already skipped. The client can choose to keep this character in its computation or not.
`Error exn
if the decoder
as a parsing error.`String s
if a chunk s
was decoder.`End s
if the last chunk s
was decoded - when the decoder arises one
time this value, it returns only this value after the client recall
decode
.val src : 'a decoder -> string -> int -> int -> unit
src decoder buf off len
provides decoder
with len
bytes to read,
starting at off
in buf
. This bbyte range is read by calls to MrMime_quotedPrintable.decode
until `Continue
is returned. To signal the end of input call the function
with len = 0
.