From 37333bf25ad9a4c538250f5af2f9f1d666362883 Mon Sep 17 00:00:00 2001 From: toma Date: Wed, 25 Nov 2009 17:56:58 +0000 Subject: Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeadmin@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- ksysv/leveldb.h | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 ksysv/leveldb.h (limited to 'ksysv/leveldb.h') diff --git a/ksysv/leveldb.h b/ksysv/leveldb.h new file mode 100644 index 0000000..e18d202 --- /dev/null +++ b/ksysv/leveldb.h @@ -0,0 +1,50 @@ +/*************************************************************************** + begin : Sun Oct 3 1999 + copyright : (C) 1999 by Red Hat Software + email : putzer@kde.org + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +/* modifications (c) 1999 Peter Putzer */ + +#ifndef H_LEVELDB +#define H_LEVELDB + + +#ifdef __cplusplus + +extern "C" { +#endif + +#include + +struct service { + char * name; + int levels, kPriority, sPriority; + char * desc; +}; + +int parseLevels(const char * str, int emptyOk); + +/* returns 0 on success, 1 if the service is not chkconfig-able, -1 if an + I/O error occurs (in which case errno can be checked) */ +int readServiceInfo(const char* RUNLEVELS, const char* name, struct service * service); +int currentRunlevel(void); +int isOn(const char* RUNLEVELS, const char* name, int where); +int isConfigured(const char* RUNLEVELS, const char* name, int level); +int doSetService(const char* RUNLEVELS, struct service s, int level, int on); +int findServiceEntries(const char* RUNLEVELS, const char* name, int level, glob_t * globresptr); + +#ifdef __cplusplus +} +#endif + +#endif -- cgit v1.2.1