ServiceBase.cpp

Go to the documentation of this file.
00001 /*
00002 
00003 $Header$
00004 
00005 */
00006 
00007 #include "Error.h"
00008 
00009 #include "ServiceBase.h"
00010 
00011 // Public methods.
00012 
00013 ServiceBase::ServiceBase(const String& name, const ValueList &params, const String &manual) : NamedObject(name, manual),
00014   _params(params)
00015 {
00016 }
00017 
00018 ServiceBase::~ServiceBase()
00019 {
00020 }
00021 
00022 unsigned int ServiceBase::instancesNumberLimit()
00023 {
00024   return 0;
00025 }
00026 
00027 int ServiceBase::kill()
00028 {
00029   DEBUG("Kill service.");
00030   EMIT(killed);
00031   deleteLater(this);
00032   return OK;
00033 }
00034 
00035 int ServiceBase::suspend()
00036 {
00037   if (suspended())
00038     return OK;
00039 
00040   int res;
00041 
00042   if (FAILED(res = Object::suspend()))
00043     return ERROR_BACKTRACE(res);
00044 
00045   EMIT(suspended);
00046   return OK;
00047 }
00048 
00049 int ServiceBase::resume()
00050 {
00051   if (!suspended())
00052     return OK;
00053 
00054   int res;
00055 
00056   if (FAILED(res = Object::resume()))
00057     return ERROR_BACKTRACE(res);
00058 
00059   EMIT(resumed);
00060   return OK;
00061 }
00062 
00063 int ServiceBase::notify(const ValueList &params)
00064 {
00065   EMIT(notified, params);
00066   return OK;
00067 }

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