--- a/src/hugin1/ptbatcher/Batch.h
+++ b/src/hugin1/ptbatcher/Batch.h
@@ -45,6 +45,12 @@
 
 using namespace std;
 
+struct FailedProject
+{
+    wxString project;
+    wxString logfile;
+};
+
 class Batch : public wxFrame
 {
 public:
@@ -61,7 +67,7 @@
 	//Adds an application entry in the batch list
 	void  AddAppToBatch(wxString app);
 	//Adds a project entry in the batch list
-	void  AddProjectToBatch(wxString projectFile, wxString outputFile = _T(""));	
+    void  AddProjectToBatch(wxString projectFile, wxString outputFile = _T(""), Project::Target target=Project::STITCHING);	
 	//Returns true if there are no more projects pending execution
 	bool  AllDone();
 	//Appends projects from file to batch list
@@ -109,6 +115,8 @@
 	void  OnProcessTerminate(wxProcessEvent & event);
 	//Called to start stitch of project with input scriptFile
 	bool  OnStitch(wxString scriptFile, wxString outname, int id);
+    /** called to start detecting */
+    bool OnDetect(wxString scriptFile, int id);
 	//Pauses and continues batch execution
 	void  PauseBatch();
 	//Removes project with id from batch list
@@ -131,6 +139,12 @@
 	 * @param isVisible If true display the project output, otherwise hide it.
 	 */
 	void ShowOutput(bool isVisible=true);
+    /** returns number of failed projects */
+    size_t GetFailedProjectsCount() { return m_failedProjects.size(); };
+    /** returns project file name of failed project with index i */
+    wxString GetFailedProjectName(unsigned int i);
+    /** returns log file name of failed project with index i */
+    wxString GetFailedProjectLog(unsigned int i);
 
 private:
 	//environment config objects
@@ -148,11 +162,21 @@
 	bool m_paused;
 	bool m_running;
 	bool m_clearedInProgress;
+
+    //vector, which stores the failed projects and filename of saved logfile
+    std::vector<FailedProject> m_failedProjects;
 	
 	//external program config
 	PTPrograms progs;
+    AssistantPrograms progsAss;
 
 	DECLARE_EVENT_TABLE()
 };
 
+#if _WINDOWS && defined Hugin_shared
+    DECLARE_LOCAL_EVENT_TYPE(EVT_BATCH_FAILED,-1)
+#else
+    DECLARE_EVENT_TYPE(EVT_BATCH_FAILED,-1)
+#endif
+
 #endif //BATCH_H