CMediaReplayDetect Class Reference

List of all members.

Public Member Functions

 CMediaReplayDetect ()
bool IsAppPresent (const wxString &strApp)

Private Attributes

wxArrayString m_astrPathElement

Detailed Description

CMediaReplayDetect - Class which checks to see if a command is available on the path

Definition at line 2771 of file camelot.cpp.


Constructor & Destructor Documentation

CMediaReplayDetect::CMediaReplayDetect  )  [inline]
 

Definition at line 2777 of file camelot.cpp.

02778     {
02779         wxString        strPath;
02780         wxGetEnv( _T("PATH"), &strPath );
02781 
02782         while( strPath != _T("") )
02783         {
02784             INT32           ordSep = strPath.Find( _T(':') );
02785             if( -1 == ordSep )
02786             {
02787                 if( strPath.Len() > 0 )
02788                     m_astrPathElement.Add( strPath );
02789                 break;
02790             }
02791 
02792             m_astrPathElement.Add( strPath.Mid( 0, ordSep ) );
02793             TRACEUSER( "jlh92", _T("Add ele %s\n"), PCTSTR(strPath.Mid( 0, ordSep )) );
02794             strPath = strPath.Mid( ordSep + 1 );
02795         }
02796     }


Member Function Documentation

bool CMediaReplayDetect::IsAppPresent const wxString &  strApp  )  [inline]
 

Definition at line 2798 of file camelot.cpp.

02799     {
02800         size_t          cElement = m_astrPathElement.GetCount();
02801         for( size_t ord = 0; ord < cElement; ++ord )
02802         {
02803             wxString    strFullPath = m_astrPathElement.Item( ord );
02804             strFullPath += _T("/");
02805             strFullPath += strApp;
02806 
02807             if( wxFile::Exists( strFullPath ) )
02808                 return true;
02809         }
02810 
02811         return false;
02812     }


Member Data Documentation

wxArrayString CMediaReplayDetect::m_astrPathElement [private]
 

Definition at line 2774 of file camelot.cpp.


The documentation for this class was generated from the following file:
Generated on Sat Nov 10 03:52:35 2007 for Camelot by  doxygen 1.4.4