WvStreams
wvprociter.h
00001 /* -*- Mode: C++ -*-
00002  * Worldvisions Weaver Software:
00003  *   Copyright (C) 1997-2002 Net Integration Technologies, Inc.
00004  *
00005  * Process iterator.  Iterates through the running processes.
00006  *
00007  */
00008 
00009 #ifndef __WVPROCITER_H
00010 #define __WVPROCITER_H
00011 
00012 #include "wvdiriter.h"
00013 #include "wvstringlist.h"
00014 
00015 struct WvProcEnt
00016 {
00017     pid_t pid;
00018     WvString exe;
00019     WvStringList cmdline;
00020 };
00021 
00022 class WvProcIter
00023 {
00024 private:
00025     WvDirIter dir_iter;
00026     WvProcEnt proc_ent;
00027 
00028 public:
00029     WvProcIter();
00030     ~WvProcIter();
00031 
00032     bool isok() const;
00033     void rewind();
00034     bool next();
00035 
00036     const WvProcEnt *ptr() const { return &proc_ent; }
00037     WvIterStuff(const WvProcEnt);
00038 };
00039 
00040 bool wvkillall(WvStringParm basename, int sig); 
00041 
00042 #endif