Synesis Software STLSoft - ... Robust, Lightweight, Cross-platform, Template Software ...

pantheios/backends/be.N.h

Go to the documentation of this file.
00001 /* /////////////////////////////////////////////////////////////////////////
00002  * File:        pantheios/backends/be.N.h
00003  *
00004  * Purpose:     Declaration of the Pantheios be.N Stock Back-end API.
00005  *
00006  * Created:     18th October 2006
00007  * Updated:     26th November 2010
00008  *
00009  * Home:        http://www.pantheios.org/
00010  *
00011  * Copyright (c) 2006-2010, Matthew Wilson and Synesis Software
00012  *
00013  * Redistribution and use in source and binary forms, with or without
00014  * modification, are permitted provided that the following conditions are
00015  * met:
00016  *
00017  * - Redistributions of source code must retain the above copyright notice,
00018  *   this list of conditions and the following disclaimer.
00019  * - Redistributions in binary form must reproduce the above copyright
00020  *   notice, this list of conditions and the following disclaimer in the
00021  *   documentation and/or other materials provided with the distribution.
00022  * - Neither the name(s) of Matthew Wilson and Synesis Software nor the
00023  *   names of any contributors may be used to endorse or promote products
00024  *   derived from this software without specific prior written permission.
00025  *
00026  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
00027  * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
00028  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
00029  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
00030  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
00031  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
00032  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
00033  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
00034  * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
00035  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
00036  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00037  *
00038  * ////////////////////////////////////////////////////////////////////// */
00039 
00040 
00046 #ifndef PANTHEIOS_INCL_PANTHEIOS_FRONTENDS_H_BE_N
00047 #define PANTHEIOS_INCL_PANTHEIOS_FRONTENDS_H_BE_N
00048 
00049 /* /////////////////////////////////////////////////////////////////////////
00050  * Version information
00051  */
00052 
00053 #ifndef PANTHEIOS_DOCUMENTATION_SKIP_SECTION
00054 # define PANTHEIOS_VER_PANTHEIOS_BACKENDS_H_BE_N_MAJOR      1
00055 # define PANTHEIOS_VER_PANTHEIOS_BACKENDS_H_BE_N_MINOR      6
00056 # define PANTHEIOS_VER_PANTHEIOS_BACKENDS_H_BE_N_REVISION   2
00057 # define PANTHEIOS_VER_PANTHEIOS_BACKENDS_H_BE_N_EDIT       21
00058 #endif /* !PANTHEIOS_DOCUMENTATION_SKIP_SECTION */
00059 
00060 /* /////////////////////////////////////////////////////////////////////////
00061  * Includes
00062  */
00063 
00064 #ifndef PANTHEIOS_INCL_PANTHEIOS_H_PANTHEIOS
00065 # include <pantheios/pantheios.h>
00066 #endif /* !PANTHEIOS_INCL_PANTHEIOS_H_PANTHEIOS */
00067 #ifndef PANTHEIOS_INCL_PANTHEIOS_H_BACKEND
00068 # include <pantheios/backend.h>
00069 #endif /* !PANTHEIOS_INCL_PANTHEIOS_H_BACKEND */
00070 
00071 #include <limits.h>
00072 
00073 /* /////////////////////////////////////////////////////////////////////////
00074  * Documentation
00075  */
00076 
00082 /* /////////////////////////////////////////////////////////////////////////
00083  * API
00084  */
00085 
00086 /* /////////////////////////////////////////////////////////////////////////
00087  * Constants
00088  */
00089 
00101 #define PANTHEIOS_BE_N_F_IGNORE_INIT_FAILURE            (0x00100000)
00102 
00110 #define PANTHEIOS_BE_N_F_ID_MUST_MATCH_CUSTOM28         (0x00200000)
00111 
00119 #define PANTHEIOS_BE_N_F_IGNORE_NONMATCHED_CUSTOM28_ID  (0x00400000)
00120 
00127 #define PANTHEIOS_BE_N_F_INIT_ONLY_IF_PREVIOUS_FAILED   (0x00800000)
00128 
00129 /* /////////////////////////////////////////////////////////////////////////
00130  * Typedefs
00131  */
00132 
00139 struct pan_be_N_t
00140 {
00145     int     flags;
00150     int     backEndId;
00152     int     (PANTHEIOS_CALLCONV *pfnInit)(
00153                 PAN_CHAR_T const*
00154             ,   int
00155             ,   void const*
00156             ,   void*
00157             ,   void**
00158             );
00160     void    (PANTHEIOS_CALLCONV *pfnUninit)(    void*);
00162     int     (PANTHEIOS_CALLCONV *pfnLogEntry)(
00163                 void*
00164             ,   void*
00165             ,   int
00166             ,   PAN_CHAR_T const*
00167             ,   size_t
00168             );
00171     int     severityCeiling;
00172 #ifndef PANTHEIOS_DOCUMENTATION_SKIP_SECTION
00173     /* INTERNAL USE ONLY */
00174     void*   token;
00175 #endif /* !PANTHEIOS_DOCUMENTATION_SKIP_SECTION */
00176 };
00177 #ifndef __cplusplus
00178 typedef struct pan_be_N_t   pan_be_N_t;
00179 #endif /* __cplusplus */
00180 
00181 
00182 /* PANTHEIOS_BE_N_ENTRY has been removed */
00183 
00184 
00218 #define PANTHEIOS_BE_N_STDFORM_ENTRY(backEndId, be_prefix, flags)   \
00219     {                                                               \
00220             flags                                                   \
00221         ,   backEndId                                               \
00222         ,   (int(PANTHEIOS_CALLCONV *)(PAN_CHAR_T const*,int,void const*,void*,void**))be_prefix ## _init \
00223         ,   be_prefix ## _uninit                                    \
00224         ,   be_prefix ## _logEntry                                  \
00225         ,   INT_MAX                                                 \
00226         ,   NULL                                                    \
00227     }
00228 
00267 #define PANTHEIOS_BE_N_FILTERED_ENTRY(backEndId, be_prefix, severityCeiling, flags)                         \
00268     {                                                                                                       \
00269             flags                                                                                           \
00270         ,   backEndId                                                                                       \
00271         ,   (int(PANTHEIOS_CALLCONV*)(PAN_CHAR_T const*,int,void const*,void*,void**))be_prefix ## _init    \
00272         ,   be_prefix ## _uninit                                                                            \
00273         ,   be_prefix ## _logEntry                                                                          \
00274         ,   severityCeiling                                                                                 \
00275         ,   NULL                                                                                            \
00276     }
00277 
00286 #define PANTHEIOS_BE_N_TERMINATOR_ENTRY                 { 0, 0, NULL, NULL, NULL, -1, NULL }
00287 
00288 /* /////////////////////////////////////////////////////////////////////////
00289  * External Declarations
00290  */
00291 
00300 PANTHEIOS_EXTERN_C pan_be_N_t       PAN_BE_N_BACKEND_LIST[];
00301 
00302 /* ////////////////////////////////////////////////////////////////////// */
00303 
00304 #endif /* PANTHEIOS_INCL_PANTHEIOS_FRONTENDS_H_BE_N */
00305 
00306 /* ///////////////////////////// end of file //////////////////////////// */

pantheios Library documentation © Matthew Wilson & Synesis Software, 2006-2011 SourceForge.net Logo