MissingH-1.5.0.0: Large utility library
CopyrightCopyright (C) 2005-2011 John Goerzen
LicenseBSD-3-Clause
Stabilitystable
Portabilityportable
Safe HaskellSafe
LanguageHaskell2010

Network.Email.Mailbox

Description

General support for e-mail mailboxes

Written by John Goerzen, jgoerzen@complete.org

Synopsis

Documentation

data Flag Source #

The flags which may be assigned to a message.

Instances

Instances details
Eq Flag Source # 
Instance details

Defined in Network.Email.Mailbox

Methods

(==) :: Flag -> Flag -> Bool #

(/=) :: Flag -> Flag -> Bool #

Show Flag Source # 
Instance details

Defined in Network.Email.Mailbox

Methods

showsPrec :: Int -> Flag -> ShowS #

show :: Flag -> String #

showList :: [Flag] -> ShowS #

type Flags = [Flag] Source #

Convenience shortcut

type Message = String Source #

A Message is represented as a simple String.

class (Show a, Show b, Eq b) => MailboxReader a b where Source #

Main class for readable mailboxes.

The mailbox object a represents zero or more Messages. Each message has a unique identifier b in a format specific to each given mailbox. This identifier may or may not be persistent.

Functions which return a list are encouraged -- but not guaranteed -- to do so lazily.

Implementing classes must provide, at minimum, getAll.

Minimal complete definition

getAll

Methods

listIDs :: a -> IO [b] Source #

Returns a list of all unique identifiers.

listMessageFlags :: a -> IO [(b, Flags)] Source #

Returns a list of all unique identifiers as well as all flags.

getAll :: a -> IO [(b, Flags, Message)] Source #

Returns a list of all messages, including their content, flags, and unique identifiers.

getMessages :: a -> [b] -> IO [(b, Flags, Message)] Source #

Returns information about specific messages.

class MailboxReader a b => MailboxWriter a b where Source #

Methods

appendMessages :: a -> [(Flags, Message)] -> IO [b] Source #

deleteMessages :: a -> [b] -> IO () Source #

addFlags :: a -> [b] -> Flags -> IO () Source #

removeFlags :: a -> [b] -> Flags -> IO () Source #

setFlags :: a -> [b] -> Flags -> IO () Source #