Safe Haskell | None |
---|
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
.
MPNSConfig | |
|
MPNS Messages
MPNSType
represents the three different kind of notifications.
data MPNSInterval Source
MPNSType
represents the batching interval.
data MPNSmessage Source
MPNSmessage
represents a message to be sent through MPNS.
MPNSmessage | |
|
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.
MPNSresult | |
|
MPNSinfo
represents information about a specific notification and device, after a communication with MPNS Servers.
data MPNSnotifStatus Source
MPNSnotifStatus
represents the status of a notification which has been sent.
data MPNSsubStatus Source
MPNSsubStatus
represents the status of a subscription.
data MPNSconStatus Source
MPNSconStatus
represents the status of a connection.