# Path: src/txamqp/spec.py
# def pythonize(name):
#     name = str(name)
#     for key, val in REPLACE.items():
#         name = name.replace(key, val)
#     try:
#         name = KEYWORDS[name]
#     except KeyError:
#         pass
#     return name


from io import BytesIO
from twisted.python import log
from six import with_metaclass
from . import codec
from .spec import pythonize
#   http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied.  See the License for the
# specific language governing permissions and limitations
# under the License.
#




class Frame(object):
    METHOD = "frame_method"
    HEADER = "frame_header"
    BODY = "frame_body"
    OOB_METHOD = "frame_oob_method"
    OOB_HEADER = "frame_oob_header"
    OOB_BODY = "frame_oob_body"
    TRACE = "frame_trace"
    HEARTBEAT = "frame_heartbeat"

    DECODERS = {}

    def __init__(self, channel, payload):
        self.channel = channel
        self.payload = payload

    def __str__(self):

# Path: src/txamqp/spec.py
# def pythonize(name):
#     name = str(name)
#     for key, val in REPLACE.items():
#         name = name.replace(key, val)
#     try:
#         name = KEYWORDS[name]
#     except KeyError:
#         pass
#     return name


# Path: src/txamqp/connection.py
from io import BytesIO
from twisted.python import log
from six import with_metaclass
from . import codec
from .spec import pythonize

#   http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied.  See the License for the
# specific language governing permissions and limitations
# under the License.
#




class Frame(object):
    METHOD = "frame_method"
    HEADER = "frame_header"
    BODY = "frame_body"
    OOB_METHOD = "frame_oob_method"
    OOB_HEADER = "frame_oob_header"
    OOB_BODY = "frame_oob_body"
    TRACE = "frame_trace"
    HEARTBEAT = "frame_heartbeat"

    DECODERS = {}

    def __init__(self, channel, payload):
        self.channel = channel
        self.payload = payload

    def __str__(self):

        return "[%d] %s" % (self.channel, self.payload)