00001 /* 00002 * Copyright (C) 2010 PrimeBase Technologies GmbH, Germany 00003 * 00004 * This program is free software; you can redistribute it and/or modify 00005 * it under the terms of the GNU General Public License as published by 00006 * the Free Software Foundation; version 2 of the License. 00007 * 00008 * This program is distributed in the hope that it will be useful, 00009 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00010 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00011 * GNU General Public License for more details. 00012 * 00013 * You should have received a copy of the GNU General Public License 00014 * along with this program; if not, write to the Free Software 00015 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 00016 * 00017 * Barry Leslie 00018 * 00019 * 2010-06-09 00020 */ 00021 00022 #pragma once 00023 00024 class PBMSDaemon { 00025 public: 00026 typedef enum {DaemonUnknown, DaemonStartUp, DaemonRunning, DaemonShuttingDown, DaemonError} DaemonState; 00027 00028 private: 00029 static DaemonState pbd_state; 00030 static char pbd_home_dir[PATH_MAX]; 00031 00032 public: 00033 static void setDaemonState(DaemonState state); 00034 static bool isDaemonState(DaemonState state) { return (pbd_state == state);} 00035 static const char *getPBMSDir() { return pbd_home_dir;} 00036 00037 }; 00038