| 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 | #include <NSCAPI.h>
|
|---|
| 24 |
|
|---|
| 25 |
|
|---|
| 26 | //////////////////////////////////////////////////////////////////////////
|
|---|
| 27 | // Various NSAPI callback functions (available for plug-ins to make calls back to the core.
|
|---|
| 28 | // <b>NOTICE</b> No threading is allowed so technically every thread is responsible for marshaling things back.
|
|---|
| 29 | // Though I think this is not the case at the moment.
|
|---|
| 30 | //
|
|---|
| 31 |
|
|---|
| 32 | LPVOID NSAPILoader(const wchar_t*buffer);
|
|---|
| 33 | NSCAPI::errorReturn NSAPIGetApplicationName(wchar_t*buffer, unsigned int bufLen);
|
|---|
| 34 | NSCAPI::errorReturn NSAPIGetBasePath(wchar_t*buffer, unsigned int bufLen);
|
|---|
| 35 | NSCAPI::errorReturn NSAPIGetApplicationVersionStr(wchar_t*buffer, unsigned int bufLen);
|
|---|
| 36 | NSCAPI::errorReturn NSAPIGetSettingsString(const wchar_t* section, const wchar_t* key, const wchar_t* defaultValue, wchar_t* buffer, unsigned int bufLen);
|
|---|
| 37 | int NSAPIGetSettingsInt(const wchar_t* section, const wchar_t* key, int defaultValue);
|
|---|
| 38 | void NSAPIMessage(const char* data,unsigned int count);
|
|---|
| 39 | void NSAPIStopServer(void);
|
|---|
| 40 | NSCAPI::nagiosReturn NSAPIInject(const wchar_t* command, const char *request_buffer, const unsigned int request_buffer_len, char **response_buffer, unsigned int *response_buffer_len);
|
|---|
| 41 | NSCAPI::nagiosReturn NSAPIExecCommand(const wchar_t* command, const char *request_buffer, const unsigned int request_buffer_len, char **response_buffer, unsigned int *response_buffer_len);
|
|---|
| 42 | NSCAPI::errorReturn NSAPIGetSettingsSection(const wchar_t*, wchar_t***, unsigned int *);
|
|---|
| 43 | NSCAPI::errorReturn NSAPIReleaseSettingsSectionBuffer(wchar_t*** aBuffer, unsigned int * bufLen);
|
|---|
| 44 | NSCAPI::boolReturn NSAPICheckLogMessages(int messageType);
|
|---|
| 45 | NSCAPI::errorReturn NSAPIEncrypt(unsigned int algorithm, const wchar_t* inBuffer, unsigned int inBufLen, wchar_t* outBuf, unsigned int *outBufLen);
|
|---|
| 46 | NSCAPI::errorReturn NSAPIDecrypt(unsigned int algorithm, const wchar_t* inBuffer, unsigned int inBufLen, wchar_t* outBuf, unsigned int *outBufLen);
|
|---|
| 47 | NSCAPI::errorReturn NSAPISetSettingsString(const wchar_t* section, const wchar_t* key, const wchar_t* value);
|
|---|
| 48 | NSCAPI::errorReturn NSAPISetSettingsInt(const wchar_t* section, const wchar_t* key, int value);
|
|---|
| 49 | NSCAPI::errorReturn NSAPISetSettingsBool(const wchar_t* section, const wchar_t* key, int value);
|
|---|
| 50 | NSCAPI::errorReturn NSAPIWriteSettings(const wchar_t* key);
|
|---|
| 51 | NSCAPI::errorReturn NSAPIReadSettings(const wchar_t* key);
|
|---|
| 52 | NSCAPI::errorReturn NSAPIRehash(int flag);
|
|---|
| 53 | NSCAPI::errorReturn NSAPIDescribeCommand(const wchar_t*,wchar_t*,unsigned int);
|
|---|
| 54 | NSCAPI::errorReturn NSAPIGetAllCommandNames(wchar_t***, unsigned int *);
|
|---|
| 55 | NSCAPI::errorReturn NSAPIReleaseAllCommandNamessBuffer(wchar_t***, unsigned int *);
|
|---|
| 56 | NSCAPI::errorReturn NSAPIRegisterCommand(unsigned int, const wchar_t*,const wchar_t*);
|
|---|
| 57 | NSCAPI::errorReturn NSAPISettingsRegKey(const wchar_t*, const wchar_t*, int, const wchar_t*, const wchar_t*, const wchar_t*, int);
|
|---|
| 58 | NSCAPI::errorReturn NSAPISettingsRegPath(const wchar_t*, const wchar_t*, const wchar_t*, int);
|
|---|
| 59 | NSCAPI::errorReturn NSAPIGetPluginList(int*, NSCAPI::plugin_info*[]);
|
|---|
| 60 | NSCAPI::errorReturn NSAPIReleasePluginList(int,NSCAPI::plugin_info*[]);
|
|---|
| 61 | NSCAPI::errorReturn NSAPISettingsSave(void);
|
|---|
| 62 | NSCAPI::errorReturn NSAPINotify(const wchar_t*, const wchar_t*, NSCAPI::nagiosReturn, char*, unsigned int);
|
|---|
| 63 | void NSAPIDestroyBuffer(char**);
|
|---|
| 64 | NSCAPI::errorReturn NSAPIExpandPath(const wchar_t*,wchar_t*,unsigned int); |
|---|