flatapi.h

00001 /******************************************************************************
00002  *      swordapi.h      - This file contains an api usable by non-C++
00003  *                                      environments
00004  *
00005  * $Id: flatapi.h 1996 2006-11-23 23:12:10Z dglassey $
00006  *
00007  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
00008  *      CrossWire Bible Society
00009  *      P. O. Box 2528
00010  *      Tempe, AZ  85280-2528
00011  *
00012  * This program is free software; you can redistribute it and/or modify it
00013  * under the terms of the GNU General Public License as published by the
00014  * Free Software Foundation version 2.
00015  *
00016  * This program is distributed in the hope that it will be useful, but
00017  * WITHOUT ANY WARRANTY; without even the implied warranty of
00018  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00019  * General Public License for more details.
00020  *
00021  */
00022 
00023 #ifndef SWORDAPI_H
00024 #define SWORDAPI_H
00025 
00026 #include <defs.h>
00027 #ifdef __cplusplus
00028 #endif
00029 
00030 extern "C" {
00031 
00032 #define SWHANDLE intptr_t
00033 
00034 
00035 //-----------------------------------------------------------------
00036 // stringlist_iterator methods
00037 
00038 void SWDLLEXPORT stringlist_iterator_next(SWHANDLE hsli);
00039 const char * SWDLLEXPORT stringlist_iterator_val(SWHANDLE hsli);
00040 
00041 //-----------------------------------------------------------------
00042 // listkey_iterator methods
00043 
00044 void SWDLLEXPORT listkey_iterator_next(SWHANDLE lki);
00045 const char * SWDLLEXPORT listkey_iterator_val(SWHANDLE hsli);
00046         
00047 //-----------------------------------------------------------------
00048 // modmap methods
00049 //
00050 void SWDLLEXPORT ModList_iterator_next(SWHANDLE hmmi);
00051 SWHANDLE SWDLLEXPORT ModList_iterator_val(SWHANDLE hmmi);
00052 
00053 
00054 //-----------------------------------------------------------------
00055 // SWMgr methods
00056 //
00057 SWHANDLE SWDLLEXPORT SWMgr_new(char filterType);
00058 // SWConfig *, SWConfig *, bool, SWFilterMgr *
00059 SWHANDLE SWDLLEXPORT SWMgr_newEx(SWHANDLE hiconfig, SWHANDLE hisysconfig, char autoload, SWHANDLE hfilterMgr);
00060 void     SWDLLEXPORT SWMgr_delete(SWHANDLE hmgr);
00061 SWHANDLE SWDLLEXPORT SWMgr_getConfig(SWHANDLE hmgr);
00062 SWHANDLE SWDLLEXPORT SWMgr_getModulesIterator(SWHANDLE hmgr);
00063 SWHANDLE SWDLLEXPORT SWMgr_getModuleByName(SWHANDLE hmgr, const char *name);
00064 const char *   SWDLLEXPORT SWMgr_getPrefixPath(SWHANDLE hmgr);
00065 const char *   SWDLLEXPORT SWMgr_getConfigPath(SWHANDLE hmgr);
00066 void     SWDLLEXPORT SWMgr_setGlobalOption(SWHANDLE hmgr, const char *option, const char *value);
00067 const char *   SWDLLEXPORT SWMgr_getGlobalOption(SWHANDLE hmgr, const char *option);
00068 const char *   SWDLLEXPORT SWMgr_getGlobalOptionTip(SWHANDLE hmgr, const char *option);
00069 // ret: forward_iterator
00070 SWHANDLE SWDLLEXPORT SWMgr_getGlobalOptionsIterator(SWHANDLE hmgr);
00071 // ret: forward_iterator
00072 SWHANDLE SWDLLEXPORT SWMgr_getGlobalOptionValuesIterator(SWHANDLE hmgr, const char *option);
00073 void     SWDLLEXPORT SWMgr_setCipherKey(SWHANDLE hmgr, const char *modName, const char *key);
00074 
00075 
00076 //-----------------------------------------------------------------
00077 // SWModule methods
00078 
00079 void  SWDLLEXPORT SWModule_terminateSearch(SWHANDLE hmodule);
00080 SWHANDLE SWDLLEXPORT SWModule_doSearch(SWHANDLE hmodule, const char *searchString, int type, int params,  void (*percent) (char, void *), void *percentUserData);
00081 char  SWDLLEXPORT SWModule_error(SWHANDLE hmodule);
00082 int   SWDLLEXPORT SWModule_getEntrySize(SWHANDLE hmodule);
00083 void  SWDLLEXPORT SWModule_setKeyText(SWHANDLE hmodule, const char *key);
00084 const char * SWDLLEXPORT SWModule_getKeyText(SWHANDLE hmodule);
00085 const char * SWDLLEXPORT SWModule_getName(SWHANDLE hmodule);
00086 const char * SWDLLEXPORT SWModule_getDescription(SWHANDLE hmodule);
00087 const char * SWDLLEXPORT SWModule_getType(SWHANDLE hmodule);
00088 void  SWDLLEXPORT SWModule_previous(SWHANDLE hmodule);
00089 void  SWDLLEXPORT SWModule_next(SWHANDLE hmodule);
00090 void  SWDLLEXPORT SWModule_begin(SWHANDLE hmodule);
00091 const char * SWDLLEXPORT SWModule_getStripText(SWHANDLE hmodule);
00092 const char * SWDLLEXPORT SWModule_getRenderText(SWHANDLE hmodule);
00093 const char * SWDLLEXPORT SWModule_getEntryAttributes(SWHANDLE hmodule, const char *level1, const char *level2, const char *level3);
00094 const char * SWDLLEXPORT SWModule_getPreverseHeader(SWHANDLE hmodule, const char *key, int pvHeading);
00095 const char * SWDLLEXPORT SWModule_getFootnoteType(SWHANDLE hmodule, const char *key, const char *note);
00096 const char * SWDLLEXPORT SWModule_getFootnoteBody(SWHANDLE hmodule, const char *key, const char *note);
00097 const char * SWDLLEXPORT SWModule_getFootnoteRefList(SWHANDLE hmodule, const char *key, const char *note);
00098 
00099 SWHANDLE SWDLLEXPORT listkey_getVerselistIterator(const char * list, const char * key);
00100 
00101 }
00102 #ifdef __cplusplus
00103 #endif
00104 
00105 #endif