Main Page | Modules | Class List | File List | File Members

cabrillo.h

00001 /***************************************************************************
00002                           cabrillo.h  -  description
00003                              -------------------
00004     begin                : Thu Dec 5 2002
00005     copyright            : (C) 2002 by ARRL
00006     author               : Jon Bloom
00007     email                : jbloom@arrl.org
00008     revision             : $Id: cabrillo_8h-source.html,v 1.6 2005/02/22 13:16:08 ke3z Exp $
00009  ***************************************************************************/
00010 
00011 #ifndef __CABRILLO_H
00012 #define __CABRILLO_H
00013 
00014 #undef CLIENT_STATIC
00015 #ifndef LOTW_SERVER
00016 #define CLIENT_STATIC static
00017 #else
00018 #define CLIENT_STATIC
00019 #endif
00020 
00031 #define TQSL_CABRILLO_FIELD_NAME_LENGTH_MAX 64
00032 #define TQSL_CABRILLO_FIELD_VALUE_LENGTH_MAX 40
00033 
00035 typedef enum {
00036         TQSL_CABRILLO_NO_ERROR,
00037         TQSL_CABRILLO_EOF,
00038         TQSL_CABRILLO_NO_START_RECORD,
00039         TQSL_CABRILLO_NO_CONTEST_RECORD,
00040         TQSL_CABRILLO_UNKNOWN_CONTEST,
00041         TQSL_CABRILLO_BAD_FIELD_DATA,
00042         TQSL_CABRILLO_EOR,
00043 } TQSL_CABRILLO_ERROR_TYPE;
00044 
00045 typedef enum {
00046         TQSL_CABRILLO_HF,
00047         TQSL_CABRILLO_VHF,
00048 } TQSL_CABRILLO_FREQ_TYPE;
00049 
00050 #define TQSL_MIN_CABRILLO_MAP_FIELD 5
00051 
00057 typedef struct {
00058         char name[TQSL_CABRILLO_FIELD_NAME_LENGTH_MAX +1];
00059         char value[TQSL_CABRILLO_FIELD_VALUE_LENGTH_MAX +1];
00060 } tqsl_cabrilloField;
00061 
00062 typedef void * tQSL_Cabrillo;
00063 
00064 #ifdef __cplusplus
00065 extern "C" {
00066 #endif
00067 
00069 DLLEXPORT const char *tqsl_cabrilloGetError(TQSL_CABRILLO_ERROR_TYPE err);
00070 
00072 DLLEXPORT int tqsl_beginCabrillo(tQSL_Cabrillo *cabp, const char *filename);
00073 
00075 DLLEXPORT int tqsl_getCabrilloContest(tQSL_Cabrillo cab, char *buf, int bufsiz);
00076 
00078 DLLEXPORT int tqsl_getCabrilloFreqType(tQSL_Cabrillo cab, TQSL_CABRILLO_FREQ_TYPE *type);
00079 
00081 DLLEXPORT int tqsl_getCabrilloLine(tQSL_Cabrillo cab, int *lineno);
00082 
00084 DLLEXPORT const char * tqsl_getCabrilloRecordText(tQSL_Cabrillo cab);
00085 
00094 DLLEXPORT int tqsl_getCabrilloField(tQSL_Cabrillo cab, tqsl_cabrilloField *field, TQSL_CABRILLO_ERROR_TYPE *err);
00095 
00097 DLLEXPORT int tqsl_endCabrillo(tQSL_Cabrillo *cabp);
00098 
00099 #ifdef __cplusplus
00100 }
00101 #endif
00102 
00105 #endif // __CABRILLO_H

Generated on Tue Feb 22 08:15:36 2005 for TrustedQSL Library API by doxygen 1.3.4