diff options
Diffstat (limited to 'include/flatapi.h')
-rw-r--r-- | include/flatapi.h | 90 |
1 files changed, 86 insertions, 4 deletions
diff --git a/include/flatapi.h b/include/flatapi.h index c5f8412..2f57841 100644 --- a/include/flatapi.h +++ b/include/flatapi.h @@ -2,7 +2,7 @@ * * flatapi.h - This file contains an api usable by non-C++ environments * - * $Id: flatapi.h 3184 2014-04-17 04:30:54Z greg.hellings $ + * $Id: flatapi.h 3561 2018-01-07 06:45:42Z greg.hellings $ * * Copyright 2002-2014 CrossWire Bible Society (http://www.crosswire.org) * CrossWire Bible Society @@ -24,7 +24,7 @@ #define SWORDFLATAPI_H #include <inttypes.h> -#include <defs.h> +#include "defs.h" #ifdef __cplusplus extern "C" { @@ -60,6 +60,21 @@ struct org_crosswire_sword_SearchHit { #undef org_crosswire_sword_SWModule_SEARCHTYPE_LUCENE #define org_crosswire_sword_SWModule_SEARCHTYPE_LUCENE -4L + const int org_crosswire_sword_SWModule_VERSEKEY_TESTAMENT = 0; + const int org_crosswire_sword_SWModule_VERSEKEY_BOOK = 1; + const int org_crosswire_sword_SWModule_VERSEKEY_CHAPTER = 2; + const int org_crosswire_sword_SWModule_VERSEKEY_VERSE = 3; + const int org_crosswire_sword_SWModule_VERSEKEY_CHAPMAX = 4; + const int org_crosswire_sword_SWModule_VERSEKEY_VERSEMAX = 5; + const int org_crosswire_sword_SWModule_VERSEKEY_BOOKNAME = 6; + const int org_crosswire_sword_SWModule_VERSEKEY_OSISREF = 7; + const int org_crosswire_sword_SWModule_VERSEKEY_SHORTTEXT = 8; + const int org_crosswire_sword_SWModule_VERSEKEY_BOOKABBREV = 9; + + + + + /* * Class: org_crosswire_sword_SWModule * Method: terminateSearch @@ -68,13 +83,15 @@ struct org_crosswire_sword_SearchHit { void SWDLLEXPORT org_crosswire_sword_SWModule_terminateSearch (SWHANDLE hSWModule); +typedef void (*org_crosswire_sword_SWModule_SearchCallback)(int); + /* * Class: org_crosswire_sword_SWModule * Method: search * Signature: (Ljava/lang/String;IJLjava/lang/String;Lorg/crosswire/android/sword/SWModule/SearchProgressReporter;)[Lorg/crosswire/android/sword/SWModule/SearchHit; */ const struct org_crosswire_sword_SearchHit * SWDLLEXPORT org_crosswire_sword_SWModule_search - (SWHANDLE hSWModule, const char *searchString, int searchType, long flags, const char *scope, SWHANDLE progressReporter); + (SWHANDLE hSWModule, const char *searchString, int searchType, long flags, const char *scope, org_crosswire_sword_SWModule_SearchCallback progressReporter); /* * Class: org_crosswire_sword_SWModule @@ -281,6 +298,15 @@ SWHANDLE SWDLLEXPORT org_crosswire_sword_SWMgr_new /* * Class: org_crosswire_sword_SWMgr + * Method: newWithPath + * Signature: ()V + * Signature: (Ljava/lang/String;)V + */ +SWHANDLE SWDLLEXPORT org_crosswire_sword_SWMgr_newWithPath + (const char *path); + +/* + * Class: org_crosswire_sword_SWMgr * Method: delete * Signature: ()V */ @@ -367,6 +393,47 @@ const char * SWDLLEXPORT org_crosswire_sword_SWMgr_filterText const char ** SWDLLEXPORT org_crosswire_sword_SWMgr_getGlobalOptions (SWHANDLE hSWMgr); + +/* + * Class: org_crosswire_sword_SWConfig + * Method: getSections + * Signature: ()[Ljava/lang/String; + */ +const char ** SWDLLEXPORT org_crosswire_sword_SWConfig_getSections + (const char *confPath); + +/* + * Class: org_crosswire_sword_SWConfig + * Method: getSectionKeys + * Signature: (Ljava/lang/String;)[Ljava/lang/String; + */ +const char ** SWDLLEXPORT org_crosswire_sword_SWConfig_getSectionKeys + (const char *confPath, const char *section); + +/* + * Class: org_crosswire_sword_SWConfig + * Method: getKeyValue + * Signature: (Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; + */ +const char * SWDLLEXPORT org_crosswire_sword_SWConfig_getKeyValue + (const char *confPath, const char *section, const char *key); + +/* + * Class: org_crosswire_sword_SWConfig + * Method: setKeyValue + * Signature: (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + */ +void SWDLLEXPORT org_crosswire_sword_SWConfig_setKeyValue + (const char *confPath, const char *section, const char *key, const char *value); + +/* + * Class: org_crosswire_sword_SWConfig + * Method: augmentConfig + * Signature: (Ljava/lang/String;)[Ljava/lang/String; + */ +const char ** SWDLLEXPORT org_crosswire_sword_SWConfig_augmentConfig + (const char *confPath, const char *configBlob); + /* * Class: org_crosswire_sword_SWMgr * Method: getGlobalOptionValues @@ -424,6 +491,7 @@ const char * SWDLLEXPORT org_crosswire_sword_SWMgr_translate // // +typedef void (*org_crosswire_sword_InstallMgr_StatusCallback)(const char *, unsigned long, unsigned long); /* * Class: org_crosswire_sword_InstallMgr @@ -431,7 +499,15 @@ const char * SWDLLEXPORT org_crosswire_sword_SWMgr_translate * Signature: (Ljava/lang/String;Lorg/crosswire/android/sword/SWModule/SearchProgressReporter;)V */ SWHANDLE SWDLLEXPORT org_crosswire_sword_InstallMgr_new - (const char *baseDir, SWHANDLE statusReporter); + (const char *baseDir, org_crosswire_sword_InstallMgr_StatusCallback statusReporter); + +/* + * Class: org_crosswire_sword_InstallMgr + * Method: delete + * Signature: ()V + */ +void SWDLLEXPORT org_crosswire_sword_InstallMgr_delete + (SWHANDLE hInstallMgr); /* * Class: org_crosswire_sword_InstallMgr @@ -497,6 +573,12 @@ int SWDLLEXPORT org_crosswire_sword_InstallMgr_remoteInstallModule SWHANDLE SWDLLEXPORT org_crosswire_sword_InstallMgr_getRemoteModuleByName (SWHANDLE hInstallMgr, const char *sourceName, const char *modName); +void SWDLLEXPORT org_crosswire_sword_SWlog_logError(const char *msg); +void SWDLLEXPORT org_crosswire_sword_SWlog_logDebug(const char *msg); +void SWDLLEXPORT org_crosswire_sword_SWlog_logWarning(const char *msg); +void SWDLLEXPORT org_crosswire_sword_SWlog_logInformation(const char *msg); +void SWDLLEXPORT org_crosswire_sword_SWlog_logTimedInformation(const char *msg); + #ifdef __cplusplus } #endif |