/usr/share/aolserver4/include/nsdb.h is in aolserver4-dev 4.5.1-18.1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 | /*
* The contents of this file are subject to the AOLserver Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://aolserver.com/.
*
* Software distributed under the License is distributed on an "AS IS"
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
* the License for the specific language governing rights and limitations
* under the License.
*
* The Original Code is AOLserver Code and related documentation
* distributed by AOL.
*
* The Initial Developer of the Original Code is America Online,
* Inc. Portions created by AOL are Copyright (C) 1999 America Online,
* Inc. All Rights Reserved.
*
* Alternatively, the contents of this file may be used under the terms
* of the GNU General Public License (the "GPL"), in which case the
* provisions of GPL are applicable instead of those above. If you wish
* to allow use of your version of this file only under the terms of the
* GPL and not to allow others to use your version of this file under the
* License, indicate your decision by deleting the provisions above and
* replace them with the notice and other provisions required by the GPL.
* If you do not delete the provisions above, a recipient may use your
* version of this file under either the License or the GPL.
*/
/*
* nsdb.h --
*
* Public types and function declarations for the nsdb module.
*
* $Header: /cvsroot/aolserver/aolserver/include/nsdb.h,v 1.2 2005/08/17 21:21:18 jgdavidson Exp $
*/
#ifndef NSDB_H
#define NSDB_H
#include "ns.h"
#ifdef NSDB_EXPORTS
#undef NS_EXTERN
#ifdef __cpluscplus
#define NS_EXTERN extern "C" NS_EXPORT
#else
#define NS_EXTERN extern NS_EXPORT
#endif
#endif
/*
* The following are nsdb return codes.
*/
#define NS_DML 1
#define NS_ROWS 2
#define NS_END_DATA 4
#define NS_NO_DATA 8
/*
* The following enum defines known nsdb driver function ids.
*/
typedef enum {
DbFn_Name,
DbFn_DbType,
DbFn_ServerInit,
DbFn_OpenDb,
DbFn_CloseDb,
DbFn_DML,
DbFn_Select,
DbFn_GetRow,
DbFn_Flush,
DbFn_Cancel,
DbFn_GetTableInfo,
DbFn_TableList,
DbFn_BestRowId,
DbFn_Exec,
DbFn_BindRow,
DbFn_ResetHandle,
DbFn_SpStart,
DbFn_SpSetParam,
DbFn_SpExec,
DbFn_SpReturnCode,
DbFn_SpGetParams,
DbFn_End
} Ns_DbProcId;
/*
* Database procedure structure used when registering
* a driver.
*/
typedef struct Ns_DbProc {
Ns_DbProcId id;
void *func;
} Ns_DbProc;
/*
* Database handle structure.
*/
typedef struct Ns_DbHandle {
char *driver;
char *datasource;
char *user;
char *password;
void *connection;
char *poolname;
int connected;
int verbose;
Ns_Set *row;
char cExceptionCode[6];
Ns_DString dsExceptionMsg;
void *context;
void *statement;
int fetchingRows;
} Ns_DbHandle;
/*
* The following structure is no longer supported and only provided to
* allow existing database modules to compile. All of the TableInfo
* routines now log an unsupported use error and return an error result.
*/
typedef struct {
Ns_Set *table;
int size;
int ncolumns;
Ns_Set **columns;
} Ns_DbTableInfo;
/*
* dbdrv.c:
*/
NS_EXTERN int Ns_DbRegisterDriver(char *driver, Ns_DbProc *procs);
NS_EXTERN char *Ns_DbDriverName(Ns_DbHandle *handle);
NS_EXTERN char *Ns_DbDriverDbType(Ns_DbHandle *handle);
NS_EXTERN int Ns_DbDML(Ns_DbHandle *handle, char *sql);
NS_EXTERN Ns_Set *Ns_DbSelect(Ns_DbHandle *handle, char *sql);
NS_EXTERN int Ns_DbExec(Ns_DbHandle *handle, char *sql);
NS_EXTERN Ns_Set *Ns_DbBindRow(Ns_DbHandle *handle);
NS_EXTERN int Ns_DbGetRow(Ns_DbHandle *handle, Ns_Set *row);
NS_EXTERN int Ns_DbFlush(Ns_DbHandle *handle);
NS_EXTERN int Ns_DbCancel(Ns_DbHandle *handle);
NS_EXTERN int Ns_DbResetHandle(Ns_DbHandle *handle);
NS_EXTERN int Ns_DbSpStart(Ns_DbHandle *handle, char *procname);
NS_EXTERN int Ns_DbSpSetParam(Ns_DbHandle *handle, char *paramname,
char *paramtype, char *inout, char *value);
NS_EXTERN int Ns_DbSpExec(Ns_DbHandle *handle);
NS_EXTERN int Ns_DbSpReturnCode(Ns_DbHandle *handle, char *returnCode,
int bufsize);
NS_EXTERN Ns_Set *Ns_DbSpGetParams(Ns_DbHandle *handle);
/*
* dbinit.c:
*/
NS_EXTERN char *Ns_DbPoolDescription(char *pool);
NS_EXTERN char *Ns_DbPoolDefault(char *server);
NS_EXTERN char *Ns_DbPoolList(char *server);
NS_EXTERN int Ns_DbPoolAllowable(char *server, char *pool);
NS_EXTERN void Ns_DbPoolPutHandle(Ns_DbHandle *handle);
NS_EXTERN Ns_DbHandle *Ns_DbPoolTimedGetHandle(char *pool, int wait);
NS_EXTERN Ns_DbHandle *Ns_DbPoolGetHandle(char *pool);
NS_EXTERN int Ns_DbPoolGetMultipleHandles(Ns_DbHandle **handles, char *pool,
int nwant);
NS_EXTERN int Ns_DbPoolTimedGetMultipleHandles(Ns_DbHandle **handles, char *pool,
int nwant, int wait);
NS_EXTERN int Ns_DbBouncePool(char *pool);
/*
* dbtcl.c:
*/
NS_EXTERN int Ns_TclDbGetHandle(Tcl_Interp *interp, char *handleId,
Ns_DbHandle **handle);
/*
* dbutil.c:
*/
NS_EXTERN void Ns_DbQuoteValue(Ns_DString *pds, char *string);
NS_EXTERN Ns_Set *Ns_Db0or1Row(Ns_DbHandle *handle, char *sql, int *nrows);
NS_EXTERN Ns_Set *Ns_Db1Row(Ns_DbHandle *handle, char *sql);
NS_EXTERN int Ns_DbInterpretSqlFile(Ns_DbHandle *handle, char *filename);
NS_EXTERN void Ns_DbSetException(Ns_DbHandle *handle, char *code, char *msg);
#endif /* NSDB_H */
|