Package groupthink :: Module groupthink_base :: Class UserDict
[hide private]
[frames] | no frames]

Class UserDict

source code

                      object --+        
                               |        
                      ??.GObject --+    
                                   |    
                  object --+       |    
                           |       |    
      dbus.service.Interface --+   |    
                               |   |    
             dbus.service.Object --+    
                                   |    
dbus.gobject_service.ExportedGObject --+
                                       |
                                      UserDict

UserDict is UNTESTED and almost certainly DOES NOT WORK.

UserDict provides a dictionary mapping unique users to values. Each user is only permitted to modify the value associated with herself. Therefore, UserDict is automatically coherent by construction.

Nested Classes [hide private]

Inherited from dbus.gobject_service.ExportedGObject: __metaclass__

Instance Methods [hide private]
 
__init__(self, name, tubebox, myval, translator=<function empty_translator at 0x857b5a4>)
Initialize an exported GObject.
source code
 
set_tube(self, tube, is_initiator)
Callback for the TubeBox
source code
 
get_path(self)
Returns the DBus path of this handler.
source code
 
get_tube(self)
Returns the TubeBox used to create this handler.
source code
 
send_value(self, *args, **keywords)
This method broadcasts message to all other handlers for this UO
 
ask_values(self, *args, **keywords)
 
tell_value(self, sender=None) source code
 
receive_value(self, value, sender=None) source code
 
members_changed(self, added, removed) source code

Inherited from unreachable.GObject: __cmp__, __copy__, __deepcopy__, __delattr__, __gdoc__, __gobject_init__, __hash__, __new__, __repr__, __setattr__, chain, connect, connect_after, connect_object, connect_object_after, disconnect, disconnect_by_func, emit, emit_stop_by_name, freeze_notify, get_data, get_properties, get_property, handler_block, handler_block_by_func, handler_disconnect, handler_is_connected, handler_unblock, handler_unblock_by_func, notify, props, set_data, set_properties, set_property, stop_emission, thaw_notify, weak_ref

Inherited from dbus.service.Object: Introspect, __str__, add_to_connection, remove_from_connection

Inherited from dbus.service.Object (private): _message_cb, _unregister_cb

Inherited from object: __getattribute__, __reduce__, __reduce_ex__

Class Variables [hide private]
  IFACE = 'org.dobject.UserDict'
  BASEPATH = '/org/dobject/UserDict/'

Inherited from unreachable.GObject: __gtype__

Inherited from dbus.service.Object: SUPPORTS_MULTIPLE_CONNECTIONS, SUPPORTS_MULTIPLE_OBJECT_PATHS

Inherited from dbus.service.Interface (private): _dbus_class_table

Instance Variables [hide private]

Inherited from dbus.service.Object (private): _connection, _fallback, _locations, _locations_lock, _object_path

Properties [hide private]

Inherited from unreachable.GObject: __grefcount__

Inherited from dbus.service.Object: __dbus_object_path__, connection, locations

Inherited from object: __class__

Method Details [hide private]

__init__(self, name, tubebox, myval, translator=<function empty_translator at 0x857b5a4>)
(Constructor)

source code 
Initialize an exported GObject.

:Parameters:
    `conn` : dbus.connection.Connection
        The D-Bus connection or bus
    `object_path` : str
        The object path at which to register this object.
:Keywords:
    `bus_name` : dbus.service.BusName
        A bus name to be held on behalf of this object, or None.
    `gobject_properties` : dict
        GObject properties to be set on the constructed object.

        Any unrecognised keyword arguments will also be interpreted
        as GObject properties.
    

Parameters:
  • conn - The connection on which to export this object.

    If None, use the Bus associated with the given bus_name. If there is no bus_name either, the object is not initially available on any Connection.

    For backwards compatibility, if an instance of dbus.service.BusName is passed as the first parameter, this is equivalent to passing its associated Bus as conn, and passing the BusName itself as bus_name.

  • object_path - A D-Bus object path at which to make this Object available immediately. If this is not None, a conn or bus_name must also be provided.
  • bus_name - Represents a well-known name claimed by this process. A reference to the BusName object will be held by this Object, preventing the name from being released during this Object's lifetime (unless it's released manually).
Overrides: object.__init__
(inherited documentation)

get_path(self)

source code 

Returns the DBus path of this handler. The path is the closest thing to a unique identifier for each abstract DObject.

get_tube(self)

source code 

Returns the TubeBox used to create this handler. This method is necessary if one DObject wishes to create another.

send_value(self, *args, **keywords)

 
This method broadcasts message to all other handlers for this UO
Decorators:
  • @dbus.service.signal(dbus_interface= IFACE, signature= 'v')

ask_values(self, *args, **keywords)

 
Decorators:
  • @dbus.service.signal(dbus_interface= IFACE, signature= '')

receive_value(self, value, sender=None)

source code 
Decorators:
  • @dbus.service.method(dbus_interface= IFACE, in_signature= 'v', out_signature= '', sender_keyword= 'sender')