diff --git a/src/dbus_fast/aio/proxy_object.py b/src/dbus_fast/aio/proxy_object.py index 5a260b09..83c446b8 100644 --- a/src/dbus_fast/aio/proxy_object.py +++ b/src/dbus_fast/aio/proxy_object.py @@ -3,9 +3,9 @@ from .. import introspection as intr from .._private.util import replace_fds_with_idx, replace_idx_with_fds -from ..constants import ErrorType +from ..constants import ErrorType, MessageFlag from ..errors import DBusError -from ..message import Message, MessageFlag +from ..message import Message from ..message_bus import BaseMessageBus from ..proxy_object import BaseProxyInterface, BaseProxyObject from ..signature import Variant diff --git a/src/dbus_fast/message.pxd b/src/dbus_fast/message.pxd index 27067339..21e35c25 100644 --- a/src/dbus_fast/message.pxd +++ b/src/dbus_fast/message.pxd @@ -3,21 +3,45 @@ import cython +cdef object ErrorType +cdef object SignatureTree +cdef object SignatureType +cdef object MessageType +cdef object Variant +cdef object Marshaller + + +cdef object HEADER_PATH +cdef object HEADER_INTERFACE +cdef object HEADER_MEMBER +cdef object HEADER_ERROR_NAME +cdef object HEADER_REPLY_SERIAL +cdef object HEADER_DESTINATION +cdef object HEADER_SENDER +cdef object HEADER_SIGNATURE +cdef object HEADER_UNIX_FDS + + +cdef object LITTLE_ENDIAN +cdef object PROTOCOL_VERSION + +cdef get_signature_tree + cdef class Message: - cdef public str destination - cdef public str path - cdef public str interface - cdef public str member + cdef public object destination + cdef public object path + cdef public object interface + cdef public object member cdef public object message_type cdef public object flags - cdef public str error_name + cdef public object error_name cdef public unsigned int reply_serial - cdef public str sender - cdef public list unix_fds - cdef public str signature + cdef public object sender + cdef public object unix_fds + cdef public object signature cdef public object signature_tree - cdef public list body + cdef public object body cdef public unsigned int serial cpdef _marshall(self, bint negotiate_unix_fd) diff --git a/src/dbus_fast/message.py b/src/dbus_fast/message.py index b123c0db..768973d9 100644 --- a/src/dbus_fast/message.py +++ b/src/dbus_fast/message.py @@ -266,33 +266,21 @@ def _marshall(self, negotiate_unix_fd: bool) -> bytearray: # Variant is invalid. if self.path: - fields.append([HEADER_PATH, Variant("o", self.path, verify=False)]) + fields.append([HEADER_PATH, Variant("o", self.path, False)]) if self.interface: - fields.append( - [HEADER_INTERFACE, Variant("s", self.interface, verify=False)] - ) + fields.append([HEADER_INTERFACE, Variant("s", self.interface, False)]) if self.member: - fields.append([HEADER_MEMBER, Variant("s", self.member, verify=False)]) + fields.append([HEADER_MEMBER, Variant("s", self.member, False)]) if self.error_name: - fields.append( - [HEADER_ERROR_NAME, Variant("s", self.error_name, verify=False)] - ) + fields.append([HEADER_ERROR_NAME, Variant("s", self.error_name, False)]) if self.reply_serial: - fields.append( - [HEADER_REPLY_SERIAL, Variant("u", self.reply_serial, verify=False)] - ) + fields.append([HEADER_REPLY_SERIAL, Variant("u", self.reply_serial, False)]) if self.destination: - fields.append( - [HEADER_DESTINATION, Variant("s", self.destination, verify=False)] - ) + fields.append([HEADER_DESTINATION, Variant("s", self.destination, False)]) if self.signature: - fields.append( - [HEADER_SIGNATURE, Variant("g", self.signature, verify=False)] - ) + fields.append([HEADER_SIGNATURE, Variant("g", self.signature, False)]) if self.unix_fds and negotiate_unix_fd: - fields.append( - [HEADER_UNIX_FDS, Variant("u", len(self.unix_fds), verify=False)] - ) + fields.append([HEADER_UNIX_FDS, Variant("u", len(self.unix_fds), False)]) header_body = [ LITTLE_ENDIAN,