source: nscp/service/core_api.h @ 28f6a64

0.4.00.4.10.4.2
Last change on this file since 28f6a64 was f7a074d, checked in by Michael Medin <michael@…>, 19 months ago
  • Had some "vacation" so no updates for a while
  • A lot of fixes to the NSCA parts (now 100% compatible with old settings file)
  • Added option to read sections (to plugin API)
  • Fixed issues in settings wrapper so child paths are also mapped (not just keys)
  • Many fixes related to NRPE/NSCA/*
  • "RC quality" expect RC within the week (only need to fix default config file somehow)
  • Upgraded all unit test to use the simplified API
  • Fixed a some unicode issues in PythonScript module
  • Improved threading a bit
  • Fixed CheckSystem (service check)
  • Fixed duplicate keys (when replacing) in old settings client
  • Property mode set to 100644
File size: 5.2 KB
Line 
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
32LPVOID NSAPILoader(const wchar_t*buffer);
33NSCAPI::errorReturn NSAPIGetApplicationName(wchar_t*buffer, unsigned int bufLen);
34NSCAPI::errorReturn NSAPIGetBasePath(wchar_t*buffer, unsigned int bufLen);
35NSCAPI::errorReturn NSAPIGetApplicationVersionStr(wchar_t*buffer, unsigned int bufLen);
36NSCAPI::errorReturn NSAPIGetSettingsString(const wchar_t* section, const wchar_t* key, const wchar_t* defaultValue, wchar_t* buffer, unsigned int bufLen);
37int NSAPIGetSettingsInt(const wchar_t* section, const wchar_t* key, int defaultValue);
38void NSAPIMessage(const char* data,unsigned int count);
39void NSAPIStopServer(void);
40NSCAPI::nagiosReturn NSAPIInject(const wchar_t* command, const char *request_buffer, const unsigned int request_buffer_len, char **response_buffer, unsigned int *response_buffer_len);
41NSCAPI::nagiosReturn NSAPIExecCommand(const wchar_t* target, const wchar_t* command, const char *request_buffer, const unsigned int request_buffer_len, char **response_buffer, unsigned int *response_buffer_len);
42NSCAPI::errorReturn NSAPIGetSettingsSection(const wchar_t*, wchar_t***, unsigned int *);
43NSCAPI::errorReturn NSAPIGetSettingsSections(const wchar_t*, wchar_t***, unsigned int *);
44NSCAPI::errorReturn NSAPIReleaseSettingsSectionBuffer(wchar_t*** aBuffer, unsigned int * bufLen);
45NSCAPI::boolReturn NSAPICheckLogMessages(int messageType);
46NSCAPI::errorReturn NSAPIEncrypt(unsigned int algorithm, const wchar_t* inBuffer, unsigned int inBufLen, wchar_t* outBuf, unsigned int *outBufLen);
47NSCAPI::errorReturn NSAPIDecrypt(unsigned int algorithm, const wchar_t* inBuffer, unsigned int inBufLen, wchar_t* outBuf, unsigned int *outBufLen);
48NSCAPI::errorReturn NSAPISetSettingsString(const wchar_t* section, const wchar_t* key, const wchar_t* value);
49NSCAPI::errorReturn NSAPISetSettingsInt(const wchar_t* section, const wchar_t* key, int value);
50NSCAPI::errorReturn NSAPISetSettingsBool(const wchar_t* section, const wchar_t* key, int value);
51NSCAPI::errorReturn NSAPIWriteSettings(const wchar_t* key);
52NSCAPI::errorReturn NSAPIReadSettings(const wchar_t* key);
53NSCAPI::errorReturn NSAPIRehash(int flag);
54NSCAPI::errorReturn NSAPIDescribeCommand(const wchar_t*,wchar_t*,unsigned int);
55NSCAPI::errorReturn NSAPIGetAllCommandNames(wchar_t***, unsigned int *);
56NSCAPI::errorReturn NSAPIReleaseAllCommandNamessBuffer(wchar_t***, unsigned int *);
57NSCAPI::errorReturn NSAPIRegisterCommand(unsigned int, const wchar_t*,const wchar_t*);
58NSCAPI::errorReturn NSAPISettingsRegKey(const wchar_t*, const wchar_t*, int, const wchar_t*, const wchar_t*, const wchar_t*, int);
59NSCAPI::errorReturn NSAPISettingsRegPath(const wchar_t*, const wchar_t*, const wchar_t*, int);
60NSCAPI::errorReturn NSAPIGetPluginList(int*, NSCAPI::plugin_info*[]);
61NSCAPI::errorReturn NSAPIReleasePluginList(int,NSCAPI::plugin_info*[]);
62NSCAPI::errorReturn NSAPISettingsSave(void);
63NSCAPI::errorReturn NSAPINotify(const wchar_t* channel, const char* buffer, unsigned int buffer_len, char ** result_buffer, unsigned int *result_buffer_len);
64void NSAPIDestroyBuffer(char**);
65NSCAPI::errorReturn NSAPIExpandPath(const wchar_t*,wchar_t*,unsigned int);
66NSCAPI::errorReturn NSAPIRegisterSubmissionListener(unsigned int plugin_id, const wchar_t* channel);
67NSCAPI::errorReturn NSAPIRegisterRoutingListener(unsigned int plugin_id, const wchar_t* channel);
68NSCAPI::errorReturn NSAPIReload(const wchar_t*);
Note: See TracBrowser for help on using the repository browser.