t.w.i.IGroup(Interface) : interface documentation

Part of twisted.words.iwords View Source View In Hierarchy

Known implementations: twisted.words.service.Group, twisted.words.service.PBGroupReference

No interface docstring
Attribute name A short string, unique among groups.
Method add Include the given user in this group.
Method remove Remove the given user from this group.
Method size Return the number of participants in this group.
Method receive Broadcast the given message from the given sender to other users in group.
Method setMetadata Change the metadata associated with this group.
Method iterusers Return an iterator of all users in this group.
name =
A short string, unique among groups.
def add(user): (source)
Include the given user in this group.
Parametersuser (type: IUser )
def remove(user, reason=None): (source)
Remove the given user from this group.
Parametersuser (type: IUser )
reason (type: unicode )
def size(): (source)
Return the number of participants in this group.
ReturnsA Deferred which fires with an int representing the the number of participants in this group. (type: twisted.internet.defer.Deferred )
def receive(sender, recipient, message): (source)

Broadcast the given message from the given sender to other users in group.

The message is not re-transmitted to the sender.
ParameterssenderIUser
recipientThis is probably a wart. Maybe it will be removed in the future. For now, it should be the group object the message is being delivered to. (type: IGroup )
messagedict
ReturnsA Deferred which fires with None when delivery has been attempted for all users. (type: twisted.internet.defer.Deferred )
def setMetadata(meta): (source)
Change the metadata associated with this group.
Parametersmeta (type: dict )
def iterusers(): (source)
Return an iterator of all users in this group.
API Documentation for Twisted, generated by pydoctor at 2011-10-27 16:17:34.