TrustedQSL Library API
cabrillo.h
Go to the documentation of this file.
1 /***************************************************************************
2  cabrillo.h - description
3  -------------------
4  begin : Thu Dec 5 2002
5  copyright : (C) 2002 by ARRL
6  author : Jon Bloom
7  email : jbloom@arrl.org
8  revision : $Id$
9  ***************************************************************************/
10 
11 #ifndef __CABRILLO_H
12 #define __CABRILLO_H
13 
14 #include "tqsllib.h"
15 
16 #undef CLIENT_STATIC
17 #ifndef LOTW_SERVER
18 #define CLIENT_STATIC static
19 #else
20 #define CLIENT_STATIC
21 #endif
22 
35 #define TQSL_CABRILLO_MAX_FIELDS 12
36 #define TQSL_CABRILLO_FIELD_NAME_LENGTH_MAX 64
37 #define TQSL_CABRILLO_FIELD_VALUE_LENGTH_MAX 40
38 
39 typedef enum {
41  TQSL_CABRILLO_NO_ERROR,
42  TQSL_CABRILLO_EOF,
43  TQSL_CABRILLO_NO_START_RECORD,
44  TQSL_CABRILLO_NO_CONTEST_RECORD,
45  TQSL_CABRILLO_UNKNOWN_CONTEST,
46  TQSL_CABRILLO_BAD_FIELD_DATA,
47  TQSL_CABRILLO_EOR,
49 
53 typedef enum {
54  TQSL_CABRILLO_HF,
55  TQSL_CABRILLO_VHF,
56  TQSL_CABRILLO_UNKNOWN,
58 
59 // Minimum field number for callsign and default field number
60 // For VHF, default should be 7.
61 #define TQSL_MIN_CABRILLO_MAP_FIELD 5
62 #define TQSL_DEF_CABRILLO_MAP_FIELD 8
63 
64 
69 typedef struct {
73 
74 typedef void * tQSL_Cabrillo;
75 
76 #ifdef __cplusplus
77 extern "C" {
78 #endif
79 
82 
84 DLLEXPORT int CALLCONVENTION tqsl_beginCabrillo(tQSL_Cabrillo *cabp, const char *filename);
85 
87 DLLEXPORT int CALLCONVENTION tqsl_getCabrilloContest(tQSL_Cabrillo cab, char *buf, int bufsiz);
88 
91 
94 
97 
107 
110 
111 #ifdef __cplusplus
112 }
113 #endif
114 
117 #endif // __CABRILLO_H
DLLEXPORT int CALLCONVENTION tqsl_endCabrillo(tQSL_Cabrillo *cabp)
DLLEXPORT const char *CALLCONVENTION tqsl_getCabrilloRecordText(tQSL_Cabrillo cab)
void * tQSL_Cabrillo
Opaque cabrillo log type.
Definition: cabrillo.h:74
DLLEXPORT int CALLCONVENTION tqsl_getCabrilloContest(tQSL_Cabrillo cab, char *buf, int bufsiz)
#define TQSL_CABRILLO_FIELD_NAME_LENGTH_MAX
Max field name length.
Definition: cabrillo.h:36
TQSL_CABRILLO_ERROR_TYPE
Cabrillo status values.
Definition: cabrillo.h:40
#define TQSL_CABRILLO_FIELD_VALUE_LENGTH_MAX
Max field value length.
Definition: cabrillo.h:37
#define CALLCONVENTION
Symbol exports - Windows only.
Definition: tqsllib.h:27
DLLEXPORT int CALLCONVENTION tqsl_getCabrilloField(tQSL_Cabrillo cab, tqsl_cabrilloField *field, TQSL_CABRILLO_ERROR_TYPE *err)
DLLEXPORT const char *CALLCONVENTION tqsl_cabrilloGetError(TQSL_CABRILLO_ERROR_TYPE err)
Definition: cabrillo.h:69
DLLEXPORT int CALLCONVENTION tqsl_beginCabrillo(tQSL_Cabrillo *cabp, const char *filename)
TQSL_CABRILLO_FREQ_TYPE
Definition: cabrillo.h:53
#define DLLEXPORT
Symbol exports - Windows only.
Definition: tqsllib.h:25
DLLEXPORT int CALLCONVENTION tqsl_getCabrilloFreqType(tQSL_Cabrillo cab, TQSL_CABRILLO_FREQ_TYPE *type)
DLLEXPORT int CALLCONVENTION tqsl_getCabrilloLine(tQSL_Cabrillo cab, int *lineno)