ServiceBase.h

Go to the documentation of this file.
00001 #ifndef __SERVICEBASE_H__
00002 #define __SERVICEBASE_H__
00003 
00004 /*
00005 
00006 $Header$
00007 
00008 */
00009 
00010 #include "Value.h"
00011 #include "ValueList.h"
00012 #include "Signal.h"
00013 #include "NamedObject.h"
00014 
00015 using namespace std;
00016 
00017 class ServiceBase : public NamedObject
00018 {
00019 
00020   PYLON_OBJECT
00021 
00022 public:
00023 
00024   ServiceBase(const String& name, const ValueList &params, const String &manual = "");
00025   virtual ~ServiceBase();
00026 
00027   virtual ServiceBase *fork() = 0;
00028 
00029   inline virtual bool forkable() const;
00030 
00031   static unsigned int instancesNumberLimit();
00032 
00033   int kill();
00034   virtual int suspend();
00035   virtual int resume();
00036   int notify(const ValueList &params);
00037 
00038   // Signals.
00039   SIGNAL(forked);
00040   SIGNAL(killed);
00041   SIGNAL(suspended);
00042   SIGNAL(resumed);
00043   SIGNAL(notified, const ValueList &);
00044 
00045 protected:
00046 
00047   ValueList _params;
00048 };
00049 
00050 // Implementation.
00051 
00052 inline bool ServiceBase::forkable() const
00053 {
00054   return false;
00055 }
00056 
00057 #endif

Generated on Thu Sep 6 20:11:25 2007 for Pylon Application Platform by  doxygen 1.5.1