| 1 | /********************************************************************* |
| 2 | * |
| 3 | * This is based on code created by Peter Harvey, |
| 4 | * (pharvey@codebydesign.com). |
| 5 | * |
| 6 | * Modified and extended by Nick Gorham |
| 7 | * (nick@lurcher.org). |
| 8 | * |
| 9 | * Any bugs or problems should be considered the fault of Nick and not |
| 10 | * Peter. |
| 11 | * |
| 12 | * copyright (c) 1999 Nick Gorham |
| 13 | * |
| 14 | * This library is free software; you can redistribute it and/or |
| 15 | * modify it under the terms of the GNU Lesser General Public |
| 16 | * License as published by the Free Software Foundation; either |
| 17 | * version 2 of the License, or (at your option) any later version. |
| 18 | * |
| 19 | * This library is distributed in the hope that it will be useful, |
| 20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 22 | * Lesser General Public License for more details. |
| 23 | * |
| 24 | * You should have received a copy of the GNU Lesser General Public |
| 25 | * License along with this library; if not, write to the Free Software |
| 26 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 27 | * |
| 28 | ********************************************************************** |
| 29 | * |
| 30 | * $Id: uodbc_stats.h,v 1.1.1.1 2001/10/17 16:40:28 lurcher Exp $ |
| 31 | * |
| 32 | * $Log: uodbc_stats.h,v $ |
| 33 | * Revision 1.1.1.1 2001/10/17 16:40:28 lurcher |
| 34 | * |
| 35 | * First upload to SourceForge |
| 36 | * |
| 37 | * Revision 1.2 2000/12/19 07:28:45 pharvey |
| 38 | * - added first pass at Stats page content |
| 39 | * - wrapped public stats functions for C++ |
| 40 | * |
| 41 | * Revision 1.1 2000/12/18 11:54:22 martin |
| 42 | * |
| 43 | * handle statistic API. |
| 44 | * |
| 45 | * |
| 46 | **********************************************************************/ |
| 47 | #ifndef UODBC__stats_h |
| 48 | #define UODBC__stats_h 1 |
| 49 | |
| 50 | #include <unistd.h> |
| 51 | #include <sys/types.h> |
| 52 | |
| 53 | typedef struct uodbc_stats_retentry |
| 54 | { |
| 55 | unsigned long type; /* type of statistic */ |
| 56 | # define UODBC_STAT_STRING 1 |
| 57 | # define UODBC_STAT_LONG 2 |
| 58 | union |
| 59 | { |
| 60 | char s_value[256]; /* string type */ |
| 61 | long l_value; /* number type */ |
| 62 | } value; |
| 63 | char name[32]; /* name of statistic */ |
| 64 | } uodbc_stats_retentry; |
| 65 | |
| 66 | #if defined(__cplusplus) |
| 67 | extern "C" { |
| 68 | #endif |
| 69 | |
| 70 | int uodbc_open_stats(void **rh, unsigned int mode); |
| 71 | #define UODBC_STATS_READ 0x1 |
| 72 | #define UODBC_STATS_WRITE 0x2 |
| 73 | int uodbc_close_stats(void *rh); |
| 74 | int uodbc_get_stats(void *h, pid_t request_pid, |
| 75 | uodbc_stats_retentry *s, int n_stats); |
| 76 | char *uodbc_stats_error(char *buf, size_t buflen); |
| 77 | |
| 78 | #if defined(__cplusplus) |
| 79 | } |
| 80 | #endif |
| 81 | |
| 82 | #endif /* UODBC__stats_h */ |
| 83 | |
| 84 | |