__all__ = [
"AccessibleObjectNoLongerExists",
+ "AccessibleObjectNotAvailable",
"Enum",
"BaseProxy",
+ "_repack_tuple",
]
class AccessibleObjectNoLongerExists(Exception):
pass
+class AccessibleObjectNotAvailable(Exception):
+ pass
+
+#------------------------------------------------------------------------------
+
+def _repack_tuple (tup):
+ """
+ Re-packs a tuple moving the last element to the beginning.
+ """
+ return (tup[-1] ,) + tup[:-1]
+
#------------------------------------------------------------------------------
-class Enum(int):
+class Enum(dbus.UInt32):
def __str__(self):
return self._enum_lookup[int(self)]
+ def __eq__(self, other):
+ if other is None:
+ return False
+ if int(self) == int(other):
+ return True
+ else:
+ return False
+
+ def __hash__(self):
+ return int(self)
+
#------------------------------------------------------------------------------
def __ne__(self, other):
return not self.__eq__(other)
+ def __hash__(self):
+ return hash(self._app_name + self._acc_path)
+
def get_dbus_method(self, *args, **kwargs):
method = self._dbus_object.get_dbus_method(*args, **kwargs)
"%s not supported by accessible object at path %s"
% (interface, self._acc_path))
+ def flushCache(self):
+ pass
+
#END----------------------------------------------------------------------------