00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifdef HAVE_CONFIG_H
00012 #include "sysconfig.h"
00013 #endif
00014
00015 #ifndef __CABRILLO_H
00016 #define __CABRILLO_H
00017
00018 #undef CLIENT_STATIC
00019 #ifndef LOTW_SERVER
00020 #define CLIENT_STATIC static
00021 #else
00022 #define CLIENT_STATIC
00023 #endif
00024
00035 #define TQSL_CABRILLO_FIELD_NAME_LENGTH_MAX 64
00036 #define TQSL_CABRILLO_FIELD_VALUE_LENGTH_MAX 40
00037
00039 typedef enum {
00040 TQSL_CABRILLO_NO_ERROR,
00041 TQSL_CABRILLO_EOF,
00042 TQSL_CABRILLO_NO_START_RECORD,
00043 TQSL_CABRILLO_NO_CONTEST_RECORD,
00044 TQSL_CABRILLO_UNKNOWN_CONTEST,
00045 TQSL_CABRILLO_BAD_FIELD_DATA,
00046 TQSL_CABRILLO_EOR,
00047 } TQSL_CABRILLO_ERROR_TYPE;
00048
00049 typedef enum {
00050 TQSL_CABRILLO_HF,
00051 TQSL_CABRILLO_VHF,
00052 } TQSL_CABRILLO_FREQ_TYPE;
00053
00054 #define TQSL_MIN_CABRILLO_MAP_FIELD 5
00055
00061 typedef struct {
00062 char name[TQSL_CABRILLO_FIELD_NAME_LENGTH_MAX +1];
00063 char value[TQSL_CABRILLO_FIELD_VALUE_LENGTH_MAX +1];
00064 } tqsl_cabrilloField;
00065
00066 typedef void * tQSL_Cabrillo;
00067
00068 #ifdef __cplusplus
00069 extern "C" {
00070 #endif
00071
00073 const char *tqsl_cabrilloGetError(TQSL_CABRILLO_ERROR_TYPE err);
00074
00076 int tqsl_beginCabrillo(tQSL_Cabrillo *cabp, const char *filename);
00077
00079 int tqsl_getCabrilloContest(tQSL_Cabrillo cab, char *buf, int bufsiz);
00080
00082 int tqsl_getCabrilloFreqType(tQSL_Cabrillo cab, TQSL_CABRILLO_FREQ_TYPE *type);
00083
00085 int tqsl_getCabrilloLine(tQSL_Cabrillo cab, int *lineno);
00086
00088 const char * tqsl_getCabrilloRecordText(tQSL_Cabrillo cab);
00089
00098 int tqsl_getCabrilloField(tQSL_Cabrillo cab, tqsl_cabrilloField *field, TQSL_CABRILLO_ERROR_TYPE *err);
00099
00101 int tqsl_endCabrillo(tQSL_Cabrillo *cabp);
00102
00103 #ifdef __cplusplus
00104 }
00105 #endif
00106
00109 #endif // __CABRILLO_H