Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

DVDTool Class Reference

Inheritance diagram for DVDTool:

Inheritance graph
[legend]
Collaboration diagram for DVDTool:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 DVDTool (string command)
void load (string command)
bool execute (const string &dvdauthorFile, const string &outputDirectory)
void close ()

Static Public Member Functions

static bool compare (const DVDTool *x, const DVDTool *y)

Public Attributes

string m_command
string m_description
bool m_active

Constructor & Destructor Documentation

DVDTool::DVDTool string  command  )  [inline]
 

Definition at line 68 of file page_export_mjpeg.cc.

References load().

00068                               :
00069             m_command( command ),
00070             m_description( "" ),
00071             m_active( false )
00072     {
00073         load( command );
00074     }


Member Function Documentation

void DVDTool::close  )  [inline]
 

Definition at line 115 of file page_export_mjpeg.cc.

References RWPipe::stop().

Referenced by ExportMJPEG::doExport().

00116     {
00117         stop( );
00118     }

static bool DVDTool::compare const DVDTool x,
const DVDTool y
[inline, static]
 

Definition at line 120 of file page_export_mjpeg.cc.

References m_description.

Referenced by ExportMJPEG::loadTools().

00121     {
00122         return ( x->m_description < y->m_description );
00123     }

bool DVDTool::execute const string &  dvdauthorFile,
const string &  outputDirectory
[inline]
 

Definition at line 101 of file page_export_mjpeg.cc.

References m_command.

Referenced by ExportMJPEG::doExport().

00102     {
00103         gchar *command;
00104         bool result;
00105 
00106         // Construct the command
00107         command = g_strdup_printf( "\"%s\" \"%s\" \"%s\"", m_command.c_str( ),
00108                  dvdauthorFile.c_str( ), outputDirectory.c_str() );
00109 
00110         result = system( command );
00111         g_free( command );
00112         return result;
00113     }

void DVDTool::load string  command  )  [inline]
 

Definition at line 76 of file page_export_mjpeg.cc.

References m_active, m_description, RWPipe::readLine(), RWPipe::run(), and RWPipe::stop().

Referenced by DVDTool().

00077     {
00078         if ( run( command ) )
00079         {
00080             char temp[ 10240 ];
00081             while ( readLine( temp, 10240 ) > 0 )
00082             {
00083                 char * ptr = strchr( temp, ':' );
00084                 if ( ptr != NULL )
00085                 {
00086                     *ptr = '\0';
00087                     ptr += 2;
00088 
00089                     if ( !strcmp( temp, "Title" ) )
00090                         m_description = ptr;
00091                     else if ( !strcmp( temp, "Status" ) )
00092                         m_active = !strcmp( ptr, "Active" );
00093                     else
00094                         fprintf( stderr, "Unrecognised %s: %s\n", temp, ptr );
00095                 }
00096             }
00097             stop( );
00098         }
00099     }


Member Data Documentation

bool DVDTool::m_active
 

Definition at line 66 of file page_export_mjpeg.cc.

Referenced by load(), and ExportMJPEG::loadTools().

string DVDTool::m_command
 

Definition at line 64 of file page_export_mjpeg.cc.

Referenced by execute().

string DVDTool::m_description
 

Definition at line 65 of file page_export_mjpeg.cc.

Referenced by compare(), and load().


The documentation for this class was generated from the following file:
Generated on Sun Mar 11 22:12:48 2007 for Kino by  doxygen 1.4.2