File indexing completed on 2024-04-21 04:03:12

0001 /***************************************************************************
0002                           cscript.h  -  one script
0003                              -------------------
0004     begin                : So dec 7 2002
0005     copyright            : (C) 2002-2009 by Tomas Mecir
0006     email                : kmuddy@kmuddy.com
0007  ***************************************************************************/
0008 
0009 /***************************************************************************
0010  *                                                                         *
0011  *   This program is free software; you can redistribute it and/or modify  *
0012  *   it under the terms of the GNU General Public License as published by  *
0013  *   the Free Software Foundation; either version 2 of the License, or     *
0014  *   (at your option) any later version.                                   *
0015  *                                                                         *
0016  ***************************************************************************/
0017 
0018 #ifndef CSCRIPT_H
0019 #define CSCRIPT_H
0020 
0021 #include "clistobject.h"
0022 
0023 class cRunningScript;
0024 
0025 /**
0026 Information about one script.
0027   *@author Tomas Mecir
0028   */
0029 
0030 class cScript : public cListObject {
0031 public:
0032   virtual ~cScript ();
0033 
0034   virtual void updateVisibleName ();
0035 protected:
0036   friend class cScriptList;
0037   cScript (cList *list);
0038 
0039 #define SCRIPT_FIND 1
0040 #define SCRIPT_EXECUTE 2
0041 
0042   virtual cList::TraverseAction traverse (int traversalType);
0043 
0044   /** this method creates a new instance of cRunningScript and prepares
0045   it for launching */
0046   cRunningScript *prepareToLaunch (const QString &params);
0047   /** This is called by cRunningScript when its script starts. */
0048   void scriptIsStarting ();
0049   /** This is called by cRunningScript when its script terminates. */
0050   void scriptIsTerminating ();
0051   
0052   /** some variables that are not stored */
0053   int runningCount;
0054 
0055   friend class cRunningScript;
0056 };
0057 
0058 #endif
0059