§
    ÉtºfŸ!  ã                   óª   — d dl mZmZ  G d„ de¦  «        Z G d„ de¦  «        Z G d„ de¦  «        Z G d„ d	e¦  «        Z G d
„ de¦  «        Zg d¢ZdS )é    )Ú	AttributeÚ	Interfacec                   ó.   — e Zd ZdZ ed¦  «        Zd„ ZdS )Ú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                 ó   — dS )ab  Retrieve 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     úS/var/www/surfInsights/venv3-11/lib/python3.11/site-packages/twisted/words/iwords.pyÚ
getFactoryzIProtocolPlugin.getFactory   ó   € € € ó    N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   Únamer   r   r   r   r   r      s=   € € € € € ØIÐIàˆ9ØRñô €Dðð ð ð ð r   r   c                   óJ   — e Zd Z ed¦  «        Zd„ Zd	d„Zd„ Zd„ Zd„ Z	d„ Z
dS )
ÚIGroupz$A short string, unique among groups.c                 ó   — dS )zLInclude the given user in this group.

        @type user: L{IUser}
        Nr   )Úusers    r   Úaddz
IGroup.add   r   r   Nc                 ó   — dS )znRemove the given user from this group.

        @type user: L{IUser}
        @type reason: C{unicode}
        Nr   )r   Úreasons     r   ÚremovezIGroup.remove#   r   r   c                  ó   — dS )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.
        Nr   r   r   r   ÚsizezIGroup.size*   r   r   c                 ó   — dS )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   ÚreceivezIGroup.receive2   r   r   c                 ó   — dS )zUChange the metadata associated with this group.

        @type meta: C{dict}
        Nr   )Úmetas    r   ÚsetMetadatazIGroup.setMetadataG   r   r   c                  ó   — dS )z.Return an iterator of all users in this group.Nr   r   r   r   Ú	iteruserszIGroup.iterusersM   r   r   ©N)r   r   r   r   r   r   r   r   r#   r&   r(   r   r   r   r   r      sƒ   € € € € € Øˆ9Ð;Ñ<Ô<€Dðð ð ðð ð ð ðð ð ðð ð ð*ð ð ð=ð =ð =ð =ð =r   r   c                   óB   — e Zd ZdZ ed¦  «        Zd„ Zd„ Zd„ Zdd„Z	dS )	Ú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                 ó   — dS )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.
        Nr   r   s      r   r#   zIChatClient.receiveX   r   r   c                 ó   — dS )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   ÚgroupMetaUpdatezIChatClient.groupMetaUpdatem   r   r   c                 ó   — dS )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.   r   s     r   Ú
userJoinedzIChatClient.userJoinedx   r   r   Nc                 ó   — dS )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.   r   r   s      r   ÚuserLeftzIChatClient.userLeftƒ   r   r   r)   )
r   r   r   r   r   r   r#   r/   r1   r3   r   r   r   r+   r+   Q   so   € € € € € ØFÐFàˆ9Øeñô €Dðð ð ð*	ð 	ð 	ð	ð 	ð 	ð
ð 
ð 
ð 
ð 
ð 
r   r+   c                   óž   — e Zd ZdZ ed¦  «        Z ed¦  «        Z ed¦  «        Z ed¦  «        Z ed¦  «        Z	d„ Z
d„ Zd	„ Zd
„ Zd„ ZdS )Ú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                 ó   — dS )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   ÚloggedInzIUser.loggedIn¢   r   r   c                 ó   — dS )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   r   c                 ó   — dS )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   r   c                 ó   — dS )z‰Discontinue participation in the given group.

        @type group: L{IGroup}
        @rtype: L{twisted.internet.defer.Deferred}
        Nr   r<   s    r   ÚleavezIUser.leave·   r   r   c                  ó   — dS )zZ
        Return an iterator of all groups of which this user is a
        member.
        Nr   r   r   r   Ú
itergroupszIUser.itergroups¾   r   r   N)r   r   r   r   r   r	   r7   r   ÚlastMessageÚsignOnr8   r:   r=   r?   rA   r   r   r   r5   r5   �   sË   € € € € € ØEÐEàˆIØiñô €Eð ˆ9Øjñô €Dð ˆ9Ð:Ñ;Ô;€Dà�)Ø\ñô €Kð ˆYØLñô €Fðð ð ðð ð ðð ð ðð ð ðð ð ð ð r   r5   c                   ót   — e Zd Z ed¦  «        Z ed¦  «        Z ed¦  «        Zd„ Zd„ Zd„ Z	d„ Z
d„ Zd	„ Zd
S )Ú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                  ó   — dS )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.
        Nr   r   r   r   rA   zIChatService.itergroupsÒ   r   r   c                 ó   — dS )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   ©r   s    r   ÚgetGroupzIChatService.getGroupÙ   r   r   c                 ó   — dS )a2  Create 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.
        Nr   rH   s    r   ÚcreateGroupzIChatService.createGroupå   r   r   c                 ó   — dS )aE  Retrieve 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}.
        Nr   rH   s    r   ÚlookupGroupzIChatService.lookupGroupð   r   r   c                 ó   — dS )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.
        Nr   rH   s    r   ÚgetUserzIChatService.getUserü   r   r   c                 ó   — dS )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.
        Nr   rH   s    r   Ú
createUserzIChatService.createUser  r   r   N)r   r   r   r   r   ÚcreateGroupOnRequestÚcreateUserOnRequestrA   rI   rK   rM   rO   rQ   r   r   r   rE   rE   Å   s°   € € € € € Øˆ9ÐTÑUÔU€Dà$˜9ð	Hñô Ðð
 $˜)ð	Gñô Ðð
ð ð ð
ð 
ð 
ð	ð 	ð 	ð
ð 
ð 
ð
ð 
ð 
ð	ð 	ð 	ð 	ð 	r   rE   )r   r+   r5   rE   N)	Úzope.interfacer   r   r   r   r+   r5   rE   Ú__all__r   r   r   ú<module>rV      s  ðð
 0Ð /Ð /Ð /Ð /Ð /Ð /Ð /ðð ð ð ð �iñ ô ð ð$4=ð 4=ð 4=ð 4=ð 4=ˆYñ 4=ô 4=ð 4=ðn<ð <ð <ð <ð <�)ñ <ô <ð <ð~2ð 2ð 2ð 2ð 2ˆIñ 2ô 2ð 2ðjLð Lð Lð Lð L�9ñ Lô Lð Lð^ð ð €€€r   