Permalink
Browse files

updated to latest XML and made content descriptors ulongs

  • Loading branch information...
1 parent 1845c8f commit dd4476b63bea2500d7d4c41bd66c395a54755a83 @rhs committed Jun 17, 2011
Showing with 11 additions and 6 deletions.
  1. +4 −4 messaging.py
  2. +7 −2 messaging.xml
View
@@ -60,16 +60,16 @@ def encode(message):
# XXX: should dispatch
if isinstance(message.content, str):
encoded += encoder.encode(Value("binary", message.content,
- Value("long", 0x75)))
+ Value("ulong", 0x75)))
elif isinstance(message.content, unicode):
encoded += encoder.encode(Value("string", message.content,
- Value("long", 0x76)))
+ Value("ulong", 0x76)))
elif isinstance(message.content, dict):
encoded += encoder.encode(Value("map", message.content,
- Value("long", 0x78)))
+ Value("ulong", 0x78)))
else:
encoded += encoder.encode(Value("list", [message.content],
- Value("long", 0x77)))
+ Value("ulong", 0x77)))
if message.footer:
encoded += encoder.encode(message.footer)
return encoded
View
@@ -127,7 +127,7 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
<descriptor name="amqp:source:list" code="0x00000000:0x00000028"/>
<field name="options" type="options"/>
<field name="address" type="*" requires="address"/>
- <field name="durable" type="boolean"/>
+ <field name="durable" type="terminus-durability" default="none"/>
<field name="expiry-policy" type="terminus-expiry-policy" default="session"/>
<field name="timeout" type="seconds" default="0"/>
<field name="dynamic" type="boolean"/>
@@ -142,13 +142,18 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
<descriptor name="amqp:target:list" code="0x00000000:0x00000029"/>
<field name="options" type="options"/>
<field name="address" type="*" requires="address"/>
- <field name="durable" type="boolean"/>
+ <field name="durable" type="terminus-durability" default="none"/>
<field name="expiry-policy" type="terminus-expiry-policy" default="session"/>
<field name="timeout" type="seconds" default="0"/>
<field name="dynamic" type="boolean"/>
<field name="dynamic-node-properties" type="node-properties"/>
<field name="capabilities" type="symbol" multiple="true"/>
</type>
+ <type name="terminus-durability" class="restricted" source="uint">
+ <choice name="none" value="0"/>
+ <choice name="configuration" value="1"/>
+ <choice name="unsettled-state" value="2"/>
+ </type>
<type name="terminus-expiry-policy" class="restricted" source="symbol">
<choice name="link-detach" value="link-detach"/>
<choice name="session-end" value="session-end"/>

0 comments on commit dd4476b

Please sign in to comment.