§
    Žpmaú  ã                   óˆ   — d Z ddlmZ ddlmZ ddlmZmZ ddlm	Z	 ddl
mZ ddlmZ ddlmZ dd	lmZ  G d
„ d¦  «        ZdS )aü  
Copyright (C) 2002-2016 John Goerzen & contributors.

   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 2 of the License, or
   (at your option) any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
é    )Úexc_info)ÚNoSectionError)ÚIMAPRepositoryÚMappedIMAPRepository)ÚGmailRepository)ÚMaildirRepository)ÚGmailMaildirRepository)ÚLocalStatusRepository)ÚOfflineImapErrorc                   ó   — e Zd ZdZd„ Zd„ ZdS )Ú
Repositoryz“Abstract class that returns the correct Repository type
    instance based on 'account' and 'reqtype', e.g.  a
    class:`ImapRepository` instance.c                 óD  — |dk    r%|                      d¦  «        }t          t          dœ}n€|dk    r+|                      d¦  «        }t          t          t
          dœ}nO|dk    r%|                      d¦  «        }t          ||¦  «        S d|z  }t          |t          j        j	        ¦  «        ‚| 
                    ¦   «         }	 |                     d	|z   d
¦  «                             ¦   «         }nQ# t          $ rD}dd|z  ›d|›d�}t          |t          j        j	        t          ¦   «         d         ¦  «        |‚d}~ww xY w	 ||         }	nN# t          $ rA}d|›d|›d�}t          |t          j        j	        t          ¦   «         d         ¦  «        |‚d}~ww xY w |	||¦  «        S )z`
        :param account: :class:`Account`
        :param reqtype: 'remote', 'local', or 'status'ÚremoteÚremoterepository)ÚIMAPÚGmailÚlocalÚlocalrepository)r   ÚMaildirÚGmailMaildirÚstatusz Repository type %s not supportedzRepository ÚtypezCould not find section 'zRepository %sz*' in configuration. Required for account 'z'.é   Nú'z ' repository not supported for 'z' repositories.)Úgetconfr   r   r   r   r	   r
   r   ÚERRORÚREPOÚ	getconfigÚgetÚstripr   r   ÚKeyError)
ÚclsÚaccountÚreqtypeÚnameÚtypemapÚerrstrÚconfigÚ	repostypeÚexcÚrepos
             ú:/usr/share/offlineimap3/offlineimap/repository/__init__.pyÚ__new__zRepository.__new__!   sî  € ð
 �hÒÐØ—?’?Ð#5Ñ6Ô6ˆDå-Ý /ð1ð 1ˆGˆGð ˜ÒÐØ—?’?Ð#4Ñ5Ô5ˆDÝ3Ý"3Ý'=ð?ð ?ˆGˆGð ˜Ò Ð à—?’?Ð#4Ñ5Ô5ˆDÝ(¨¨wÑ7Ô7Ð7ð 8¸'ÑAˆFÝ" 6Õ+;Ô+AÔ+FÑGÔGÐGð ×"Ò"Ñ$Ô$ˆð	;ØŸ
š
 =°4Ñ#7¸Ñ@Ô@×FÒFÑHÔHˆIˆIøÝð 	;ð 	;ð 	;ð 	;à-<¸tÑ-CÐ-CÐ-CÀWÀWÀWðNˆFå" 6Õ+;Ô+AÔ+FÝ#+¡:¤:¨a¤=ñ2ô 2Ø7:ð;øøøøð	;øøøð	;Ø˜9Ô%ˆDˆDøÝð 	;ð 	;ð 	;ð 	;à�i�i   ð*ˆFå" 6Õ+;Ô+AÔ+FÝ#+¡:¤:¨a¤=ñ2ô 2Ø7:ð;øøøøð	;øøøð ˆt�D˜'Ñ"Ô"Ð"s0   Ã+C- Ã-
D;Ã7?D6Ä6D;Ä?E Å
FÅ<FÆFc                 ó   — dS )a  Load the correct Repository type and return that. The
        __init__ of the corresponding Repository class will be
        executed instead of this stub

        :param account: :class:`Account`
        :param reqtype: 'remote', 'local', or 'status'
        N© )Úselfr#   r$   s      r,   Ú__init__zRepository.__init__O   s   € € € ó    N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r-   r1   r/   r2   r,   r   r      s=   € € € € € ð(ð (ð,#ð ,#ð ,#ð\ð ð ð ð r2   r   N)r6   Úsysr   Úconfigparserr   Úofflineimap.repository.IMAPr   r   Úofflineimap.repository.Gmailr   Úofflineimap.repository.Maildirr   Ú#offlineimap.repository.GmailMaildirr	   Ú"offlineimap.repository.LocalStatusr
   Úofflineimap.errorr   r   r/   r2   r,   ú<module>r?      sÙ   ððð ð" Ð Ð Ð Ð Ð Ø 'Ð 'Ð 'Ð 'Ð 'Ð 'Ø LÐ LÐ LÐ LÐ LÐ LÐ LÐ LØ 8Ð 8Ð 8Ð 8Ð 8Ð 8Ø <Ð <Ð <Ð <Ð <Ð <Ø FÐ FÐ FÐ FÐ FÐ FØ DÐ DÐ DÐ DÐ DÐ DØ .Ð .Ð .Ð .Ð .Ð .ð:ð :ð :ð :ð :ñ :ô :ð :ð :ð :r2   