summaryrefslogtreecommitdiff
path: root/qpid/python/qpid/codec.py
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2007-07-24 14:08:32 +0000
committerGordon Sim <gsim@apache.org>2007-07-24 14:08:32 +0000
commitdc07ee70d71b2347c95a63878ad1ac7fc954f703 (patch)
tree01bf09cdd4add3a6ab86140b356fd88bef034751 /qpid/python/qpid/codec.py
parentcd2d0d3cf3263f5dbf9291d4b755f7fa01c3a798 (diff)
downloadqpid-python-dc07ee70d71b2347c95a63878ad1ac7fc954f703.tar.gz
Some initial 0-10 support including placeholders for new domains, use of execution layer for synchronising methods with no explicit responses and a new set of tests (mainly just copies of the 0-9 ones, but these will be altered as 0-10 support progresses).
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@559055 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/python/qpid/codec.py')
-rw-r--r--qpid/python/qpid/codec.py30
1 files changed, 22 insertions, 8 deletions
diff --git a/qpid/python/qpid/codec.py b/qpid/python/qpid/codec.py
index b615a0f6ed..02b924b6b8 100644
--- a/qpid/python/qpid/codec.py
+++ b/qpid/python/qpid/codec.py
@@ -258,17 +258,9 @@ class Codec:
codec = Codec(enc)
if tbl:
for key, value in tbl.items():
- # Field names MUST start with a letter, '$' or '#' and may
- # continue with letters, '$' or '#', digits, or underlines, to
- # a maximum length of 128 characters.
-
if len(key) > 128:
raise ValueError("field table key too long: '%s'" % key)
- m = Codec.KEY_CHECK.match(key)
- if m == None or m.end() != len(key):
- raise ValueError("invalid field table key: '%s'" % key)
-
codec.encode_shortstr(key)
if isinstance(value, basestring):
codec.write("S")
@@ -338,3 +330,25 @@ class Codec:
return self.decode_longstr()
else:
return ReferenceId(self.decode_longstr())
+
+ # new domains for 0-10:
+
+ def encode_uuid(self, s):
+ self.encode_longstr(s)
+
+ def decode_uuid(self):
+ return self.decode_longstr()
+
+ def encode_rfc1982_long(self, s):
+ self.encode_long(s)
+
+ def decode_rfc1982_long(self):
+ return self.decode_long()
+
+ #Not done yet
+ def encode_rfc1982_long_set(self, s):
+ self.encode_short(0)
+
+ def decode_rfc1982_long_set(self):
+ self.decode_short()
+ return 0;