00001 #ifndef __PRQ_UTILS_H
00002 #define __PRQ_UTILS_H
00003 /*-------------------------------------------------------------------------
00004 * Copyright (c) 1999-2002 Kenneth W. Sodemann (stuffle@charter.net)
00005 *-------------------------------------------------------------------------
00006 * prq_utils
00007 *
00008 * Synopsis:
00009 * Helper routines for modules dealing with the pr_query table.
00010 *
00011 * $Id: prq_utils.h,v 1.9 2002/01/30 00:40:02 stuffle Exp $
00012 *
00013 * This program is free software; you can redistribute it and/or modify
00014 * it under the terms of the GNU General Public License as published by
00015 * the Free Software Foundation; either version 2 of the License, or
00016 * (at your option) any later version.
00017 *
00018 * This program is distributed in the hope that it will be useful,
00019 * but WITHOUT ANY WARRANTY; without even the implied warranty of
00020 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00021 * GNU General Public License for more details.
00022 *
00023 * You should have received a copy of the GNU General Public License
00024 * along with this program; if not, write to
00025 * Free Software Foundation, Inc.
00026 * 59 Temple Place, Suite 330
00027 * Boston, MA 02111-1307 USA
00028 *-------------------------------------------------------------------------
00029 */
00048 #include <glib.h>
00049 #include <libpq-fe.h>
00050
00051 /*
00052 * __BEGIN_DECLS should be used at the beginning of your declarations,
00053 * so that C++ compilers don't mangle their names. Use __END_DECLS at
00054 * the end of C declarations.
00055 */
00056 #undef __BEGIN_DECLS
00057 #undef __END_DECLS
00058 #ifdef __cplusplus
00059 # define __BEGIN_DECLS extern "C" {
00060 # define __END_DECLS }
00061 #else
00062 # define __BEGIN_DECLS /* empty */
00063 # define __END_DECLS /* empty */
00064 #endif
00065
00066 /*
00067 * The __P macro is used to wrap function prototypes, so that compilers
00068 * that don't understand ANSI C prototypes still work, and ANSI C
00069 * compilers can issue warnings about type mismatches.
00070 */
00071 #undef __P
00072 #if defined (__STDC__) || defined (_AIX) \
00073 || (defined (__mips) && defined (_SYSTYPE_SVR4)) \
00074 || defined(WIN32) || defined(__cplusplus)
00075 # define __P(protos) protos
00076 #else
00077 # define __P(protos) ()
00078 #endif
00079
00099 #define SEVR_NUMS "severity_nums"
00100 #define STAT_NUMS "status_nums"
00101 #define TYPE_NUMS "problem_type_nums"
00102 #define SUB_IDS "submitter_ids"
00103 #define RESP_IDS "responsible_ids"
00104
00105 __BEGIN_DECLS
00128 GList *create_num_list __P((PGconn *conn,
00129 gint query_pk,
00130 const gchar *column));
00131
00132
00157 GList *create_txt_list __P((PGconn *conn,
00158 gint query_pk,
00159 const gchar *column));
00160
00161
00179 GString *create_int_arr_str __P((GList *list));
00180
00181
00199 GString *create_txt_arr_str __P((GList *list));
00200
00201 __END_DECLS
00202 #endif
1.2.14 written by Dimitri van Heesch,
© 1997-2002