
    Vh{                          G d  d      Z y)c                   F    e Zd ZdZd Zd Zd Zd Zd Zd Z	d Z
d	 Zd
 Zy)AccountManagera*  I am responsible for managing a user's accounts.

    That is, remembering what accounts are available, their settings,
    adding and removal of accounts, etc.

    @ivar accounts: A collection of available accounts.
    @type accounts: mapping of strings to L{Account<interfaces.IAccount>}s.
    c                     i | _         y Naccountsselfs    L/home/dcms/DCMS/lib/python3.12/site-packages/twisted/words/im/baseaccount.py__init__zAccountManager.__init__   s	        c                     g }| j                   j                         D ]C  }|j                  |j                  |j	                         |j
                  |j                  f       E |S )zA snapshot of all the accounts and their status.

        @returns: A list of tuples, each of the form
            (string:accountName, boolean:isOnline,
            boolean:autoLogin, string:gatewayType)
        )r   valuesappendaccountNameisOnline	autoLogingatewayType)r	   dataaccounts      r
   getSnapShotzAccountManager.getSnapShot   sd     }}++- 	GKK''$$&%%''		 r   c                 2    t        | j                        dk(  S )N    )lenr   r   s    r
   isEmptyzAccountManager.isEmpty)   s    4==!Q&&r   c                     g }| j                   j                         D ]!  }|j                  |j                                # |S r   )r   r   r   r   )r	   connectioninfor   s      r
   getConnectionInfoz AccountManager.getConnectionInfo,   s@    }}++- 	6G!!'"2"2"45	6r   c                 6    || j                   |j                  <   y r   )r   r   )r	   r   s     r
   
addAccountzAccountManager.addAccount2   s    -4g))*r   c                     | j                   |= y r   r   r	   r   s     r
   
delAccountzAccountManager.delAccount5   s    MM+&r   c                 >    | j                   |   j                  |      S )z=
        @returntype: Deferred L{interfaces.IClient}
        )r   logOn)r	   r   chatuis      r
   connectzAccountManager.connect8   s     }}[)//77r   c                      y r    r!   s     r
   
disconnectzAccountManager.disconnect>       r   c                      y r   r(   r   s    r
   quitzAccountManager.quitB   r*   r   N)__name__
__module____qualname____doc__r   r   r   r   r   r"   r&   r)   r,   r(   r   r
   r   r   	   s4    &'5'8r   r   N)r   r(   r   r
   <module>r1      s   : :r   