Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/site-packages/twisted/words/__pycache__/iwords.cpython-39.pyc
Ðазад
a k�h�! � @ sl d dl mZmZ G dd� de�ZG dd� de�ZG dd� de�ZG dd � d e�ZG d d� de�Zg d�Zd S )� )� Attribute� Interfacec @ s e Zd ZdZed�Zdd� ZdS )�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 C s dS )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� )�realmZportalr r ��/root/rpmbuild/BUILDROOT/imh-python39-modules-3.9.7-92.el8.x86_64/opt/imh-python/lib/python3.9/site-packages/twisted/words/iwords.py� getFactory s zIProtocolPlugin.getFactoryN)�__name__� __module__�__qualname__�__doc__r �namer r r r r r s �r c @ sF e Zd Zed�Zdd� Zddd�Zdd� Zd d � Zdd� Z d d� Z dS )�IGroupz$A short string, unique among groups.c C s dS )zLInclude the given user in this group. @type user: L{IUser} Nr )�userr r r �add s z IGroup.addNc C s dS )znRemove the given user from this group. @type user: L{IUser} @type reason: C{unicode} Nr )r �reasonr r r �remove# s z IGroup.removec C s dS )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 r �size* s zIGroup.sizec C s dS )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 �Zsender� recipient�messager r r �receive2 s zIGroup.receivec C s dS )zUChange the metadata associated with this group. @type meta: C{dict} Nr )�metar r r �setMetadataG s zIGroup.setMetadatac C s dS )z.Return an iterator of all users in this group.Nr r r r r � iterusersM s zIGroup.iterusers)N)r r r r r r r r r r r r r r r r s r c @ s: e Zd ZdZed�Zdd� Zdd� Zdd� Zdd 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 C s dS )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 r r r r X s zIChatClient.receivec C s dS )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 r r r �groupMetaUpdatem s zIChatClient.groupMetaUpdatec C s dS )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 r r r � userJoinedx s zIChatClient.userJoinedNc C s dS )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 r r r �userLeft� s zIChatClient.userLeft)N) r r r r r r r r r r r r r r r Q s �r c @ s` e Zd ZdZed�Zed�Zed�Zed�Zed�Z dd� Z d d � Zdd� Zd d� Z dd� ZdS )�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 C s dS )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 �mindr r r �loggedIn� s zIUser.loggedInc C s dS )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 r r r �send� s z IUser.sendc C s dS )z|Attempt to join the given group. @type group: L{IGroup} @rtype: L{twisted.internet.defer.Deferred} Nr �r r r r �join� s z IUser.joinc C s dS )z�Discontinue participation in the given group. @type group: L{IGroup} @rtype: L{twisted.internet.defer.Deferred} Nr r$ r r r �leave� s zIUser.leavec C s dS )zZ Return an iterator of all groups of which this user is a member. Nr r r r r � itergroups� s zIUser.itergroupsN)r r r r r r r! r ZlastMessageZsignOnr"