Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef __PROC_H__
00021 #define __PROC_H__ 1
00022
00023 #include <string>
00024 #include <map>
00025
00026 #include <boost/thread/mutex.hpp>
00027 #include <boost/thread/condition.hpp>
00028
00029 #include "network.h"
00030 #include "dsodefs.h"
00031
00032 namespace cygnal
00033 {
00034
00035 class Proc : public gnash::Network {
00036 public:
00037 DSOEXPORT Proc (void);
00038 DSOEXPORT ~Proc (void);
00039 static Proc& getDefaultInstance();
00040
00041
00042 bool setOutput (const std::string &output, bool outflag);
00043 bool getOutput (const std::string &output);
00044
00045
00046 bool startCGI (void);
00047 bool startCGI (const std::string &filespec);
00048 bool startCGI (const std::string &filespec, boost::uint16_t port);
00049 bool startCGI (const std::string &filespec, bool output);
00050 bool startCGI (const std::string &filespec, bool output, boost::uint16_t port);
00051
00052 void setDocroot(const std::string &path) { _docroot = path; } ;
00053 std::string &getDocroot() { return _docroot; };
00054
00055
00056 bool connectCGI (const std::string &host, boost::uint16_t port);
00057
00058
00059 int findCGI (const std::string &filespec);
00060
00061
00062 bool stopCGI (void);
00063 bool stopCGI (const std::string &filespec);
00064 private:
00065 std::map<std::string, bool> _output;
00066 std::map<std::string, int> _pids;
00067 std::map<std::string, int> _cons;
00068 std::string _docroot;
00069
00070 boost::mutex _mutex;
00071 };
00072
00073 }
00074
00075 #endif // end of __PROC_H__
00076
00077
00078
00079
00080