/***************************************************************************
                         SP Mail project : Simple Powerful Mail
                          CImapAccount.h  -  description
                             -------------------
    begin                : 23 June 2003
    copyright            : (C) 2000-2005 by Alexey S.Parshin
    email                : alexeyp@gmail.com
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   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.                                   *
 *                                                                         *
 ***************************************************************************/

#ifndef __CIMAPACCOUNT_H__
#define __CIMAPACCOUNT_H__

#include <sptk3/CImapConnect.h>
#include <sptk3/CImapDS.h>
#include <sptk3/CStrings.h>

class CImapAccount : public CImapConnect {
   std::string             m_name;
   CStrings                m_folders;
   CImapDS                 m_ds;
public:
   CImapAccount(std::string name,std::string host,std::string user,std::string password);

   void login();
   void logout();

   CImapDS& DS() { return m_ds; }

   void loadFolders();
   const CStrings& folders() const { return m_folders; }

   const std::string& name() const { return m_name; }
};

#endif
