%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/twisted/words/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/twisted/words/__pycache__/iwords.cpython-312.pyc

�

Ϫ�f�!���ddlmZmZGd�de�ZGd�de�ZGd�de�ZGd�d	e�ZGd
�de�Zgd�Zy
)�)�	Attribute�	Interfacec�&�eZdZdZed�Zd�Zy)�IProtocolPluginz?Interface for plugins providing an interface to a Words servicezHA single word describing what kind of interface this is (eg, irc or web)c��y)abRetrieve a C{twisted.internet.interfaces.IServerFactory} provider

        @param realm: An object providing C{twisted.cred.portal.IRealm} and
        L{IChatService}, with which service information should be looked up.

        @param portal: An object providing C{twisted.cred.portal.IPortal},
        through which logins should be performed.
        N�)�realm�portals  �6/usr/lib/python3/dist-packages/twisted/words/iwords.py�
getFactoryzIProtocolPlugin.getFactory���N)�__name__�
__module__�__qualname__�__doc__r�namerrrrrrs��I��R��D�rrc�B�eZdZed�Zd�Zd	d�Zd�Zd�Zd�Z	d�Z
y)
�IGroupz$A short string, unique among groups.c��y)zLInclude the given user in this group.

        @type user: L{IUser}
        Nr)�users r�addz
IGroup.addr
rNc��y)znRemove the given user from this group.

        @type user: L{IUser}
        @type reason: C{unicode}
        Nr)r�reasons  r�removez
IGroup.remove#r
rc��y)z�Return the number of participants in this group.

        @rtype: L{twisted.internet.defer.Deferred}
        @return: A Deferred which fires with an C{int} representing the
        number of participants in this group.
        Nrrrr�sizezIGroup.size*r
rc��y)aY
        Broadcast the given message from the given sender to other
        users in group.

        The message is not re-transmitted to the sender.

        @param sender: L{IUser}

        @type recipient: L{IGroup}
        @param recipient: This 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.

        @param message: C{dict}

        @rtype: L{twisted.internet.defer.Deferred}
        @return: A Deferred which fires with None when delivery has been
        attempted for all users.
        Nr��sender�	recipient�messages   r�receivezIGroup.receive2r
rc��y)zUChange the metadata associated with this group.

        @type meta: C{dict}
        Nr)�metas r�setMetadatazIGroup.setMetadataGr
rc��y)z.Return an iterator of all users in this group.Nrrrr�	iteruserszIGroup.iterusersMr
r�N)rrrrrrrrr#r&r(rrrrrs+���;�<�D�����*�=rrc�:�eZdZdZed�Zd�Zd�Zd�Zdd�Z	y)	�IChatClientz<Interface through which IChatService interacts with clients.z[A short string, unique among users.  This will be set by the L{IChatService} at login time.c��y)a^
        Callback notifying this user of the given message sent by the
        given user.

        This will be invoked whenever another user sends a message to a
        group this user is participating in, or whenever another user sends
        a message directly to this user.  In the former case, C{recipient}
        will be the group to which the message was sent; in the latter, it
        will be the same object as the user who is receiving the message.

        @type sender: L{IUser}
        @type recipient: L{IUser} or L{IGroup}
        @type message: C{dict}

        @rtype: L{twisted.internet.defer.Deferred}
        @return: A Deferred which fires when the message has been delivered,
        or which fails in some way.  If the Deferred fails and the message
        was directed at a group, this user will be removed from that group.
        Nrrs   rr#zIChatClient.receiveXr
rc��y)z�
        Callback notifying this user that the metadata for the given
        group has changed.

        @type group: L{IGroup}
        @type meta: C{dict}

        @rtype: L{twisted.internet.defer.Deferred}
        Nr)�groupr%s  r�groupMetaUpdatezIChatClient.groupMetaUpdatemr
rc��y)z�
        Callback notifying this user that the given user has joined
        the given group.

        @type group: L{IGroup}
        @type user: L{IUser}

        @rtype: L{twisted.internet.defer.Deferred}
        Nr)r.rs  r�
userJoinedzIChatClient.userJoinedxr
rNc��y)a
        Callback notifying this user that the given user has left the
        given group for the given reason.

        @type group: L{IGroup}
        @type user: L{IUser}
        @type reason: C{unicode}

        @rtype: L{twisted.internet.defer.Deferred}
        Nr)r.rrs   r�userLeftzIChatClient.userLeft�r
rr))
rrrrrrr#r/r1r3rrrr+r+Qs&��F��e��D��*	�	�
rr+c�~�eZdZdZed�Zed�Zed�Zed�Zed�Z	d�Z
d�Zd	�Zd
�Z
d�Zy)
�IUserz;Interface through which clients interact with IChatService.z_A reference to the Realm to which this user belongs.  Set if and only if the user is logged in.z`A reference to the mind which logged in to this user.  Set if and only if the user is logged in.z#A short string, unique among users.zRA POSIX timestamp indicating the time of the last message received from this user.zBA POSIX timestamp indicating this user's most recent sign on time.c��y)z�Invoked by the associated L{IChatService} when login occurs.

        @param realm: The L{IChatService} through which login is occurring.
        @param mind: The mind object used for cred login.
        Nr)r	�minds  r�loggedInzIUser.loggedIn�r
rc��y)z�Send the given message to the given user or group.

        @type recipient: Either L{IUser} or L{IGroup}
        @type message: C{dict}
        Nr)r!r"s  r�sendz
IUser.send�r
rc��y)z|Attempt to join the given group.

        @type group: L{IGroup}
        @rtype: L{twisted.internet.defer.Deferred}
        Nr�r.s r�joinz
IUser.join�r
rc��y)z�Discontinue participation in the given group.

        @type group: L{IGroup}
        @rtype: L{twisted.internet.defer.Deferred}
        Nrr<s r�leavezIUser.leave�r
rc��y)zZ
        Return an iterator of all groups of which this user is a
        member.
        Nrrrr�
itergroupszIUser.itergroups�r
rN)rrrrrr	r7r�lastMessage�signOnr8r:r=r?rArrrr5r5�sc��E��i�
�E��j��D��:�;�D��\��K��L��F�����rr5c�`�eZdZed�Zed�Zed�Zd�Zd�Zd�Z	d�Z
d�Zd	�Zy
)�IChatServicez=A short string identifying this chat service (eg, a hostname)zxA boolean indicating whether L{getGroup} should implicitly create groups which are requested but which do not yet exist.zvA boolean indicating whether L{getUser} should implicitly create users which are requested but which do not yet exist.c��y)z�Return all groups available on this service.

        @rtype: C{twisted.internet.defer.Deferred}
        @return: A Deferred which fires with a list of C{IGroup} providers.
        NrrrrrAzIChatService.itergroups�r
rc��y)a�Retrieve the group by the given name.

        @type name: C{str}

        @rtype: L{twisted.internet.defer.Deferred}
        @return: A Deferred which fires with the group with the given
        name if one exists (or if one is created due to the setting of
        L{IChatService.createGroupOnRequest}, or which fails with
        L{twisted.words.ewords.NoSuchGroup} if no such group exists.
        Nr�rs r�getGroupzIChatService.getGroup�r
rc��y)a2Create a new group with the given name.

        @type name: C{str}

        @rtype: L{twisted.internet.defer.Deferred}
        @return: A Deferred which fires with the created group, or
        with fails with L{twisted.words.ewords.DuplicateGroup} if a
        group by that name exists already.
        NrrHs r�createGroupzIChatService.createGroup�r
rc��y)aERetrieve a group by name.

        Unlike C{getGroup}, this will never implicitly create a group.

        @type name: C{str}

        @rtype: L{twisted.internet.defer.Deferred}
        @return: A Deferred which fires with the group by the given
        name, or which fails with L{twisted.words.ewords.NoSuchGroup}.
        NrrHs r�lookupGroupzIChatService.lookupGroup�r
rc��y)a�Retrieve the user by the given name.

        @type name: C{str}

        @rtype: L{twisted.internet.defer.Deferred}
        @return: A Deferred which fires with the user with the given
        name if one exists (or if one is created due to the setting of
        L{IChatService.createUserOnRequest}, or which fails with
        L{twisted.words.ewords.NoSuchUser} if no such user exists.
        NrrHs r�getUserzIChatService.getUser�r
rc��y)a.Create a new user with the given name.

        @type name: C{str}

        @rtype: L{twisted.internet.defer.Deferred}
        @return: A Deferred which fires with the created user, or
        with fails with L{twisted.words.ewords.DuplicateUser} if a
        user by that name exists already.
        NrrHs r�
createUserzIChatService.createUserr
rN)
rrrrr�createGroupOnRequest�createUserOnRequestrArIrKrMrOrQrrrrErE�sO���T�U�D�$�	H���
$�	G���
�
�	�
�
�	rrE)rr+r5rEN)	�zope.interfacerrrrr+r5rE�__all__rrr�<module>rVsS��
0��i��$4=�Y�4=�n<�)�<�~2�I�2�jL�9�L�^�r

Zerion Mini Shell 1.0