ó
    ×›‘hŸ!  ã                   óŠ   • S SK JrJr   " S S\5      r " S S\5      r " S S\5      r " S S	\5      r " S
 S\5      r/ SQrg)é    )Ú	AttributeÚ	Interfacec                   ó.   • \ rS rSrSr\" S5      rS rSrg)ÚIProtocolPluginé   z?Interface for plugins providing an interface to a Words servicezHA single word describing what kind of interface this is (eg, irc or web)c                 ó   • g)a:  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     ÚXC:\Users\psant\Downloads\Noiseback\school\venv\Lib\site-packages\twisted/words/iwords.pyÚ
getFactoryÚIProtocolPlugin.getFactory   ó   � ó    r	   N)	Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r   Únamer   Ú__static_attributes__r	   r   r   r   r      s   † ÙIáØRó€Dõr   r   c                   óL   • \ rS rSr\" S5      rS rSS jrS rS r	S r
S	 rS
rg)ÚIGroupé   z$A short string, unique among groups.c                 ó   • g)z<Include the given user in this group.

@type user: L{IUser}
Nr	   )Úusers    r   ÚaddÚ
IGroup.add   r   r   Nc                 ó   • g)zVRemove the given user from this group.

@type user: L{IUser}
@type reason: C{unicode}
Nr	   )r   Úreasons     r   ÚremoveÚIGroup.remove#   r   r   c                  ó   • g)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   ÚsizeÚIGroup.size*   r   r   c                 ó   • g)añ  
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   ÚreceiveÚIGroup.receive2   r   r   c                 ó   • g)zEChange the metadata associated with this group.

@type meta: C{dict}
Nr	   )Úmetas    r   ÚsetMetadataÚIGroup.setMetadataG   r   r   c                  ó   • g)z.Return an iterator of all users in this group.Nr	   r	   r   r   Ú	iterusersÚIGroup.iterusersM   r   r   r	   ©N)r   r   r   r   r   r   r   r!   r$   r+   r/   r2   r   r	   r   r   r   r      s+   † ÙÐ;Ó<€Dòôòòò*õ=r   r   c                   óD   • \ rS rSrSr\" S5      rS rS rS r	S
S jr
S	rg)ÚIChatClientéQ   z<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                 ó   • g)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+   ÚIChatClient.receiveX   r   r   c                 ó   • g)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   ÚgroupMetaUpdateÚIChatClient.groupMetaUpdatem   r   r   c                 ó   • g)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   Ú
userJoinedÚIChatClient.userJoinedx   r   r   Nc                 ó   • g)zÓ
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   ÚuserLeftÚIChatClient.userLeftƒ   r   r   r	   r4   )r   r   r   r   r   r   r   r+   r<   r?   rB   r   r	   r   r   r6   r6   Q   s&   † ÙFáØeó€Dòò*	ò	÷
r   r6   c                   ó†   • \ rS rSrSr\" S5      r\" S5      r\" S5      r\" S5      r	\" S5      r
S rS	 rS
 rS rS rSrg)ÚIUseré�   z;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                 ó   • g)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   ÚloggedInÚIUser.loggedIn¢   r   r   c                 ó   • g)zySend 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   ÚsendÚ
IUser.send©   r   r   c                 ó   • g)zdAttempt to join the given group.

@type group: L{IGroup}
@rtype: L{twisted.internet.defer.Deferred}
Nr	   ©r;   s    r   ÚjoinÚ
IUser.join°   r   r   c                 ó   • g)zqDiscontinue participation in the given group.

@type group: L{IGroup}
@rtype: L{twisted.internet.defer.Deferred}
Nr	   rO   s    r   ÚleaveÚIUser.leave·   r   r   c                  ó   • g)zB
Return an iterator of all groups of which this user is a
member.
Nr	   r	   r   r   Ú
itergroupsÚIUser.itergroups¾   r   r   r	   N)r   r   r   r   r   r   r
   rH   r   ÚlastMessageÚsignOnrI   rL   rP   rS   rV   r   r	   r   r   rE   rE   �   sc   † ÙEáØió€Eñ Øjó€Dñ Ð:Ó;€DáØ\ó€Kñ ØLó€Fòòòòõr   rE   c                   óh   • \ rS rSr\" S5      r\" S5      r\" S5      rS rS r	S r
S rS	 rS
 rSrg)ÚIChatServiceéÅ   z=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                  ó   • g)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   rV   ÚIChatService.itergroupsÒ   r   r   c                 ó   • g)aZ  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   ÚgetGroupÚIChatService.getGroupÙ   r   r   c                 ó   • g)a  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	   r`   s    r   ÚcreateGroupÚIChatService.createGroupå   r   r   c                 ó   • g)a  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	   r`   s    r   ÚlookupGroupÚIChatService.lookupGroupð   r   r   c                 ó   • g)aU  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	   r`   s    r   ÚgetUserÚIChatService.getUserü   r   r   c                 ó   • g)zþ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	   r`   s    r   Ú
createUserÚIChatService.createUser  r   r   r	   N)r   r   r   r   r   r   ÚcreateGroupOnRequestÚcreateUserOnRequestrV   ra   rd   rg   rj   rm   r   r	   r   r   r[   r[   Å   sO   † ÙÐTÓU€Dá$ð	HóÐñ
 $ð	GóÐò
ò
ò	ò
ò
õ	r   r[   )r   r6   rE   r[   N)	Úzope.interfacer   r   r   r   r6   rE   r[   Ú__all__r	   r   r   Ú<module>rs      sS   ð÷
 0ô�iô ô$4=ˆYô 4=ôn<�)ô <ô~2ˆIô 2ôjL�9ô Lò^�r   