-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | network related libraries such as POP3, SMTP, IMAP -- -- Originally written for Google SOC, provides network related libraries -- such as POP3, SMTP, IMAP. All I have done is get the project to -- compile using cabal and check that these libraries basically work. @package HaskellNet @version 0.2.3 -- | Authentication related APIs module HaskellNet.Auth type UserName = String type Password = String data AuthType PLAIN :: AuthType LOGIN :: AuthType CRAM_MD5 :: AuthType b64Encode :: String -> String b64Decode :: String -> String showOctet :: [Octet] -> String hmacMD5 :: String -> String -> [Octet] plain :: UserName -> Password -> String login :: UserName -> Password -> (String, String) cramMD5 :: String -> UserName -> Password -> String auth :: AuthType -> String -> UserName -> Password -> String instance Eq AuthType instance Show AuthType -- | A library for abstracting sockets suitable to Streams. module HaskellNet.BSStream class BSStream h bsGetLine :: (BSStream h) => h -> IO ByteString bsGet :: (BSStream h) => h -> Int -> IO ByteString bsPut :: (BSStream h) => h -> ByteString -> IO () bsPuts :: (BSStream h) => h -> [ByteString] -> IO () bsPutStrLn :: (BSStream h) => h -> ByteString -> IO () bsPutCrLf :: (BSStream h) => h -> ByteString -> IO () bsPutNoFlush :: (BSStream h) => h -> ByteString -> IO () bsFlush :: (BSStream h) => h -> IO () bsClose :: (BSStream h) => h -> IO () instance BSStream Handle -- | SMTP client implementation module HaskellNet.SMTP data Command HELO :: String -> Command EHLO :: String -> Command MAIL :: String -> Command RCPT :: String -> Command DATA :: ByteString -> Command EXPN :: String -> Command VRFY :: String -> Command HELP :: String -> Command AUTH :: AuthType -> UserName -> Password -> Command NOOP :: Command RSET :: Command QUIT :: Command data Response Ok :: Response SystemStatus :: Response HelpMessage :: Response ServiceReady :: Response ServiceClosing :: Response UserNotLocal :: Response CannotVerify :: Response StartMailInput :: Response ServiceNotAvailable :: Response MailboxUnavailable :: Response ErrorInProcessing :: Response InsufficientSystemStorage :: Response SyntaxError :: Response ParameterError :: Response CommandNotImplemented :: Response BadSequence :: Response ParameterNotImplemented :: Response MailboxUnavailableError :: Response UserNotLocalError :: Response ExceededStorage :: Response MailboxNotAllowed :: Response TransactionFailed :: Response data (BSStream s) => SMTPConnection s -- | connecting SMTP server with the specified name and port number. connectSMTPPort :: String -> PortNumber -> IO (SMTPConnection Handle) -- | connecting SMTP server with the specified name and port 25. connectSMTP :: String -> IO (SMTPConnection Handle) -- | create SMTPConnection from already connected Stream connectStream :: (BSStream s) => s -> IO (SMTPConnection s) -- | send a method to a server sendCommand :: (BSStream s) => SMTPConnection s -> Command -> IO (ReplyCode, ByteString) -- | close the connection. This function send the QUIT method, so you do -- not have to QUIT method explicitly. closeSMTP :: (BSStream s) => SMTPConnection s -> IO () -- | sending a mail to a server. This is achieved by sendMessage. If -- something is wrong, it raises an IOexception. sendMail :: (BSStream s) => String -> [String] -> ByteString -> SMTPConnection s -> IO () -- | doSMTPPort open a connection, and do an IO action with the connection, -- and then close it. doSMTPPort :: String -> PortNumber -> (SMTPConnection Handle -> IO a) -> IO a -- | doSMTP is similar to doSMTPPort, except that it does not require port -- number but connects to the server with port 25. doSMTP :: String -> (SMTPConnection Handle -> IO a) -> IO a -- | doSMTPStream is similar to doSMTPPort, except that its argument is a -- Stream data instead of hostname and port number. doSMTPStream :: (BSStream s) => s -> (SMTPConnection s -> IO a) -> IO a instance Show Response instance Eq Response instance Show Command instance Eq Command -- | POP3 client implementation module HaskellNet.POP3 data Command USER :: UserName -> Command PASS :: Password -> Command APOP :: UserName -> Password -> Command AUTH :: AuthType -> UserName -> Password -> Command NOOP :: Command QUIT :: Command STAT :: Command LIST :: (Maybe Int) -> Command DELE :: Int -> Command RETR :: Int -> Command RSET :: Command TOP :: Int -> Int -> Command UIDL :: (Maybe Int) -> Command data (BSStream s) => POP3Connection s -- | APOP key POP3C :: !s -> !String -> POP3Connection s data Response Ok :: Response Err :: Response -- | connecting to the pop3 server specified by the hostname and port -- number connectPop3Port :: String -> PortNumber -> IO (POP3Connection Handle) -- | connecting to the pop3 server specified by the hostname. 110 is used -- for the port number. connectPop3 :: String -> IO (POP3Connection Handle) -- | connecting to the pop3 server via a stream connectStream :: (BSStream s) => s -> IO (POP3Connection s) -- | sendCommand sends a pop3 command via a pop3 connection. This action is -- too generic. Use more specific actions sendCommand :: (BSStream s) => POP3Connection s -> Command -> IO (Response, ByteString) closePop3 :: (BSStream s) => POP3Connection s -> IO () user :: (BSStream s) => POP3Connection s -> String -> IO () pass :: (BSStream s) => POP3Connection s -> String -> IO () userPass :: (BSStream s) => POP3Connection s -> UserName -> Password -> IO () apop :: (BSStream s) => POP3Connection s -> String -> String -> IO () auth :: (BSStream s) => POP3Connection s -> AuthType -> UserName -> Password -> IO () stat :: (BSStream s) => POP3Connection s -> IO (Int, Int) dele :: (BSStream s) => POP3Connection s -> Int -> IO () retr :: (BSStream s) => POP3Connection s -> Int -> IO ByteString top :: (BSStream s) => POP3Connection s -> Int -> Int -> IO ByteString rset :: (BSStream s) => POP3Connection s -> IO () allList :: (BSStream s) => POP3Connection s -> IO [(Int, Int)] list :: (BSStream s) => POP3Connection s -> Int -> IO Int allUIDLs :: (BSStream s) => POP3Connection s -> IO [(Int, ByteString)] uidl :: (BSStream s) => POP3Connection s -> Int -> IO ByteString doPop3Port :: String -> PortNumber -> (POP3Connection Handle -> IO a) -> IO a doPop3 :: String -> (POP3Connection Handle -> IO a) -> IO a doPop3Stream :: (BSStream s) => s -> (POP3Connection s -> IO b) -> IO b instance Eq Response instance Show Response -- | Atom Syndication format Parser/Printer Library using HaXml module Text.Atom data Text Text :: String -> Text HTML :: String -> Text XHtml :: [Content] -> Text data EntryContent TextCont :: Text -> EntryContent BinaryData :: String -> String -> EntryContent OtherSrc :: String -> String -> EntryContent stringContent :: String -> EntryContent xhtmlContent :: [Content] -> EntryContent binaryContent :: [Char] -> String -> EntryContent srcContent :: [Char] -> String -> EntryContent data Person mkPerson :: String -> Person data Feed mkFeed :: Person -> String -> String -> String -> ZonedTime -> Feed data Entry mkEntry :: String -> String -> EntryContent -> ZonedTime -> Entry data Category mkCategory :: String -> Category data Generator mkGenerator :: String -> Generator defaultGenerator :: Generator data Link data LinkRelation Alternate :: LinkRelation Related :: LinkRelation Self :: LinkRelation Enclosure :: LinkRelation Via :: LinkRelation mkLink :: String -> Link selfLink :: String -> Link data Attr r v get :: Attr r v -> r -> v set :: Attr r v -> v -> r -> r update :: Attr r v -> (v -> v) -> r -> r has :: (Foldable t) => Attr r (t v) -> r -> Bool add :: (Alternative t) => Attr r (t v) -> v -> r -> r howMany :: (Foldable t, Integral n) => Attr r (t v) -> r -> n set' :: (Applicative t, Foldable t) => Attr r (t v) -> v -> r -> r get' :: (Foldable t) => Attr r (t v) -> r -> v delete :: (Alternative t) => Attr r (t v) -> r -> r class AName r v | r -> v name :: (AName r v) => Attr r v class AUri r v | r -> v uri :: (AUri r v) => Attr r v class AEmail r v | r -> v email :: (AEmail r v) => Attr r v class AAuthor r v | r -> v author :: (AAuthor r v) => Attr r v class ACategory r v | r -> v category :: (ACategory r v) => Attr r v class AContributor r v | r -> v contributor :: (AContributor r v) => Attr r v class AGenerator r v | r -> v generator :: (AGenerator r v) => Attr r v class AIcon r v | r -> v icon :: (AIcon r v) => Attr r v class AId r v | r -> v identifier :: (AId r v) => Attr r v class ALink r v | r -> v link :: (ALink r v) => Attr r v class ALogo r v | r -> v logo :: (ALogo r v) => Attr r v class ARights r v | r -> v rights :: (ARights r v) => Attr r v class ASubtitle r v | r -> v subtitle :: (ASubtitle r v) => Attr r v class ATitle r v | r -> v title :: (ATitle r v) => Attr r v class AUpdated r v | r -> v updated :: (AUpdated r v) => Attr r v class AEntries r v | r -> v entries :: (AEntries r v) => Attr r v class AContent r v | r -> v content :: (AContent r v) => Attr r v class APublished r v | r -> v published :: (APublished r v) => Attr r v class ASource r v | r -> v source :: (ASource r v) => Attr r v class ASummary r v | r -> v summary :: (ASummary r v) => Attr r v class ATerm r v | r -> v term :: (ATerm r v) => Attr r v class AScheme r v | r -> v scheme :: (AScheme r v) => Attr r v class ALabel r v | r -> v label :: (ALabel r v) => Attr r v class AVersion r v | r -> v version :: (AVersion r v) => Attr r v class AHref r v | r -> v href :: (AHref r v) => Attr r v class ARel r v | r -> v rel :: (ARel r v) => Attr r v class AMediatype r v | r -> v mediatype :: (AMediatype r v) => Attr r v class AHreflang r v | r -> v hreflang :: (AHreflang r v) => Attr r v class ALength r v | r -> v len :: (ALength r v) => Attr r v class (AName r Text, AUri r (Maybe String), AEmail r (Maybe String)) => PERSON r class (ATerm r String, AScheme r (Maybe String), ALabel r (Maybe String)) => CATEGORY r class (AName r String, AUri r (Maybe String), AVersion r (Maybe String)) => GENERATOR r class (AHref r String, ARel r LinkRelation, AMediatype r (Maybe String), AHreflang r (Maybe String), ATitle r (Maybe String), ALength r (Maybe Integer)) => LINK r class (AAuthor r [Person], ACategory r [Category], AContributor r [Person], AGenerator r [Generator], AIcon r (Maybe String), AId r String, ALink r [Link], ALogo r (Maybe String), ARights r (Maybe Text), ASubtitle r (Maybe Text), ATitle r Text, AUpdated r ZonedTime) => FEED r class (AAuthor r [Person], ACategory r [Category], AContent r (Maybe EntryContent), AContributor r [Person], AId r String, ALink r [Link], APublished r (Maybe ZonedTime), ARights r (Maybe Text), ASource r (Maybe Feed), ASummary r (Maybe String), ATitle r Text, AUpdated r ZonedTime) => ENTRY r instance Eq LinkRelation instance Show Link instance Show Generator instance Show Category instance Show Entry instance Show Feed instance Show Person instance Show EntryContent instance XmlContent Feed instance XmlContent Entry instance XmlContent EntryContent instance XmlContent Link instance XmlContent Generator instance XmlContent Category instance ENTRY Entry instance FEED Feed instance LINK Link instance GENERATOR Generator instance CATEGORY Category instance PERSON Person instance ALength Link (Maybe Integer) instance ATitle Link (Maybe String) instance AHreflang Link (Maybe String) instance AMediatype Link (Maybe String) instance ARel Link LinkRelation instance AHref Link String instance AVersion Generator (Maybe String) instance AUri Generator (Maybe String) instance AName Generator String instance ALabel Category (Maybe String) instance AScheme Category (Maybe String) instance ATerm Category String instance AUpdated Entry ZonedTime instance ATitle Entry Text instance ASummary Entry (Maybe String) instance ASource Entry (Maybe Feed) instance ARights Entry (Maybe Text) instance APublished Entry (Maybe ZonedTime) instance ALink Entry [Link] instance AId Entry String instance AContributor Entry [Person] instance AContent Entry (Maybe EntryContent) instance ACategory Entry [Category] instance AAuthor Entry [Person] instance AEntries Feed [Entry] instance AUpdated Feed ZonedTime instance ATitle Feed Text instance ASubtitle Feed (Maybe Text) instance ARights Feed (Maybe Text) instance ALogo Feed (Maybe String) instance ALink Feed [Link] instance AId Feed String instance AIcon Feed (Maybe String) instance AGenerator Feed [Generator] instance AContributor Feed [Person] instance ACategory Feed [Category] instance AAuthor Feed [Person] instance AEmail Person (Maybe String) instance AUri Person (Maybe String) instance AName Person Text instance Read LinkRelation instance Show LinkRelation instance Show Text -- | RSS 1.0 Printer Library (printing such like Text.HTML) module Text.RSS data RSSItem RSSItem :: String -> String -> Maybe String -> Maybe String -> [DublinCore] -> RSSItem itemTitle :: RSSItem -> String itemLink :: RSSItem -> String itemDescription :: RSSItem -> Maybe String itemContent :: RSSItem -> Maybe String itemDC :: RSSItem -> [DublinCore] data RSSChannel RSSChannel :: String -> String -> String -> String -> [DublinCore] -> Maybe RSSImage -> [RSSItem] -> RSSChannel chTitle :: RSSChannel -> String chURI :: RSSChannel -> String chLink :: RSSChannel -> String chDescription :: RSSChannel -> String chDC :: RSSChannel -> [DublinCore] chImage :: RSSChannel -> Maybe RSSImage chItems :: RSSChannel -> [RSSItem] data RSSImage RSSImage :: String -> String -> String -> RSSImage imURI :: RSSImage -> String imTitle :: RSSImage -> String imLink :: RSSImage -> String data DublinCore DCCreator :: String -> DublinCore DCDate :: ZonedTime -> DublinCore DCSubject :: String -> DublinCore class ATitle r v | r -> v title :: (ATitle r v) => Attr r v class ALink r v | r -> v link :: (ALink r v) => Attr r v class ADescription r v | r -> v description :: (ADescription r v) => Attr r v class AContent r v | r -> v content :: (AContent r v) => Attr r v class ADC r v | r -> v dc :: (ADC r v) => Attr r v class AImage r v | r -> v image :: (AImage r v) => Attr r v class AItems r v | r -> v items :: (AItems r v) => Attr r v class AUri r v | r -> v uri :: (AUri r v) => Attr r v class (ATitle r String, ALink r String, ADescription r (Maybe String), AContent r (Maybe String), ADC r [DublinCore]) => RSSITEM r class (ATitle r String, AUri r String, ALink r String, ADescription r String, ADC r [DublinCore], AImage r (Maybe RSSImage), AItems r [RSSItem]) => RSSCHANNEL r class (AUri r String, ATitle r String, ALink r String) => RSSIMAGE r rss2Elem :: RSSChannel -> Element rss2ElemWithAttrs :: [(String, String)] -> RSSChannel -> Element defaultAttrs :: [([Char], [Char])] elem2rss :: Element -> RSSChannel data Attr r v get :: Attr r v -> r -> v set :: Attr r v -> v -> r -> r update :: Attr r v -> (v -> v) -> r -> r has :: (Foldable t) => Attr r (t v) -> r -> Bool add :: (Alternative t) => Attr r (t v) -> v -> r -> r howMany :: (Foldable t, Integral n) => Attr r (t v) -> r -> n set' :: (Applicative t, Foldable t) => Attr r (t v) -> v -> r -> r get' :: (Foldable t) => Attr r (t v) -> r -> v delete :: (Alternative t) => Attr r (t v) -> r -> r instance XmlContent RSSChannel instance XmlContent RSSItem instance XmlContent DublinCore instance XmlContent RSSImage instance ALink RSSImage String instance ATitle RSSImage String instance AUri RSSImage String instance RSSCHANNEL RSSChannel instance AItems RSSChannel [RSSItem] instance AImage RSSChannel (Maybe RSSImage) instance ADC RSSChannel [DublinCore] instance ADescription RSSChannel String instance ALink RSSChannel String instance AUri RSSChannel String instance ATitle RSSChannel String instance RSSITEM RSSItem instance ADC RSSItem [DublinCore] instance AContent RSSItem (Maybe String) instance ADescription RSSItem (Maybe String) instance ALink RSSItem String instance ATitle RSSItem String -- | Bencode Parser and Serializer and type classes, for BitTorrent. module Text.Bencode class Bencodable a fromBencode :: (Bencodable a) => BencodeNode -> a toBencode :: (Bencodable a) => a -> BencodeNode bRead :: (Bencodable a) => String -> a bShow :: (Bencodable a) => a -> String data BencodeNode String :: !ByteString -> BencodeNode Number :: !Integer -> BencodeNode Dictionary :: !Map ByteString BencodeNode -> BencodeNode List :: [BencodeNode] -> BencodeNode parse :: ByteString -> BencodeNode parses :: ByteString -> [BencodeNode] encode :: BencodeNode -> ByteString instance [incoherent] Eq BencodeNode instance [incoherent] Show BencodeNode instance [incoherent] (Bencodable a) => Bencodable [a] instance [incoherent] (Bencodable a) => Bencodable [(String, a)] instance [incoherent] (Bencodable a) => Bencodable (Map String a) instance [incoherent] (Bencodable a) => Bencodable [(ByteString, a)] instance [incoherent] (Bencodable a) => Bencodable (Map ByteString a) instance [incoherent] Bencodable Int instance [incoherent] Bencodable Integer instance [incoherent] Bencodable ByteString instance [incoherent] Bencodable String instance [incoherent] Bencodable BencodeNode -- | Mime Parser module Text.Mime data Mime SinglePart :: [Header] -> ByteString -> Mime MultiPart :: [Header] -> [Mime] -> Mime type Message = ([Header], ByteString) type Header = (FieldName, FieldValue) type FieldName = String type FieldValue = String data MimeDerivs MimeDerivs :: Result MimeDerivs Message -> Result MimeDerivs Mime -> Result MimeDerivs Header -> Result MimeDerivs ByteString -> Result MimeDerivs Char -> Pos -> MimeDerivs dvMessage :: MimeDerivs -> Result MimeDerivs Message dvMime :: MimeDerivs -> Result MimeDerivs Mime dvHeader :: MimeDerivs -> Result MimeDerivs Header dvRest :: MimeDerivs -> Result MimeDerivs ByteString advChar :: MimeDerivs -> Result MimeDerivs Char advPos :: MimeDerivs -> Pos mime :: ByteString -> Mime message :: ByteString -> Message mime' :: String -> Mime message' :: String -> Message eval :: (MimeDerivs -> Result MimeDerivs r) -> ByteString -> r parse :: Pos -> ByteString -> MimeDerivs eval' :: (MimeDerivs -> Result MimeDerivs r) -> String -> r parse' :: Pos -> String -> MimeDerivs lineBreak :: (Derivs d) => Parser d String pHeader :: MimeDerivs -> Result MimeDerivs (String, String) pMessage :: MimeDerivs -> Result MimeDerivs Message pMime :: MimeDerivs -> Result MimeDerivs Mime type CharSet = String data RFC2047Derivs RFC2047Derivs :: Result RFC2047Derivs [(CharSet, String)] -> Result RFC2047Derivs Char -> Pos -> RFC2047Derivs dvHeaderExts :: RFC2047Derivs -> Result RFC2047Derivs [(CharSet, String)] hdvChar :: RFC2047Derivs -> Result RFC2047Derivs Char hdvPos :: RFC2047Derivs -> Pos headerExts :: ByteString -> [(CharSet, String)] headerExts' :: String -> [(CharSet, String)] pHeaderExts :: RFC2047Derivs -> Result RFC2047Derivs [(CharSet, String)] decodeQuoted :: (Derivs d) => Parser d String decodeB64 :: (Derivs d) => Parser d String showHeader' :: Header -> Doc showHeader :: CharSet -> Header -> Doc capital :: String -> String b64Encode :: String -> String showMessage :: CharSet -> Message -> Doc showMime :: CharSet -> Mime -> Doc instance Eq Mime instance Show Mime instance Derivs RFC2047Derivs instance Derivs MimeDerivs -- | URI parser and utilities module Text.URI data URI URI :: String -> String -> String -> String -> Maybe PortNumber -> String -> String -> String -> URI scheme :: URI -> String host :: URI -> String user :: URI -> String password :: URI -> String port :: URI -> Maybe PortNumber path :: URI -> String query :: URI -> String fragment :: URI -> String -- | Obtain the port number for the URI. If no port number exists, port' -- would like to estimate the port number from the scheme name. If both -- failed, it raises an error. port' :: URI -> PortNumber uri :: String -> URI -- | Parse URI string simiar to parseURI. The difference is that it -- raises an error for the case of parse failed, not returns Nothing. uri' :: ByteString -> URI escape :: [Word8] -> String unescape :: String -> String -- | Parse URI string and returns the result. If the parse is failed, it -- simply returns Nothing. parseURI :: String -> Maybe URI parseURI' :: ByteString -> Maybe URI portToName :: PortNumber -> Maybe String nameToPort :: String -> Maybe PortNumber instance Eq URI instance Derivs URIDerivs instance Show URI -- | Parsers for IMAP server responses module Text.IMAPParsers type Mailbox = String type UID = Word64 type Charset = String data MailboxInfo MboxInfo :: Mailbox -> Integer -> Integer -> [Flag] -> [Flag] -> Bool -> Bool -> UID -> UID -> MailboxInfo _mailbox :: MailboxInfo -> Mailbox _exists :: MailboxInfo -> Integer _recent :: MailboxInfo -> Integer _flags :: MailboxInfo -> [Flag] _permanentFlags :: MailboxInfo -> [Flag] _isWritable :: MailboxInfo -> Bool _isFlagWritable :: MailboxInfo -> Bool _uidNext :: MailboxInfo -> UID _uidValidity :: MailboxInfo -> UID data Flag Seen :: Flag Answered :: Flag Flagged :: Flag Deleted :: Flag Draft :: Flag Recent :: Flag Keyword :: String -> Flag data Attribute Noinferiors :: Attribute Noselect :: Attribute Marked :: Attribute Unmarked :: Attribute OtherAttr :: String -> Attribute data MboxUpdate MboxUpdate :: Maybe Integer -> Maybe Integer -> MboxUpdate exists :: MboxUpdate -> Maybe Integer recent :: MboxUpdate -> Maybe Integer data StatusCode ALERT :: StatusCode BADCHARSET :: [Charset] -> StatusCode CAPABILITY_sc :: [String] -> StatusCode PARSE :: StatusCode PERMANENTFLAGS :: [Flag] -> StatusCode READ_ONLY :: StatusCode READ_WRITE :: StatusCode TRYCREATE :: StatusCode UIDNEXT_sc :: UID -> StatusCode UIDVALIDITY_sc :: UID -> StatusCode UNSEEN_sc :: Integer -> StatusCode data ServerResponse OK :: (Maybe StatusCode) -> String -> ServerResponse NO :: (Maybe StatusCode) -> String -> ServerResponse BAD :: (Maybe StatusCode) -> String -> ServerResponse PREAUTH :: (Maybe StatusCode) -> String -> ServerResponse -- | the query data type for the status command data MailboxStatus -- | the number of messages in the mailbox MESSAGES :: MailboxStatus -- | the number of messages with the Recent flag set RECENT :: MailboxStatus -- | the next unique identifier value of the mailbox UIDNEXT :: MailboxStatus -- | the unique identifier validity value of the mailbox UIDVALIDITY :: MailboxStatus data RespDerivs RespDerivs :: Result RespDerivs [Flag] -> Result RespDerivs String -> Result RespDerivs Char -> Pos -> RespDerivs dvFlags :: RespDerivs -> Result RespDerivs [Flag] advTag :: RespDerivs -> Result RespDerivs String advChar :: RespDerivs -> Result RespDerivs Char advPos :: RespDerivs -> Pos eval :: (RespDerivs -> Result RespDerivs r) -> String -> ByteString -> r parse :: String -> Pos -> ByteString -> RespDerivs eval' :: (RespDerivs -> Result RespDerivs r) -> String -> String -> r parse' :: String -> Pos -> String -> RespDerivs pNone :: RespDerivs -> Result RespDerivs (ServerResponse, MboxUpdate, ()) pCapability :: RespDerivs -> Result RespDerivs (ServerResponse, MboxUpdate, [String]) pList :: RespDerivs -> Result RespDerivs (ServerResponse, MboxUpdate, [([Attribute], String, Mailbox)]) pLsub :: RespDerivs -> Result RespDerivs (ServerResponse, MboxUpdate, [([Attribute], String, Mailbox)]) pStatus :: RespDerivs -> Result RespDerivs (ServerResponse, MboxUpdate, [(MailboxStatus, Integer)]) pExpunge :: RespDerivs -> Result RespDerivs (ServerResponse, MboxUpdate, [Integer]) pSearch :: RespDerivs -> Result RespDerivs (ServerResponse, MboxUpdate, [UID]) pSelect :: RespDerivs -> Result RespDerivs (ServerResponse, MboxUpdate, MailboxInfo) pFetch :: RespDerivs -> Result RespDerivs (ServerResponse, MboxUpdate, [(Integer, [(String, String)])]) pDone :: RespDerivs -> Result RespDerivs ServerResponse pFlag :: Parser RespDerivs Flag pParenFlags :: RespDerivs -> Result RespDerivs [Flag] atomChar :: (Derivs d) => Parser d Char pNumberedLine :: String -> Parser RespDerivs Integer pRecentLine :: Parser RespDerivs Integer pExpungeLine :: Parser RespDerivs Integer pExistsLine :: Parser RespDerivs Integer pOtherLine :: Parser RespDerivs (Either (String, Integer) b) pCapabilityLine :: Parser RespDerivs (Either a [String]) pListLine :: String -> Parser RespDerivs (Either a ([Attribute], String, Mailbox)) pStatusLine :: Parser RespDerivs (Either a [(MailboxStatus, Integer)]) pSearchLine :: Parser RespDerivs (Either a [UID]) pSelectLine :: Parser RespDerivs (MailboxInfo -> MailboxInfo) pFetchLine :: Parser RespDerivs (Either a (Integer, [(String, String)])) crlf :: String crlfP :: (Derivs d) => Parser d String lookups :: (Eq a) => a -> [(a, b)] -> [b] catRights :: [Either a b] -> [b] catLefts :: [Either a b] -> [a] isRight :: Either a b -> Bool isLeft :: Either a b -> Bool getLeft :: Either a b -> a getRight :: Either a b -> b instance Show MailboxStatus instance Read MailboxStatus instance Eq MailboxStatus instance Eq ServerResponse instance Show ServerResponse instance Eq StatusCode instance Show StatusCode instance Show MboxUpdate instance Eq MboxUpdate instance Show Attribute instance Eq Attribute instance Eq Flag instance Show MailboxInfo instance Eq MailboxInfo instance Derivs RespDerivs instance Show Flag -- | IMAP client implementation module HaskellNet.IMAP data (BSStream s) => IMAPConnection s mailbox :: (BSStream s) => IMAPConnection s -> IO Mailbox exists :: (BSStream s) => IMAPConnection s -> IO Integer recent :: (BSStream s) => IMAPConnection s -> IO Integer flags :: (BSStream s) => IMAPConnection s -> IO [Flag] permanentFlags :: (BSStream s) => IMAPConnection s -> IO [Flag] isWritable :: (BSStream s) => IMAPConnection s -> IO Bool isFlagWritable :: (BSStream s) => IMAPConnection s -> IO Bool uidNext :: (BSStream s) => IMAPConnection s -> IO UID uidValidity :: (BSStream s) => IMAPConnection s -> IO UID stream :: (BSStream s) => IMAPConnection s -> s connectIMAP :: String -> IO (IMAPConnection Handle) connectIMAPPort :: String -> PortNumber -> IO (IMAPConnection Handle) connectStream :: (BSStream s) => s -> IO (IMAPConnection s) noop :: (BSStream s) => IMAPConnection s -> IO () capability :: (BSStream s) => IMAPConnection s -> IO [String] logout :: (BSStream s) => IMAPConnection s -> IO () login :: (BSStream s) => IMAPConnection s -> UserName -> Password -> IO () authenticate :: (BSStream s) => IMAPConnection s -> AuthType -> UserName -> Password -> IO () select :: (BSStream s) => IMAPConnection s -> Mailbox -> IO () examine :: (BSStream s) => IMAPConnection s -> Mailbox -> IO () create :: (BSStream s) => IMAPConnection s -> Mailbox -> IO () delete :: (BSStream s) => IMAPConnection s -> Mailbox -> IO () rename :: (BSStream s) => IMAPConnection s -> Mailbox -> Mailbox -> IO () subscribe :: (BSStream s) => IMAPConnection s -> Mailbox -> IO () unsubscribe :: (BSStream s) => IMAPConnection s -> Mailbox -> IO () list :: (BSStream s) => IMAPConnection s -> IO [([Attribute], Mailbox)] lsub :: (BSStream s) => IMAPConnection s -> IO [([Attribute], Mailbox)] status :: (BSStream s) => IMAPConnection s -> Mailbox -> [MailboxStatus] -> IO [(MailboxStatus, Integer)] append :: (BSStream s) => IMAPConnection s -> Mailbox -> ByteString -> IO () check :: (BSStream s) => IMAPConnection s -> IO () close :: (BSStream s) => IMAPConnection s -> IO () expunge :: (BSStream s) => IMAPConnection s -> IO [Integer] search :: (BSStream s) => IMAPConnection s -> [SearchQuery] -> IO [UID] store :: (BSStream s) => IMAPConnection s -> UID -> FlagsQuery -> IO () copy :: (BSStream s) => IMAPConnection s -> UID -> Mailbox -> IO () fetch :: (BSStream s) => IMAPConnection s -> UID -> IO ByteString fetchHeader :: (BSStream s) => IMAPConnection s -> UID -> IO ByteString fetchSize :: (BSStream s) => IMAPConnection s -> UID -> IO Int fetchHeaderFields :: (BSStream s) => IMAPConnection s -> UID -> [String] -> IO ByteString fetchHeaderFieldsNot :: (BSStream s) => IMAPConnection s -> UID -> [String] -> IO ByteString fetchFlags :: (BSStream s) => IMAPConnection s -> UID -> IO [Flag] fetchR :: (BSStream s) => IMAPConnection s -> (UID, UID) -> IO [(UID, ByteString)] fetchByString :: (BSStream s) => IMAPConnection s -> UID -> String -> IO [(String, String)] fetchByStringR :: (BSStream s) => IMAPConnection s -> (UID, UID) -> String -> IO [(UID, [(String, String)])] data Flag Seen :: Flag Answered :: Flag Flagged :: Flag Deleted :: Flag Draft :: Flag Recent :: Flag Keyword :: String -> Flag data Attribute Noinferiors :: Attribute Noselect :: Attribute Marked :: Attribute Unmarked :: Attribute OtherAttr :: String -> Attribute -- | the query data type for the status command data MailboxStatus -- | the number of messages in the mailbox MESSAGES :: MailboxStatus -- | the number of messages with the Recent flag set RECENT :: MailboxStatus -- | the next unique identifier value of the mailbox UIDNEXT :: MailboxStatus -- | the unique identifier validity value of the mailbox UIDVALIDITY :: MailboxStatus data SearchQuery ALLs :: SearchQuery FLAG :: Flag -> SearchQuery UNFLAG :: Flag -> SearchQuery BCCs :: String -> SearchQuery BEFOREs :: CalendarTime -> SearchQuery BODYs :: String -> SearchQuery CCs :: String -> SearchQuery FROMs :: String -> SearchQuery HEADERs :: String -> String -> SearchQuery LARGERs :: Integer -> SearchQuery NEWs :: SearchQuery NOTs :: SearchQuery -> SearchQuery OLDs :: SearchQuery ONs :: CalendarTime -> SearchQuery ORs :: SearchQuery -> SearchQuery -> SearchQuery SENTBEFOREs :: CalendarTime -> SearchQuery SENTONs :: CalendarTime -> SearchQuery SENTSINCEs :: CalendarTime -> SearchQuery SINCEs :: CalendarTime -> SearchQuery SMALLERs :: Integer -> SearchQuery SUBJECTs :: String -> SearchQuery TEXTs :: String -> SearchQuery TOs :: String -> SearchQuery UIDs :: [UID] -> SearchQuery data FlagsQuery ReplaceFlags :: [Flag] -> FlagsQuery PlusFlags :: [Flag] -> FlagsQuery MinusFlags :: [Flag] -> FlagsQuery instance Show SearchQuery