TrustedQSL Library API
Main Page
Modules
Classes
Files
File List
File Members
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
40
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,
48
}
TQSL_CABRILLO_ERROR_TYPE
;
49
53
typedef
enum
{
54
TQSL_CABRILLO_HF,
55
TQSL_CABRILLO_VHF,
56
TQSL_CABRILLO_UNKNOWN,
57
}
TQSL_CABRILLO_FREQ_TYPE
;
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
{
70
char
name[
TQSL_CABRILLO_FIELD_NAME_LENGTH_MAX
+1];
71
char
value[
TQSL_CABRILLO_FIELD_VALUE_LENGTH_MAX
+1];
72
}
tqsl_cabrilloField
;
73
74
typedef
void
*
tQSL_Cabrillo
;
75
76
#ifdef __cplusplus
77
extern
"C"
{
78
#endif
79
81
DLLEXPORT
const
char
*
CALLCONVENTION
tqsl_cabrilloGetError
(
TQSL_CABRILLO_ERROR_TYPE
err);
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
90
DLLEXPORT
int
CALLCONVENTION
tqsl_getCabrilloFreqType
(
tQSL_Cabrillo
cab,
TQSL_CABRILLO_FREQ_TYPE
*type);
91
93
DLLEXPORT
int
CALLCONVENTION
tqsl_getCabrilloLine
(
tQSL_Cabrillo
cab,
int
*lineno);
94
96
DLLEXPORT
const
char
*
CALLCONVENTION
tqsl_getCabrilloRecordText
(
tQSL_Cabrillo
cab);
97
106
DLLEXPORT
int
CALLCONVENTION
tqsl_getCabrilloField
(
tQSL_Cabrillo
cab,
tqsl_cabrilloField
*field,
TQSL_CABRILLO_ERROR_TYPE
*err);
107
109
DLLEXPORT
int
CALLCONVENTION
tqsl_endCabrillo
(
tQSL_Cabrillo
*cabp);
110
111
#ifdef __cplusplus
112
}
113
#endif
114
117
#endif // __CABRILLO_H
Generated by
1.8.3.1