[prev in list] [next in list] [prev in thread] [next in thread]
List: pyamf-commits
Subject: [pyamf-commits] r91 - branches/remoting-2/pyamf
From: pyamf-commits () collab ! com (pyamf-commits () collab ! com)
Date: 2007-10-29 17:18:49
Message-ID: 20071029161842.C231F7BC069 () mail ! collab ! com
[Download RAW message or body]
Author: nick
Date: 2007-10-29 17:18:42 +0100 (Mon, 29 Oct 2007)
New Revision: 91
Modified:
branches/remoting-2/pyamf/__init__.py
branches/remoting-2/pyamf/messaging.py
Log:
Fixes some issues with previous commit
Modified: branches/remoting-2/pyamf/__init__.py
===================================================================
--- branches/remoting-2/pyamf/__init__.py 2007-10-29 16:14:43 UTC (rev 90)
+++ branches/remoting-2/pyamf/__init__.py 2007-10-29 16:18:42 UTC (rev 91)
@@ -42,6 +42,18 @@
ENCODING_TYPES = (AMF0, AMF3)
+class ClientTypes:
+ # Specifies a Flash Player 6.0 - 8.0 client.
+ Flash = 0
+ # Specifies a FlashCom / Flash Media Server client.
+ FlashCom = 1
+ # Specifies a Flash Player 9.0 client.
+ Flash9 = 3
+
+CLIENT_TYPES = set(
+ ClientTypes.__dict__[x] for x in ClientTypes.__dict__
+ if not x.startswith('_'))
+
class GeneralTypes:
"""
PyAMF global constants
Modified: branches/remoting-2/pyamf/messaging.py
===================================================================
--- branches/remoting-2/pyamf/messaging.py 2007-10-29 16:14:43 UTC (rev 90)
+++ branches/remoting-2/pyamf/messaging.py 2007-10-29 16:18:42 UTC (rev 91)
@@ -30,18 +30,6 @@
import pyamf
from pyamf import util
-class ClientTypes:
- # Specifies a Flash Player 6.0 - 8.0 client.
- Flash = 0
- # Specifies a FlashCom / Flash Media Server client.
- FlashCom = 1
- # Specifies a Flash Player 9.0 client.
- Flash9 = 3
-
-CLIENT_TYPES = set(
- ClientTypes.__dict__[x] for x in ClientTypes.__dict__
- if not x.startswith('_'))
-
class Envelope(object):
_amf_version = None
_client_type = None
@@ -64,7 +52,7 @@
return self._amf_version
def _set_amf_version(self, version):
- if not version in (AMF0, AMF3):
+ if not version in pyamf.ENCODING_TYPES:
raise ValueError("Unknown version %s" % str(version))
self._amf_version = version
@@ -73,7 +61,7 @@
return self._client_type
def _set_client_type(self, type):
- if not type in CLIENT_TYPES:
+ if not type in pyamf.CLIENT_TYPES:
raise ValueError("Unknown client type %s" % str(version))
amfVersion = property(_get_amf_version, _set_amf_version)
@@ -95,21 +83,21 @@
return "<Body target=%(target)s response=%(response)s>\n %(data)s\n </Body>" % (self.__dict__)
def _get_amf_decoder(version):
- if version == AMF0:
+ if version == pyamf.AMF0:
import pyamf.amf0
return pyamf.amf0.Parser
- elif version == AMF3:
+ elif version == pyamf.AMF3:
import pyamf.amf3
return pyamf.amf3.Parser
def _get_amf_encoder(version):
- if version == AMF0:
+ if version == pyamf.AMF0:
import pyamf.amf0
return pyamf.amf0.Encoder
- elif version == AMF3:
+ elif version == pyamf.AMF3:
import pyamf.amf3
return pyamf.amf3.Encoder
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic