# Path: servicebus/pika/amqp_object.py
# class AMQPObject(object):
# class Class(AMQPObject):
# class Method(AMQPObject):
# class Properties(AMQPObject):
#     NAME = 'AMQPObject'
#     INDEX = None
#     NAME = 'Unextended Class'
#     NAME = 'Unextended Method'
#     NAME = 'Unextended Properties'
#     def __repr__(self):
#     def _set_content(self, properties, body):
#     def get_properties(self):
#     def get_body(self):
# 
# Path: servicebus/pika/data.py
# def encode_short_string(pieces, value):
#     def decode_short_string(encoded, offset):
#     def decode_short_string(encoded, offset):
# def encode_table(pieces, table):
# def encode_value(pieces, value):
# def decode_table(encoded, offset):
# def decode_value(encoded, offset):


import struct
from servicebus.pika import amqp_object
from servicebus.pika import data
from servicebus.pika.compat import str_or_bytes, unicode_type
        while True:
            partial_flags = struct.unpack_from('>H', encoded, offset)[0]
            offset += 2
            flags = flags | (partial_flags << (flagword_index * 16))
            if not (partial_flags & 1):
                break
            flagword_index += 1
        if flags & BasicProperties.FLAG_CONTENT_TYPE:
            self.content_type, offset = data.decode_short_string(encoded, offset)
        else:
            self.content_type = None
        if flags & BasicProperties.FLAG_CONTENT_ENCODING:
            self.content_encoding, offset = data.decode_short_string(encoded, offset)
        else:
            self.content_encoding = None
        if flags & BasicProperties.FLAG_HEADERS:
            (self.headers, offset) = data.decode_table(encoded, offset)
        else:
            self.headers = None
        if flags & BasicProperties.FLAG_DELIVERY_MODE:
            self.delivery_mode = struct.unpack_from('B', encoded, offset)[0]
            offset += 1
        else:
            self.delivery_mode = None
        if flags & BasicProperties.FLAG_PRIORITY:
            self.priority = struct.unpack_from('B', encoded, offset)[0]
            offset += 1
        else:
            self.priority = None
        if flags & BasicProperties.FLAG_CORRELATION_ID:

# Path: servicebus/pika/amqp_object.py
# class AMQPObject(object):
# class Class(AMQPObject):
# class Method(AMQPObject):
# class Properties(AMQPObject):
#     NAME = 'AMQPObject'
#     INDEX = None
#     NAME = 'Unextended Class'
#     NAME = 'Unextended Method'
#     NAME = 'Unextended Properties'
#     def __repr__(self):
#     def _set_content(self, properties, body):
#     def get_properties(self):
#     def get_body(self):
# 
# Path: servicebus/pika/data.py
# def encode_short_string(pieces, value):
#     def decode_short_string(encoded, offset):
#     def decode_short_string(encoded, offset):
# def encode_table(pieces, table):
# def encode_value(pieces, value):
# def decode_table(encoded, offset):
# def decode_value(encoded, offset):


# Path: servicebus/pika/spec.py
import struct
from servicebus.pika import amqp_object
from servicebus.pika import data
from servicebus.pika.compat import str_or_bytes, unicode_type

        while True:
            partial_flags = struct.unpack_from('>H', encoded, offset)[0]
            offset += 2
            flags = flags | (partial_flags << (flagword_index * 16))
            if not (partial_flags & 1):
                break
            flagword_index += 1
        if flags & BasicProperties.FLAG_CONTENT_TYPE:
            self.content_type, offset = data.decode_short_string(encoded, offset)
        else:
            self.content_type = None
        if flags & BasicProperties.FLAG_CONTENT_ENCODING:
            self.content_encoding, offset = data.decode_short_string(encoded, offset)
        else:
            self.content_encoding = None
        if flags & BasicProperties.FLAG_HEADERS:
            (self.headers, offset) = data.decode_table(encoded, offset)
        else:
            self.headers = None
        if flags & BasicProperties.FLAG_DELIVERY_MODE:
            self.delivery_mode = struct.unpack_from('B', encoded, offset)[0]
            offset += 1
        else:
            self.delivery_mode = None
        if flags & BasicProperties.FLAG_PRIORITY:
            self.priority = struct.unpack_from('B', encoded, offset)[0]
            offset += 1
        else:
            self.priority = None
        if flags & BasicProperties.FLAG_CORRELATION_ID:

            self.correlation_id, offset = data.decode_short_string(encoded, offset)