diff options
| author | Darryl L. Pierce <mcpierce@apache.org> | 2013-09-18 20:20:16 +0000 |
|---|---|---|
| committer | Darryl L. Pierce <mcpierce@apache.org> | 2013-09-18 20:20:16 +0000 |
| commit | 40e9c0c1512f74e2e78448f4a3aa2bc0a9271927 (patch) | |
| tree | 16599c2e1b14a24362c7c8c2217678143020a403 /qpid/cpp/bindings | |
| parent | ba6ef5c11a9af345d6015047f6a5f9ec9838b0a2 (diff) | |
| download | qpid-python-40e9c0c1512f74e2e78448f4a3aa2bc0a9271927.tar.gz | |
QPID-5140: Add get/set methods to MessageProperties
Also set MessageProperties instance as the properties value on the
owning Message object.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1524554 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/bindings')
| -rw-r--r-- | qpid/cpp/bindings/qpid/python/ChangeLog | 1 | ||||
| -rw-r--r-- | qpid/cpp/bindings/qpid/python/python.i | 7 |
2 files changed, 8 insertions, 0 deletions
diff --git a/qpid/cpp/bindings/qpid/python/ChangeLog b/qpid/cpp/bindings/qpid/python/ChangeLog index d88a9897fb..875bd99f7c 100644 --- a/qpid/cpp/bindings/qpid/python/ChangeLog +++ b/qpid/cpp/bindings/qpid/python/ChangeLog @@ -1,3 +1,4 @@ Version 0.26: * QPID-4952: Changed the module name to qpid_messaging. + * QPID-5140: Added get/set method to MessageProperties. diff --git a/qpid/cpp/bindings/qpid/python/python.i b/qpid/cpp/bindings/qpid/python/python.i index fdc2bbc4f8..1a22f66921 100644 --- a/qpid/cpp/bindings/qpid/python/python.i +++ b/qpid/cpp/bindings/qpid/python/python.i @@ -313,6 +313,7 @@ QPID_EXCEPTION(UnauthorizedAccess, SessionError) def __init__(self, msg): self.msg = msg self.properties = self.msg.getProperties() + msg.properties = self def __len__(self): return self.properties.__len__() @@ -320,10 +321,16 @@ QPID_EXCEPTION(UnauthorizedAccess, SessionError) def __getitem__(self, key): return self.properties[key]; + def get(self, key): + return self.__getitem__(key) + def __setitem__(self, key, value): self.properties[key] = value self.msg.setProperty(key, value) + def set(self, key, value): + self.__setitem__(key, value) + def __delitem__(self, key): del self.properties[key] self.msg.setProperties(self.properties) |
