Safe Haskell | None |
---|
Network.PushNotify.Mpns
Description
This library defines an API for communicating with WPhone powered devices, sending Push Notifications through Microsoft Push Notification Service.
- sendMPNS :: Manager -> MPNSConfig -> MPNSmessage -> IO MPNSresult
- data MPNSConfig = MPNSConfig {}
- type DeviceURI = Text
- data MPNSType
- data MPNSInterval
- data MPNSmessage = MPNSmessage {}
- data MPNSresult = MPNSresult {}
- data MPNSinfo = MPNSinfo {}
- data MPNSnotifStatus
- = Received
- | Dropped
- | QueueFull
- | Suppressed
- data MPNSsubStatus
- data MPNSconStatus
MPNS Service
sendMPNS :: Manager -> MPNSConfig -> MPNSmessage -> IO MPNSresultSource
sendMPNS
sends the message to a MPNS Server.
MPNS Settings
data MPNSConfig Source
MPNSConfig
represents the main necessary information for sending notifications through MPNS.
If it is not necessary a secure connection, the default value can be used.
For loading the certificate and privateKey you can use: fileReadCertificate
and fileReadPrivateKey
.
Constructors
MPNSConfig | |
Fields
|
Instances
MPNS Messages
MPNSType
represents the three different kind of notifications.
data MPNSInterval Source
MPNSType
represents the batching interval.
Constructors
Immediate | Immediate delivery. |
Sec450 | Delivered within 450 seconds. |
Sec900 | Delivered within 900 seconds. |
Instances
data MPNSmessage Source
MPNSmessage
represents a message to be sent through MPNS.
Constructors
MPNSmessage | |
Fields
|
Instances
MPNS Result
data MPNSresult Source
MPNSresult
represents information about messages after a communication with MPNS Servers.
Take into account that a successful result after communicating with MPNS servers does not mean that the notification was successfully sent. It is necessary to check the MPNSinfo
, provided by the servers, to really know about the state of the notification.
Constructors
MPNSresult | |
Fields
|
Instances
MPNSinfo
represents information about a specific notification and device, after a communication with MPNS Servers.
Constructors
MPNSinfo | |
data MPNSnotifStatus Source
MPNSnotifStatus
represents the status of a notification which has been sent.
Constructors
Received | |
Dropped | |
QueueFull | |
Suppressed |
Instances
data MPNSconStatus Source
MPNSconStatus
represents the status of a connection.
Constructors
Connected | |
InActive | |
Disconnected | |
TempDisconnected |
Instances