Various header file clean-ups, should now build from dist

This commit is contained in:
alexhudson
2007-08-31 17:55:57 +00:00
parent 02ea3e339f
commit c14431d623
44 changed files with 8 additions and 1530 deletions
+1 -1
View File
@@ -628,6 +628,7 @@ ac_configure_args="$ac_configure_args --enable-threadsafe --enable-cross-thread-
# disabled agents
# src/agents/mailprox/Makefile
# src/agents/rules/Makefile
# src/agents/pluspack/Makefile
#src/libs/mdb/Makefile
#src/libs/mdb-file/Makefile
@@ -654,7 +655,6 @@ src/agents/generic/Makefile
src/agents/imap/Makefile
src/agents/imap/tests/Makefile
src/agents/itip/Makefile
src/agents/pluspack/Makefile
src/agents/pop/Makefile
src/agents/queue/Makefile
src/agents/smtp/Makefile
+1 -4
View File
@@ -13,7 +13,6 @@ bongoinclude_HEADERS := \
include/bongostore.h \
include/bongostream.h \
include/logger.h \
include/management.h \
include/memmgr.h \
include/msgaddr.h \
include/msgapi.h \
@@ -36,9 +35,7 @@ bongoinclude_HEADERS := \
include/xplschema.h \
include/xplservice.h \
include/xplthread.h \
include/xplutil.h \
include/connmgr.h \
include/cmlib.h
include/xplutil.h
include/all:
include/clean: clean
-2
View File
@@ -25,7 +25,6 @@
#define BONGOAGENT_H
#include <xpl.h>
#include <mdb.h>
#include <logger.h>
#include <bongothreadpool.h>
#include <connio.h>
@@ -75,7 +74,6 @@ struct _BongoAgent {
BongoAgentState state;
MDBHandle directoryHandle;
LoggingHandle *loggingHandle;
bongo_ssl_context *sslContext;
-87
View File
@@ -1,87 +0,0 @@
/****************************************************************************
* <Novell-copyright>
* Copyright (c) 2001 Novell, Inc. All Rights Reserved.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of version 2 of the GNU General Public License
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, contact Novell, Inc.
*
* To contact Novell about this file by physical or electronic mail, you
* may find current contact information at www.novell.com.
* </Novell-copyright>
****************************************************************************/
#ifndef _BONGO_CM_LIBRARY_H
#define _BONGO_CM_LIBRARY_H
#include <mdb.h>
#include <connio.h>
#include <connmgr.h>
/*
CMInitialize() MUST be called before any other call in the library.
If it is not called the other calls will be unable to authenticate
to the connection mananager.
*/
BOOL CMInitialize(MDBHandle directoryHandle, unsigned char *service);
/*
Request permission for the specified address to connect to the specified
service.
CM_RESULT_ALLOWED will be returned if the connection is allowed. If not
CM_RESULT_DENY_TEMPORARY or CM_RESULT_DENY_PERMANENT will be returned.
*/
int CMVerifyConnect(unsigned long address, unsigned char *comment, BOOL *requireAuth);
/*
Request permission for the specified address to relay.
CM_RESULT_ALLOWED will be returned if the connection is allowed. If not
CM_RESULT_DENY_TEMPORARY or CM_RESULT_DENY_PERMANENT will be returned.
if CM_RESULT_ALLOWED is returned the buffer pointed to by user will be
filled out with the name of the user that authenticated.
*/
int CMVerifyRelay(unsigned long address, unsigned char *user);
/*
Inform the Connection Manager that a connection started with CMConnect()
has ended.
The result will be CM_RESULT_OK if the notification was sent succesfully.
*/
int CMDisconnected(unsigned long address);
/*
Inform the Connection Manager that a user has authenticated from the
specified address.
The result will be CM_RESULT_OK if the notification was sent succesfully.
*/
int CMAuthenticated(unsigned long address, unsigned char *user);
int CMDelivered(unsigned long address, unsigned long recipients);
int CMReceived(unsigned long address, unsigned long local, unsigned long invalid, unsigned long remote);
int CMFoundVirus(unsigned long address, unsigned long recipients, unsigned char *name);
int CMSpamFound(unsigned long address, unsigned long recipients);
int CMDOSDetected(unsigned long address, unsigned char *description);
/*
Send a custom command object to the Connection Manager. You do not
need to fill out the pass field. The library will take care of
authentication for you. If the request was sent succesfully TRUE
will be returned and the result object will be filled out.
*/
BOOL CMSendCommand(ConnMgrCommand *command, ConnMgrResult *result);
#endif /* _BONGO_CM_LIBRARY_H */
-1284
View File
File diff suppressed because it is too large Load Diff
-36
View File
@@ -22,7 +22,6 @@
#ifndef MSGAPI_H
#define MSGAPI_H
#include <mdb.h>
#include <connio.h>
#include <sqlite3.h>
@@ -494,44 +493,15 @@ EXPORT BOOL MsgGetServerCredential(char *buffer);
extern "C" {
#endif
typedef BOOL (*FindObjectCacheType)(const unsigned char *, unsigned char *, unsigned char *, struct sockaddr_in *, MDBValueStruct *);
typedef BOOL (*FindObjectCacheExType)(const unsigned char *, unsigned char *, unsigned char *, struct sockaddr_in *, BOOL *, MDBValueStruct *);
typedef const unsigned char *(*FindObjectStoreCacheType)(const unsigned char *User, const unsigned char *DefaultPath);
typedef struct _MSGCacheInitStruct {
MDBHandle *DirectoryHandle;
XplRWLock *ConfigLock;
struct sockaddr_in *ServerAddr;
MDBValueStruct *ServerContexts;
MDBValueStruct *StorePath;
FindObjectCacheType DefaultFindObject;
FindObjectCacheExType DefaultFindObjectEx;
FindObjectStoreCacheType DefaultFindObjectStore;
unsigned char DefaultPathChar;
} MSGCacheInitStruct;
typedef BOOL (*FindObjectCacheInitType)(MSGCacheInitStruct *initData, unsigned char *description);
typedef BOOL (*FindObjectCacheShutdownType)(void);
EXPORT void MsgInit(void);
EXPORT BOOL MsgShutdown(void);
EXPORT MDBHandle MsgGetSystemDirectoryHandle(void);
EXPORT const unsigned char *MsgGetServerDN(unsigned char *buffer);
EXPORT MDBHandle MsgDirectoryHandle(void);
EXPORT BOOL MsgGetConfigProperty(unsigned char *Buffer, unsigned char *Property);
EXPORT BOOL MsgFindObject(const unsigned char *name, unsigned char *dn, unsigned char *type, struct sockaddr_in *nmap, MDBValueStruct *v);
EXPORT BOOL MsgFindObjectEx(const unsigned char *name, unsigned char *dn, unsigned char *type, struct sockaddr_in *nmap, BOOL *disabled, MDBValueStruct *v);
EXPORT const unsigned char *MsgFindUserStore(const unsigned char *user, const unsigned char *defaultPath);
EXPORT BOOL MsgFindUserNmap(const unsigned char *user, unsigned char *nmap, int nmap_len, unsigned short *port);
EXPORT BOOL MsgReadIP(const unsigned char *object, unsigned char *type, MDBValueStruct *v);
EXPORT const unsigned char *MsgGetDBFDir(char *directory);
EXPORT const unsigned char *MsgGetWorkDir(char *directory);
EXPORT const unsigned char *MsgGetNLSDir(char *directory);
@@ -539,12 +509,6 @@ EXPORT const unsigned char *MsgGetLibDir(char *directory);
EXPORT const unsigned char *MsgGetBinDir(char *directory);
EXPORT const unsigned char *MsgGetTLSCertPath(char *path);
EXPORT const unsigned char *MsgGetTLSKeyPath(char *path);
EXPORT unsigned char *MsgGetUserEmailAddress(const unsigned char *userDn, MDBValueStruct *userData, unsigned char *buffer, unsigned long bufLen);
EXPORT unsigned char *MsgGetUserDisplayName(const unsigned char *userDn, MDBValueStruct *userData);
EXPORT BOOL MsgGetUserSettingsDN(const unsigned char *userDn, unsigned char *configDn, MDBValueStruct *v, BOOL create);
EXPORT long MsgGetUserSetting(const unsigned char *userDn, unsigned char *attribute, MDBValueStruct *vOut);
EXPORT BOOL MsgSetUserSetting(const unsigned char *userDn, unsigned char *attribute, MDBValueStruct *vIn);
EXPORT BOOL MsgAddUserSetting(const unsigned char *userDn, unsigned char *attribute, unsigned char *value, MDBValueStruct *vIn);
EXPORT unsigned long MsgGetHostIPAddress(void);
EXPORT unsigned long MsgGetAgentBindIPAddress(void);
-4
View File
@@ -85,10 +85,6 @@
extern "C" {
#endif
/* The MSG Feature API Description */
EXPORT BOOL MsgGetUserFeature(const unsigned char *UserDN, unsigned char FeatureRow, unsigned long FeatureCol, unsigned char *Attribute, MDBValueStruct *VReturn);
EXPORT BOOL MsgDomainExists(const unsigned char *Domain, unsigned char *DomainObjectDN);
#ifdef __cplusplus
}
#endif
-1
View File
@@ -23,7 +23,6 @@
#ifndef _BONGO_NMAP_LIBRARY_H
#define _BONGO_NMAP_LIBRARY_H
#include <mdb.h>
#include <connio.h>
#include <nmap.h>
#include <bongocal.h>
-1
View File
@@ -23,7 +23,6 @@
#define _ALARM_H
#include <connio.h>
#include <management.h>
#include <msgapi.h>
#include <nmap.h>
#include <nmlib.h>
-1
View File
@@ -30,7 +30,6 @@
#include <logger.h>
#include <bongoagent.h>
#include <bongoutil.h>
#include <mdb.h>
#include <nmap.h>
#include <nmlib.h>
#include <msgapi.h>
-1
View File
@@ -30,7 +30,6 @@
#include <logger.h>
#include <bongoagent.h>
#include <bongoutil.h>
#include <mdb.h>
#include <nmap.h>
#include <nmlib.h>
#include <msgapi.h>
-1
View File
@@ -1361,7 +1361,6 @@ XplServiceMain(int argc, char *argv[])
AVirus.nmap.ssl.context = NULL;
AVirus.nmap.ssl.config.options = 0;
AVirus.handle.directory = NULL;
AVirus.handle.logging = NULL;
strcpy(AVirus.nmap.address, "127.0.0.1");
+1 -6
View File
@@ -24,7 +24,6 @@
#define _AVIRUS_H
#include <connio.h>
#include <mdb.h>
#include <msgapi.h>
#include <nmap.h>
#include <nmlib.h>
@@ -102,13 +101,11 @@ typedef struct {
Connection *conn;
void *handle;
MDBValueStruct *uservs;
unsigned char *envelope;
unsigned char work[XPL_MAX_PATH + 1];
unsigned char line[CONN_BUFSIZE + 1];
unsigned char command[CONN_BUFSIZE + 1];
unsigned char dn[MDB_MAX_OBJECT_CHARS + 1];
unsigned char dn[101];
struct {
unsigned long used;
@@ -167,8 +164,6 @@ typedef struct _AVirusGlobals {
} nmap;
struct {
MDBHandle directory;
void *logging;
} handle;
-2
View File
@@ -23,8 +23,6 @@
#define _CALCMDD_H
#include <connio.h>
#include <mdb.h>
#include <management.h>
#include <msgapi.h>
#include <nmap.h>
#include <nmlib.h>
-2
View File
@@ -23,8 +23,6 @@
#define _COLLECTOR_H
#include <connio.h>
#include <mdb.h>
#include <management.h>
#include <msgapi.h>
#include <nmap.h>
#include <nmlib.h>
-2
View File
@@ -23,8 +23,6 @@
#define _GENERIC_H
#include <connio.h>
#include <mdb.h>
#include <management.h>
#include <msgapi.h>
#include <nmap.h>
#include <nmlib.h>
-1
View File
@@ -25,7 +25,6 @@
#include <logger.h>
#include <mdb.h>
#include <msgapi.h>
#include "imapd.h"
-1
View File
@@ -25,7 +25,6 @@
#include <logger.h>
#include <mdb.h>
#include <msgapi.h>
#include "imapd.h"
-1
View File
@@ -25,7 +25,6 @@
#include <logger.h>
#include <mdb.h>
#include <msgapi.h>
#include "imapd.h"
-2
View File
@@ -23,8 +23,6 @@
#define _ITIP_H
#include <connio.h>
#include <mdb.h>
#include <management.h>
#include <msgapi.h>
#include <nmap.h>
#include <nmlib.h>
-2
View File
@@ -23,10 +23,8 @@
#define _MAILPROX_H
#include <connio.h>
#include <mdb.h>
#include <msgapi.h>
#include <nmap.h>
#include <management.h>
#define PRODUCT_SHORT_NAME "mailprox.nlm"
-1
View File
@@ -25,7 +25,6 @@
#include <memmgr.h>
#include <logger.h>
#include <bongoutil.h>
#include <mdb.h>
#include <nmap.h>
#include <nmlib.h>
#include <msgapi.h>
-2
View File
@@ -23,8 +23,6 @@
#define _BONGOPLUSPACK_H
#include <connio.h>
#include <mdb.h>
#include <management.h>
#include <msgapi.h>
#include <streamio.h>
#include <nmap.h>
-2
View File
@@ -31,12 +31,10 @@
#include <xpl.h>
#include <bongoutil.h>
#include <connio.h>
#include <mdb.h>
#include <msgapi.h>
#include <logger.h>
#include <nmlib.h>
#include <nmap.h>
#include <management.h>
#include <bongostore.h>
#include <bongoagent.h>
-1
View File
@@ -24,7 +24,6 @@
#include <xpl.h>
#include <connio.h>
#include <management.h>
#include <msgapi.h>
#include <nmap.h>
#include <nmlib.h>
+1 -1
View File
@@ -4778,7 +4778,7 @@ CommandQwait(void *param)
&& ((identifier = strchr(ptr + 1, ' ')) != NULL)
&& (identifier[1])
&& (!isspace(identifier[1]))
&& (strlen(identifier + 1) < MDB_MAX_OBJECT_CHARS)) {
&& (strlen(identifier + 1) < 100)) { // FIXME: REMOVE-MDB 100 was MDB maximum object identifier length
*ptr++ = '\0';
*identifier++ = '\0';
+1 -1
View File
@@ -36,7 +36,7 @@ typedef struct _QueuePushClient {
unsigned long usageCount;
unsigned long errorCount;
unsigned char identifier[MDB_MAX_OBJECT_CHARS + 1];
unsigned char identifier[101];
} QueuePushClient;
typedef struct _Queue {
-1
View File
@@ -26,7 +26,6 @@
#include <xpl.h>
#include <connio.h>
#include <management.h>
#include <msgapi.h>
#include <nmap.h>
#include <nmlib.h>
-1
View File
@@ -25,7 +25,6 @@
#include <memmgr.h>
#include <logger.h>
#include <bongoutil.h>
#include <mdb.h>
#include <nmap.h>
#include <nmlib.h>
#include <msgapi.h>
-2
View File
@@ -23,8 +23,6 @@
#define _BONGORULES_H
#include <connio.h>
#include <mdb.h>
#include <management.h>
#include <msgapi.h>
#include <streamio.h>
#include <nmap.h>
-1
View File
@@ -22,7 +22,6 @@
#include <config.h>
#include <xpl.h>
#include <logger.h>
#include <mdb.h>
#include <nmap.h>
#include "stored.h"
-1
View File
@@ -28,7 +28,6 @@
#include <logger.h>
#include <bongoutil.h>
#include <bongoagent.h>
#include <mdb.h>
#include <nmap.h>
#include <nmlib.h>
#include <msgapi.h>
-1
View File
@@ -28,7 +28,6 @@
#include <logger.h>
#include <bongoutil.h>
#include <bongoagent.h>
#include <mdb.h>
#include <nmap.h>
#include <nmlib.h>
#include <msgapi.h>
-3
View File
@@ -21,9 +21,6 @@
#include <config.h>
#include <xpl.h>
// #include <mdb.h>
// #include <nmap.h>
// #include <nmlib.h>
#include <rfc2231.h>
#include "stored.h"
-1
View File
@@ -26,7 +26,6 @@
#include <logger.h>
#include <bongoutil.h>
#include <bongoagent.h>
#include <mdb.h>
#include <nmap.h>
#include <nmlib.h>
#include <msgapi.h>
-2
View File
@@ -28,8 +28,6 @@ XPL_BEGIN_C_LINKAGE
#include <bongoutil.h>
#include <connio.h>
#include <mdb.h>
#include <management.h>
#include <msgapi.h>
#include <bongoagent.h>
#include <nmap.h>
-1
View File
@@ -20,7 +20,6 @@
#include <bongoutil.h>
#include <errno.h>
#include <connio.h>
#include <mdb.h>
enum BongoAdminActions {
BONGO_ADMIN_ADD,
+3 -6
View File
@@ -60,9 +60,6 @@ static BOOL ChildError = FALSE;
static BOOL ReloadNow = FALSE;
static int HighestPriority = 0;
MDBHandle DirectoryHandle = NULL;
char ServerDN[MDB_MAX_OBJECT_CHARS + 1];
static BongoAgent *
FindAgentByPid(pid_t pid)
{
@@ -573,8 +570,8 @@ StartSlapd(BOOL killExisting)
{
int status = 0;
int err;
char buf[MDB_MAX_OBJECT_CHARS + 1];
char url[MDB_MAX_OBJECT_CHARS + 1];
char buf[101]; // FIXME: REMOVE-MDB this was some maximum
char url[101];
char *host = "127.0.0.1";
int port = 0;
@@ -623,7 +620,7 @@ StartSlapd(BOOL killExisting)
return 1;
}
snprintf(url, MDB_MAX_OBJECT_CHARS, "ldap://%s:%d", host, port);
snprintf(url, 100, "ldap://%s:%d", host, port);
printf(_("bongo-manager: starting managed slapd...\n"));
-1
View File
@@ -30,7 +30,6 @@
#include <bongoutil.h>
#include <nmap.h>
#include <nmlib.h>
#include <mdb.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
-3
View File
@@ -23,13 +23,10 @@
#define MSGAPIP_H
#include <xpl.h>
#include <mdb.h>
#include <msgapi.h>
/* msgapi.c */
int MsgGetParentAttribute(const unsigned char *userDn, unsigned char *attribute, MDBValueStruct *v);
MDBHandle MsgDirectoryHandle(void);
BOOL MsgExiting(void);
/* msgdate.c */
-1
View File
@@ -22,7 +22,6 @@
#include <config.h>
#include <xpl.h>
#include <mdb.h>
#include <msgapi.h>
#include <msgdate.h>
#include <nmap.h>
-3
View File
@@ -31,7 +31,6 @@
#include "bootstrap.h"
#include "msgapi-defs.h"
#include <bongo-config.h>
#include <mdb.h>
#include <memmgr.h>
#include <msgapi.h>
@@ -54,7 +53,6 @@ PyMethodDef MsgApiMethods[] = {
PyMODINIT_FUNC
initbootstrap()
{
MDBHandle directoryHandle=NULL;
char dbfdir[PATH_MAX];
/* Initialize the various bongo libraries */
@@ -68,7 +66,6 @@ initbootstrap()
PyObject *module = Py_InitModule("bootstrap", ModuleMethods);
/* Add the Bongo libs */
AddLibrary(module, "mdb", MdbMethods, MdbEnums);
AddLibrary(module, "msgapi", MsgApiMethods, MsgApiEnums);
}
-2
View File
@@ -25,7 +25,6 @@
#include "pybongo.h"
#include <bongo-config.h>
#include <xpl.h>
#include <mdb.h>
#include <connio.h>
#include <memmgr.h>
#include <msgapi.h>
@@ -104,7 +103,6 @@ initlibs()
/* Add the Bongo libs */
AddLibrary(module, "cal", CalMethods, NULL);
AddLibrary(module, "calcmd", CalCmdMethods, CalCmdEnums);
AddLibrary(module, "mdb", MdbMethods, MdbEnums);
AddLibrary(module, "msgapi", MsgApiMethods, MsgApiEnums);
AddLibrary(module, "streamio", StreamIOMethods, NULL);
AddLibrary(module, "bongojson", BongoJsonMethods, NULL);
-50
View File
@@ -72,54 +72,6 @@ msgapi_CollectUser(PyObject *self, PyObject *args)
return Py_None;
}
PyDoc_STRVAR(DirectoryHandle_doc,
"DirectoryHandle() -> handle\n\
\n\
Return the directory handle used by libmsgapi.");
static PyObject *
msgapi_DirectoryHandle(PyObject *self, PyObject *args)
{
MDBHandle handle;
if (!PyArg_ParseTuple(args, "")) {
return NULL;
}
handle = (MDBHandle)MsgDirectoryHandle();
if (handle == NULL) {
Py_INCREF(Py_None);
return Py_None;
}
return PyCObject_FromVoidPtr(handle, NULL);
}
PyDoc_STRVAR(FindObject_doc,
"FindObject(u) -> string dn\n\
\n\
Return a string containing the dn of user u.");
static PyObject *
msgapi_FindObject(PyObject *self, PyObject *args)
{
unsigned char *user;
unsigned int len=MDB_MAX_OBJECT_CHARS+1;
unsigned char buf[len];
if (!PyArg_ParseTuple(args, "s", &user)) {
return NULL;
}
if (!MsgFindObject(user, buf, NULL, NULL, NULL)) {
Py_INCREF(Py_None);
return Py_None;
}
return Py_BuildValue("s", buf);
}
PyDoc_STRVAR(GetUserFeature_doc,
"GetUserFeature(dn, featurename, ) -> array of strings\n\
\n\
@@ -367,8 +319,6 @@ extern PyObject *msgapi_GetConfigProperty(PyObject *, PyObject *);
PyMethodDef MsgApiMethods[] = {
{"CollectAllUsers", msgapi_CollectAllUsers, METH_VARARGS | METH_STATIC, CollectAllUsers_doc},
{"CollectUser", msgapi_CollectUser, METH_VARARGS | METH_STATIC, CollectUser_doc},
{"DirectoryHandle", msgapi_DirectoryHandle, METH_VARARGS | METH_STATIC, DirectoryHandle_doc},
{"FindObject", msgapi_FindObject, METH_VARARGS | METH_STATIC, FindObject_doc},
{"ImportIcsUrl", msgapi_ImportIcsUrl, METH_VARARGS | METH_STATIC, ImportIcsUrl_doc},
{"ImportIcs", msgapi_ImportIcs, METH_VARARGS | METH_STATIC, ImportIcs_doc},
{"IcsSubscribe", msgapi_IcsSubscribe, METH_VARARGS | METH_STATIC, IcsSubscribe_doc},