source: nscp/service/core_api.h @ 8840f09

0.4.00.4.10.4.2
Last change on this file since 8840f09 was 2c95d22, checked in by Michael Medin <michael@…>, 22 months ago

2011-08-14 MickeM

  • Rename Function to Registry in PythonScript API as well as some other function renames
  • Started to clean up the helpers around the API
  • Added support for execute to PythonScripts? to execute commands
  • BUG: just realised that static plugin instances prevent multiple instances :) Will fix but not now as it is not important (for me)...
  • Added initial support for channels to PythonScript Core still lacks support for subscribing to arbitrary channel
  • Property mode set to 100644
File size: 4.8 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* 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 NSAPIReleaseSettingsSectionBuffer(wchar_t*** aBuffer, unsigned int * bufLen);
44NSCAPI::boolReturn NSAPICheckLogMessages(int messageType);
45NSCAPI::errorReturn NSAPIEncrypt(unsigned int algorithm, const wchar_t* inBuffer, unsigned int inBufLen, wchar_t* outBuf, unsigned int *outBufLen);
46NSCAPI::errorReturn NSAPIDecrypt(unsigned int algorithm, const wchar_t* inBuffer, unsigned int inBufLen, wchar_t* outBuf, unsigned int *outBufLen);
47NSCAPI::errorReturn NSAPISetSettingsString(const wchar_t* section, const wchar_t* key, const wchar_t* value);
48NSCAPI::errorReturn NSAPISetSettingsInt(const wchar_t* section, const wchar_t* key, int value);
49NSCAPI::errorReturn NSAPISetSettingsBool(const wchar_t* section, const wchar_t* key, int value);
50NSCAPI::errorReturn NSAPIWriteSettings(const wchar_t* key);
51NSCAPI::errorReturn NSAPIReadSettings(const wchar_t* key);
52NSCAPI::errorReturn NSAPIRehash(int flag);
53NSCAPI::errorReturn NSAPIDescribeCommand(const wchar_t*,wchar_t*,unsigned int);
54NSCAPI::errorReturn NSAPIGetAllCommandNames(wchar_t***, unsigned int *);
55NSCAPI::errorReturn NSAPIReleaseAllCommandNamessBuffer(wchar_t***, unsigned int *);
56NSCAPI::errorReturn NSAPIRegisterCommand(unsigned int, const wchar_t*,const wchar_t*);
57NSCAPI::errorReturn NSAPISettingsRegKey(const wchar_t*, const wchar_t*, int, const wchar_t*, const wchar_t*, const wchar_t*, int);
58NSCAPI::errorReturn NSAPISettingsRegPath(const wchar_t*, const wchar_t*, const wchar_t*, int);
59NSCAPI::errorReturn NSAPIGetPluginList(int*, NSCAPI::plugin_info*[]);
60NSCAPI::errorReturn NSAPIReleasePluginList(int,NSCAPI::plugin_info*[]);
61NSCAPI::errorReturn NSAPISettingsSave(void);
62NSCAPI::errorReturn NSAPINotify(const wchar_t*, const wchar_t*, NSCAPI::nagiosReturn, char*, unsigned int);
63void NSAPIDestroyBuffer(char**);
64NSCAPI::errorReturn NSAPIExpandPath(const wchar_t*,wchar_t*,unsigned int);
Note: See TracBrowser for help on using the repository browser.