packages feed

amqp 0.2 → 0.2.1

raw patch · 2 files changed

+13/−13 lines, 2 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

+ Network.AMQP: msgReplyTo :: Message -> Maybe String
- Network.AMQP: Message :: ByteString -> Maybe DeliveryMode -> Maybe Timestamp -> Maybe String -> Maybe String -> Message
+ Network.AMQP: Message :: ByteString -> Maybe DeliveryMode -> Maybe Timestamp -> Maybe String -> Maybe String -> Maybe String -> Message

Files

Network/AMQP.hs view
@@ -338,7 +338,7 @@             (fmap deliveryModeToInt $ msgDeliveryMode msg) -- delivery_mode              Nothing             Nothing-            Nothing+            (fmap ShortString $ msgReplyTo msg)             Nothing             (fmap ShortString $ msgID msg)             (msgTimestamp msg)@@ -479,13 +479,14 @@                 msgDeliveryMode :: Maybe DeliveryMode, -- ^ see 'DeliveryMode'                 msgTimestamp :: Maybe Timestamp, -- ^ use in any way you like; this doesn't affect the way the message is handled                 msgID :: Maybe String, -- ^ use in any way you like; this doesn't affect the way the message is handled-                msgContentType :: Maybe String                +                msgContentType :: Maybe String,+                msgReplyTo :: Maybe String                 }     deriving Show  -- | a 'Msg' with defaults set; you should override at least 'msgBody' newMsg :: Message    -newMsg = Message (BL.empty) Nothing Nothing Nothing Nothing+newMsg = Message (BL.empty) Nothing Nothing Nothing Nothing Nothing  ------------- ASSEMBLY -------------------------     -- an assembly is a higher-level object consisting of several frames (like in amqp 0-10)@@ -724,16 +725,15 @@ msgFromContentHeaderProperties      (CHBasic content_type content_encoding headers delivery_mode priority correlation_id reply_to expiration              message_id timestamp typ user_id app_id cluster_id) msgBody = -    let msgId = -            case message_id of -                (Just (ShortString s)) -> Just s-                _ -> Nothing-        contentType =-            case content_type of-                (Just (ShortString s)) -> Just s-                _ -> Nothing+    let msgId = fromShortString message_id+        contentType = fromShortString content_type+        replyTo = fromShortString reply_to+                 in-            Message msgBody (fmap intToDeliveryMode delivery_mode) timestamp msgId contentType+            Message msgBody (fmap intToDeliveryMode delivery_mode) timestamp msgId contentType replyTo+  where+    fromShortString (Just (ShortString s)) = Just s+    fromShortString _ = Nothing      -- | The thread that is run for every channel channelReceiver :: Channel -> IO ()
amqp.cabal view
@@ -1,5 +1,5 @@ Name:                amqp
-Version:             0.2
+Version:             0.2.1
 Synopsis:            Client library for AMQP servers (currently only RabbitMQ)
 Description:         Client library for AMQP servers (currently only RabbitMQ)
 License:             BSD3