Return TypeFunction nameArguments
hzEcodehzPop3Acc::Init(hzString,hzString,hzString,hzString,)

Declared in file: hzMailer.h
Defined in file : hzPop3.cpp

Function Logic:

0:START 1:hzChain::Clear m_Server m_Username m_Password m_Repos 2:m_Repos 3:hzChain::Printf 4:Return E_INITDUP 5:!m_Server||!m_Username||!m_Password||!m_Repos 6:hzChain::Printf 7:!m_Server 8:hzChain::Printf 9:!m_Username 10:hzChain::Printf 11:!m_Password 12:hzChain::Printf 13:!m_Repos 14:hzChain::Printf 15:Return E_ARGUMENT 16:AssertDir rc 17:rc!=E_OK 18:Return rc 19:ListDir rc nIndex 20:nIndex 21:S hzSet::Insert 22:Return E_OK

Function body:

hzEcode hzPop3Acc::Init (hzString Server, hzString Username, hzString Password, hzString Repos)
{
   hzVect  <hzString>  dirs ;
   hzVect  <hzString>  files ;
   hzString    S ;
   uint32_t    nIndex ;
   hzEcode     rc ;
   m_Error.Clear() ;
   m_Server = Server ;
   m_Username = Username ;
   m_Password = Password ;
   m_Repos = Repos ;
   if (m_Repos)
   {
       m_Error.Printf("hzPop3Acc::Init - Duplicate call\n") ;
       return E_INITDUP ;
   }
   if (!m_Server || !m_Username || !m_Password || !m_Repos)
   {
       m_Error.Printf("hzPop3Acc::Init\n") ;
       if (!m_Server)      m_Error.Printf(" - No POP3 server specified\n") ;
       if (!m_Username)    m_Error.Printf(" - No POP3 Username\n") ;
       if (!m_Password)    m_Error.Printf(" - No POP3 Password\n") ;
       if (!m_Repos)       m_Error.Printf(" - No POP3 Repository specified\n") ;
       return E_ARGUMENT ;
   }
   rc = AssertDir(Repos, 0777);
   if (rc != E_OK)
       return rc ;
   rc = ListDir(dirs, files, *Repos, 0);
   for (nIndex = 0; nIndex < files.Count() ; nIndex++)
   {
       S = files[nIndex] ;
       m_Already.Insert(S) ;
   }
   return E_OK ;
}