pubsub-0.10: Web/PubSub/Types.hs
--------------------------------------------------------------------
-- |
-- Module : Web.PubSub.Types
-- Copyright : (c) Sigbjorn Finne, 2009
-- License : BSD3
--
-- Maintainer: Sigbjorn Finne <sof@forkIO.com>
-- Stability : provisional
-- Portability: so-so
--
-- Basic types and defs behind the PubSubHub protocol.
--
module Web.PubSub.Types where
import Web.Types
data HubLink
= HubLink
{ linkURL :: URLString
} deriving ( Show )
-- | @Subscribe@ represents both subscribe and subscribe requests.
--
data Subscribe
= Subscribe
{ subMode :: Bool -- True => subscribe; False => ...
, subCallback :: URLString -- the local endpoint
, subTopic :: URLString -- the URL you are subscribing to.
, subVerify :: [VerifyMode]
, subVerifyToken :: Maybe VerifyToken
, subLeaseSecs :: Maybe Integer
}
data VerifyMode = VerifySync Bool -- False => async.
type VerifyToken = String