Copyright | (c) Dmitry Astapov 2006 ; pierre 2007 |
---|---|
License | BSD3 |
Maintainer | Dmitry Astapov <dastapov@gmail.com>, pierre <k.pierre.k@gmail.com> |
Stability | experimental |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
Synopsis
- type Server = Text
- type Username = Text
- type Password = Text
- type Resource = Text
- data Stream = Stream {}
- newtype XmppMonad m a = XmppMonad {
- unXmppMonad :: StateT Stream m a
- runXmppMonad :: MonadIO m => XmppMonad m a -> m (a, Stream)
- runXmppMonad' :: MonadIO m => Stream -> XmppMonad m a -> m (a, Stream)
- newtype DomainID = DomainID {
- unDomainID :: Text
- newtype NodeID = NodeID {}
- newtype ResourceID = ResourceID {
- unResourceID :: Text
- data JIDQualification
- = Resource
- | NodeResource
- | Node
- | Domain
- data SomeJID = forall (a :: JIDQualification). SomeJID (JID a)
- data JID :: JIDQualification -> * where
- ResourceJID :: {..} -> JID 'Resource
- NodeResourceJID :: {..} -> JID 'NodeResource
- NodeJID :: {..} -> JID 'Node
- DomainJID :: {..} -> JID 'Domain
- toBareJID :: JID 'NodeResource -> JID 'Node
- data StreamType
- data RosterItem = RosterItem {
- jid :: JID 'NodeResource
- subscribtion :: SubscribtionType
- nickname :: Maybe String
- groups :: [String]
- data SubscribtionType
- data MessageType
- = Chat
- | GroupChat
- | Headline
- | Normal
- | MessageError
- data PresenceType
- data IQType
- data ShowType
- data StanzaPurpose
- data SomeStanza e = forall (a :: StanzaType) (p :: StanzaPurpose). SomeStanza (Stanza a p e)
- data StanzaType
- type family DataByPurpose (p :: StanzaPurpose) body where ...
- data Stanza :: StanzaType -> StanzaPurpose -> * -> * where
Documentation
XMPP stream, used as a state in XmppMonad state transformer
newtype XmppMonad m a Source #
XmppMonad | |
|
Instances
MonadTrans XmppMonad Source # | |
Defined in Network.XMPP.Types | |
Monad m => MonadState Stream (XmppMonad m) Source # | |
Monad m => Monad (XmppMonad m) Source # | |
Functor m => Functor (XmppMonad m) Source # | |
Monad m => Applicative (XmppMonad m) Source # | |
Defined in Network.XMPP.Types | |
MonadIO m => MonadIO (XmppMonad m) Source # | |
Defined in Network.XMPP.Types | |
MonadIO m => XmppSendable (XmppMonad m) Node Source # | |
MonadIO m => XmppSendable (XmppMonad m) (Content Posn) Source # | |
MonadIO m => XmppSendable (XmppMonad m) (Stanza t 'Outgoing e) Source # | |
Jabber ID (JID) datatype
https://xmpp.org/extensions/xep-0029.html#sect-idm45723967532368 JID - [node"@"]domain["/"resource] node - conforming-char[conforming-char]* - The node identifier (optional) domain - hname["."hname]* - The domain identifier (required) resource - any-char[any-char]* - The resource identifier (optional)
newtype ResourceID Source #
Instances
Eq ResourceID Source # | |
Defined in Network.XMPP.Types (==) :: ResourceID -> ResourceID -> Bool # (/=) :: ResourceID -> ResourceID -> Bool # | |
Show ResourceID Source # | |
Defined in Network.XMPP.Types showsPrec :: Int -> ResourceID -> ShowS # show :: ResourceID -> String # showList :: [ResourceID] -> ShowS # |
forall (a :: JIDQualification). SomeJID (JID a) |
data JID :: JIDQualification -> * where Source #
ResourceJID | |
| |
NodeResourceJID | |
| |
NodeJID | |
DomainJID | |
Instances
Eq (JID a) Source # | |
Read (JID 'Resource) Source # | |
Read (JID 'NodeResource) Source # | |
Defined in Network.XMPP.Types readsPrec :: Int -> ReadS (JID 'NodeResource) # readList :: ReadS [JID 'NodeResource] # readPrec :: ReadPrec (JID 'NodeResource) # readListPrec :: ReadPrec [JID 'NodeResource] # | |
Read (JID 'Node) Source # | |
Read (JID 'Domain) Source # | |
Show (JID a) Source # | |
ToMarkup (JID a) Source # | |
Defined in Network.XMPP.Types |
data StreamType Source #
XMPP Stream type, used in stream
pretty-printing combinator and the likes
Client | Client-to-server |
ComponentAccept | FIXME |
ComponentConnect | FIXME |
Instances
Show StreamType Source # | |
Defined in Network.XMPP.Types showsPrec :: Int -> StreamType -> ShowS # show :: StreamType -> String # showList :: [StreamType] -> ShowS # |
data RosterItem Source #
Roster item type (7.1)
RosterItem | |
|
data SubscribtionType Source #
Instances
Eq SubscribtionType Source # | |
Defined in Network.XMPP.Types (==) :: SubscribtionType -> SubscribtionType -> Bool # (/=) :: SubscribtionType -> SubscribtionType -> Bool # | |
Read SubscribtionType Source # | |
Defined in Network.XMPP.Types | |
Show SubscribtionType Source # | |
Defined in Network.XMPP.Types showsPrec :: Int -> SubscribtionType -> ShowS # show :: SubscribtionType -> String # showList :: [SubscribtionType] -> ShowS # |
data MessageType Source #
Instances
Eq MessageType Source # | |
Defined in Network.XMPP.Types (==) :: MessageType -> MessageType -> Bool # (/=) :: MessageType -> MessageType -> Bool # | |
Read MessageType Source # | |
Defined in Network.XMPP.Types readsPrec :: Int -> ReadS MessageType # readList :: ReadS [MessageType] # readPrec :: ReadPrec MessageType # readListPrec :: ReadPrec [MessageType] # | |
Show MessageType Source # | |
Defined in Network.XMPP.Types showsPrec :: Int -> MessageType -> ShowS # show :: MessageType -> String # showList :: [MessageType] -> ShowS # |
data PresenceType Source #
Instances
Eq PresenceType Source # | |
Defined in Network.XMPP.Types (==) :: PresenceType -> PresenceType -> Bool # (/=) :: PresenceType -> PresenceType -> Bool # | |
Read PresenceType Source # | |
Defined in Network.XMPP.Types readsPrec :: Int -> ReadS PresenceType # readList :: ReadS [PresenceType] # | |
Show PresenceType Source # | |
Defined in Network.XMPP.Types showsPrec :: Int -> PresenceType -> ShowS # show :: PresenceType -> String # showList :: [PresenceType] -> ShowS # |
data StanzaPurpose Source #
Generic XMPP stream atom
Instances
Eq StanzaPurpose Source # | |
Defined in Network.XMPP.Types (==) :: StanzaPurpose -> StanzaPurpose -> Bool # (/=) :: StanzaPurpose -> StanzaPurpose -> Bool # | |
Show StanzaPurpose Source # | |
Defined in Network.XMPP.Types showsPrec :: Int -> StanzaPurpose -> ShowS # show :: StanzaPurpose -> String # showList :: [StanzaPurpose] -> ShowS # | |
SingKind StanzaPurpose Source # | |
Defined in Network.XMPP.Types type Demote StanzaPurpose # fromSing :: forall (a :: StanzaPurpose). Sing a -> Demote StanzaPurpose # | |
SingI 'Incoming Source # | |
Defined in Network.XMPP.Types | |
SingI 'Outgoing Source # | |
Defined in Network.XMPP.Types | |
TestEquality (Sing :: StanzaPurpose -> Type) Source # | |
Defined in Network.XMPP.Types | |
Show (Sing 'Incoming) Source # | |
Show (Sing 'Outgoing) Source # | |
data Sing (x :: StanzaPurpose) Source # | |
Defined in Network.XMPP.Types | |
type Demote StanzaPurpose Source # | |
Defined in Network.XMPP.Types |
data SomeStanza e Source #
forall (a :: StanzaType) (p :: StanzaPurpose). SomeStanza (Stanza a p e) |
Instances
Show e => Show (SomeStanza e) Source # | |
Defined in Network.XMPP.Types showsPrec :: Int -> SomeStanza e -> ShowS # show :: SomeStanza e -> String # showList :: [SomeStanza e] -> ShowS # |
type family DataByPurpose (p :: StanzaPurpose) body where ... Source #
DataByPurpose 'Incoming body = Either [Content Posn] body | |
DataByPurpose 'Outgoing body = [Node] |
data Stanza :: StanzaType -> StanzaPurpose -> * -> * where Source #
MkMessage | |
| |
MkPresence | |
| |
MkIQ | |