| 1 | /************************************************************************** |
|---|
| 2 | * Copyright (C) 2004-2007 by Michael Medin <michael@medin.name> * |
|---|
| 3 | * * |
|---|
| 4 | * This code is part of NSClient++ - http://trac.nakednuns.org/nscp * |
|---|
| 5 | * * |
|---|
| 6 | * This program is free software; you can redistribute it and/or modify * |
|---|
| 7 | * it under the terms of the GNU General Public License as published by * |
|---|
| 8 | * the Free Software Foundation; either version 2 of the License, or * |
|---|
| 9 | * (at your option) any later version. * |
|---|
| 10 | * * |
|---|
| 11 | * This program is distributed in the hope that it will be useful, * |
|---|
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * |
|---|
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * |
|---|
| 14 | * GNU General Public License for more details. * |
|---|
| 15 | * * |
|---|
| 16 | * You should have received a copy of the GNU General Public License * |
|---|
| 17 | * along with this program; if not, write to the * |
|---|
| 18 | * Free Software Foundation, Inc., * |
|---|
| 19 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * |
|---|
| 20 | ***************************************************************************/ |
|---|
| 21 | #pragma once |
|---|
| 22 | |
|---|
| 23 | |
|---|
| 24 | #include <unicode_char.hpp> |
|---|
| 25 | |
|---|
| 26 | namespace NSCAPI { |
|---|
| 27 | |
|---|
| 28 | #ifdef DEBUG |
|---|
| 29 | typedef enum { |
|---|
| 30 | returnCRIT = 2, |
|---|
| 31 | returnOK = 0, |
|---|
| 32 | returnWARN = 1, |
|---|
| 33 | returnUNKNOWN = 3, |
|---|
| 34 | returnInvalidBufferLen = -2, |
|---|
| 35 | returnIgnored = -1 |
|---|
| 36 | } nagiosReturn; |
|---|
| 37 | typedef enum { |
|---|
| 38 | istrue = 1, |
|---|
| 39 | isfalse = 0 |
|---|
| 40 | } boolReturn; |
|---|
| 41 | typedef enum { |
|---|
| 42 | isSuccess = 1, |
|---|
| 43 | hasFailed = 0, |
|---|
| 44 | isInvalidBufferLen = -2 |
|---|
| 45 | } errorReturn; |
|---|
| 46 | typedef enum { |
|---|
| 47 | key_string = 100, |
|---|
| 48 | key_integer = 200, |
|---|
| 49 | key_bool = 300, |
|---|
| 50 | } settings_type; |
|---|
| 51 | |
|---|
| 52 | typedef enum { |
|---|
| 53 | normalStart = 0, |
|---|
| 54 | dontStart = 1, |
|---|
| 55 | } moduleLoadMode; |
|---|
| 56 | #else |
|---|
| 57 | const int normalStart = 0; |
|---|
| 58 | const int dontStart = 1; |
|---|
| 59 | const int returnOK = 0; |
|---|
| 60 | const int returnWARN = 1; |
|---|
| 61 | const int returnCRIT = 2; |
|---|
| 62 | const int returnUNKNOWN = 3; |
|---|
| 63 | const int returnInvalidBufferLen = -2; |
|---|
| 64 | const int returnIgnored = -1; |
|---|
| 65 | const int istrue = 1; |
|---|
| 66 | const int isfalse = 0; |
|---|
| 67 | const int isSuccess = 1; |
|---|
| 68 | const int hasFailed = 0; |
|---|
| 69 | const int isInvalidBufferLen = -2; |
|---|
| 70 | const int key_string = 100; |
|---|
| 71 | const int key_integer = 200; |
|---|
| 72 | const int key_bool = 300; |
|---|
| 73 | |
|---|
| 74 | typedef int nagiosReturn; |
|---|
| 75 | typedef int boolReturn; |
|---|
| 76 | typedef int errorReturn; |
|---|
| 77 | typedef int settings_type; |
|---|
| 78 | typedef int moduleLoadMode; |
|---|
| 79 | #endif |
|---|
| 80 | |
|---|
| 81 | const int encryption_xor = 1; |
|---|
| 82 | |
|---|
| 83 | // Settings types |
|---|
| 84 | const int settings_default = 0; |
|---|
| 85 | const int settings_registry = 1; |
|---|
| 86 | const int settings_inifile = 2; |
|---|
| 87 | |
|---|
| 88 | // Various message Types |
|---|
| 89 | const int log = 0; // Log message |
|---|
| 90 | const int error = -1; // Error (non critical) |
|---|
| 91 | const int critical = -10; // Critical error |
|---|
| 92 | const int warning = 1; // Warning |
|---|
| 93 | const int debug = 666; // Debug message |
|---|
| 94 | |
|---|
| 95 | typedef int messageTypes; // Message type |
|---|
| 96 | |
|---|
| 97 | struct plugin_info { |
|---|
| 98 | wchar_t *dll; |
|---|
| 99 | wchar_t *name; |
|---|
| 100 | wchar_t *description; |
|---|
| 101 | wchar_t *version; |
|---|
| 102 | }; |
|---|
| 103 | typedef plugin_info* plugin_info_list; |
|---|
| 104 | |
|---|
| 105 | |
|---|
| 106 | }; |
|---|
| 107 | |
|---|
| 108 | namespace NSCModuleHelper { |
|---|
| 109 | typedef void* (*lpNSAPILoader)(wchar_t*); |
|---|
| 110 | } |
|---|