TrustedQSL Library API: tqsllib.h Source File

TrustedQSL Library API

tqsllib.h
Go to the documentation of this file.
1 /***************************************************************************
2 tqsllib.h - description
3 -------------------
4 begin : Mon May 20 2002
5 copyright : (C) 2002 by ARRL
6 author : Jon Bloom
7 email : jbloom@arrl.org
8 revision : $Id: tqsllib.h,v 1.14 2013/03/01 13:26:44 k1mu Exp $
9 ***************************************************************************/
10
11 #ifndef TQSLLIB_H
12 #define TQSLLIB_H
13
14 #if defined(_WIN32) && !defined(TQSL_NODLL)
15 #ifdef TQSLLIB_DEF
16 #define DLLEXPORT __declspec(dllexport)
17 #define DLLEXPORTDATA __declspec(dllexport)
18 #define CALLCONVENTION __stdcall
19 #else
20 #define DLLEXPORT __declspec(dllimport)
21 #define DLLEXPORTDATA __declspec(dllimport)
22 #define CALLCONVENTION __stdcall
23 #endif
24 #else
25 #define DLLEXPORT
26 #define DLLEXPORTDATA
27 #define CALLCONVENTION
28 #include <limits.h>
29 #endif
30
31 #include "adif.h"
32 #include "cabrillo.h"
33
38 #ifndef PATH_MAX // Should be set by <limits.h>
39 #define PATH_MAX 4096
40 #endif
41
42 /* Sizes */
43 #define TQSL_MAX_PATH_LEN PATH_MAX
44 #define TQSL_PASSWORD_MAX 80
45 #define TQSL_NAME_ELEMENT_MAX 256
46 #define TQSL_CALLSIGN_MAX 20
47 #define TQSL_CRQ_NAME_MAX 60
48 #define TQSL_CRQ_ADDR_MAX 80
49 #define TQSL_CRQ_CITY_MAX 80
50 #define TQSL_CRQ_STATE_MAX 80
51 #define TQSL_CRQ_POSTAL_MAX 20
52 #define TQSL_CRQ_COUNTRY_MAX 80
53 #define TQSL_CRQ_EMAIL_MAX 180
54 #define TQSL_BAND_MAX 6
55 #define TQSL_MODE_MAX 16
56 #define TQSL_FREQ_MAX 20
57 #define TQSL_SATNAME_MAX 20
58 #define TQSL_PROPMODE_MAX 20
59 #define TQSL_STATE_MAX 30
60 #define TQSL_GRID_MAX 30
61 #define TQSL_CNTY_MAX 30
62 #define TQSL_COUNTRY_MAX 60
63 #define TQSL_ZONE_MAX 5
64 #define TQSL_IOTA_MAX 10
65
66 #define TQSL_CERT_CB_USER 0
67 #define TQSL_CERT_CB_CA 1
68 #define TQSL_CERT_CB_ROOT 2
69 #define TQSL_CERT_CB_PKEY 3
70 #define TQSL_CERT_CB_CONFIG 4
71 #define TQSL_CERT_CB_CERT_TYPE(x) ((x) & 0xf)
72 #define TQSL_CERT_CB_MILESTONE 0
73 #define TQSL_CERT_CB_RESULT 0x10
74 #define TQSL_CERT_CB_CALL_TYPE(x) ((x) & TQSL_CERT_CB_RESULT)
75 #define TQSL_CERT_CB_PROMPT 0
76 #define TQSL_CERT_CB_DUPLICATE 0x100
77 #define TQSL_CERT_CB_ERROR 0x200
78 #define TQSL_CERT_CB_LOADED 0x300
79 #define TQSL_CERT_CB_RESULT_TYPE(x) ((x) & 0x0f00)
80
81 typedef void * tQSL_Cert;
82 typedef void * tQSL_Location;
83 typedef char * tQSL_StationDataEnc;
84
86 typedef struct {
87 int year;
88 int month;
89 int day;
90 } tQSL_Date;
91
93 typedef struct {
94 int hour;
95 int minute;
96 int second;
97 } tQSL_Time;
98
100 typedef struct tqsl_provider_st {
101 char organizationName[TQSL_NAME_ELEMENT_MAX+1];
102 char organizationalUnitName[TQSL_NAME_ELEMENT_MAX+1];
103 char emailAddress[TQSL_NAME_ELEMENT_MAX+1];
104 char url[TQSL_NAME_ELEMENT_MAX+1];
105 } TQSL_PROVIDER;
106
108 typedef struct tqsl_cert_req_st {
109 char providerName[TQSL_NAME_ELEMENT_MAX+1];
110 char providerUnit[TQSL_NAME_ELEMENT_MAX+1];
111 char callSign[TQSL_CALLSIGN_MAX+1];
112 char name[TQSL_CRQ_NAME_MAX+1];
113 char address1[TQSL_CRQ_ADDR_MAX+1];
114 char address2[TQSL_CRQ_ADDR_MAX+1];
115 char city[TQSL_CRQ_CITY_MAX+1];
116 char state[TQSL_CRQ_STATE_MAX+1];
117 char postalCode[TQSL_CRQ_POSTAL_MAX+1];
118 char country[TQSL_CRQ_COUNTRY_MAX+1];
119 char emailAddress[TQSL_CRQ_EMAIL_MAX+1];
120 int dxccEntity;
121 tQSL_Date qsoNotBefore;
122 tQSL_Date qsoNotAfter;
123 char password[TQSL_PASSWORD_MAX+1];
124 tQSL_Cert signer;
125 char renew;
126 } TQSL_CERT_REQ;
127
129 typedef struct {
130 char callsign[TQSL_CALLSIGN_MAX+1];
131 char band[TQSL_BAND_MAX+1];
132 char mode[TQSL_MODE_MAX+1];
133 char submode[TQSL_MODE_MAX+1];
134 tQSL_Date date;
135 tQSL_Time time;
136 char freq[TQSL_FREQ_MAX+1];
137 char rxfreq[TQSL_FREQ_MAX+1];
138 char rxband[TQSL_BAND_MAX+1];
139 char propmode[TQSL_PROPMODE_MAX+1];
140 char satname[TQSL_SATNAME_MAX+1];
141 bool callsign_set;
142 bool mode_set;
143 bool band_set;
144 bool date_set;
145 bool time_set;
146 char my_state[TQSL_STATE_MAX+1];
147 char my_gridsquare[TQSL_GRID_MAX+1];
148 char my_vucc_grids[TQSL_GRID_MAX+1];
149 char my_county[TQSL_CNTY_MAX+1];
150 char my_cnty_state[TQSL_STATE_MAX+1];
151 char my_country[TQSL_COUNTRY_MAX+1];
152 char my_cq_zone[TQSL_ZONE_MAX+1];
153 char my_itu_zone[TQSL_ZONE_MAX+1];
154 int my_dxcc;
155 char my_call[TQSL_CALLSIGN_MAX+1];
156 #ifdef USE_OWNER_CALLSIGN
157 char my_owner[TQSL_CALLSIGN_MAX+1];
158 #endif
159 char my_operator[TQSL_CALLSIGN_MAX+1];
160 char my_iota[TQSL_IOTA_MAX+1];
161 } TQSL_QSO_RECORD;
162
164 DLLEXPORTDATA extern const char *tQSL_BaseDir;
166 DLLEXPORTDATA extern const char *tQSL_RsrcDir;
167
168 #ifdef __cplusplus
169 extern "C" {
170 #endif
171
177
179 DLLEXPORTDATA extern int tQSL_Error;
181 DLLEXPORTDATA extern TQSL_ADIF_GET_FIELD_ERROR tQSL_ADIF_Error;
183 DLLEXPORTDATA extern TQSL_CABRILLO_ERROR_TYPE tQSL_Cabrillo_Error;
185 DLLEXPORTDATA extern char tQSL_ErrorFile[TQSL_MAX_PATH_LEN];
187 DLLEXPORTDATA extern char tQSL_CustomError[256];
189 DLLEXPORTDATA extern int tQSL_Errno;
191 DLLEXPORTDATA extern char tQSL_ImportCall[256];
193 DLLEXPORTDATA extern long tQSL_ImportSerial;
195 DLLEXPORTDATA extern FILE* tQSL_DiagFile;
196
201 DLLEXPORT int CALLCONVENTION tqsl_init();
202
212 DLLEXPORT int CALLCONVENTION tqsl_setDirectory(const char *dir);
213
217 DLLEXPORT const char* CALLCONVENTION tqsl_getErrorString();
218
223 DLLEXPORT const char* CALLCONVENTION tqsl_getErrorString_v(int err);
224
232 DLLEXPORT int CALLCONVENTION tqsl_encodeBase64(const unsigned char *data, int datalen, char *output, int outputlen);
233
242 DLLEXPORT int CALLCONVENTION tqsl_decodeBase64(const char *input, unsigned char *data, int *datalen);
243
250 DLLEXPORT int CALLCONVENTION tqsl_initDate(tQSL_Date *date, const char *str);
251
258 DLLEXPORT int CALLCONVENTION tqsl_initTime(tQSL_Time *time, const char *str);
259
269 DLLEXPORT int CALLCONVENTION tqsl_compareDates(const tQSL_Date *a, const tQSL_Date *b);
270
276 DLLEXPORT int CALLCONVENTION tqsl_subtractDates(const tQSL_Date *a, const tQSL_Date *b, int *diff);
277
282 DLLEXPORT char* CALLCONVENTION tqsl_convertDateToText(const tQSL_Date *date, char *buf, int bufsiz);
283
288 DLLEXPORT int CALLCONVENTION tqsl_isDateValid(const tQSL_Date *d);
289
294 DLLEXPORT int CALLCONVENTION tqsl_isDateNull(const tQSL_Date *d);
295
300 DLLEXPORT int CALLCONVENTION tqsl_isTimeValid(const tQSL_Time *t);
301
306 DLLEXPORT char* CALLCONVENTION tqsl_convertTimeToText(const tQSL_Time *time, char *buf, int bufsiz);
307
310 DLLEXPORT int CALLCONVENTION tqsl_getVersion(int *major, int *minor);
311
314 DLLEXPORT int CALLCONVENTION tqsl_getConfigVersion(int *major, int *minor);
315
344 #define TQSL_SELECT_CERT_WITHKEYS 1
345 #define TQSL_SELECT_CERT_EXPIRED 2
346 #define TQSL_SELECT_CERT_SUPERCEDED 4
347
375 DLLEXPORT int CALLCONVENTION tqsl_selectCertificates(tQSL_Cert **certlist, int *ncerts,
376 const char *callsign, int dxcc, const tQSL_Date *date, const TQSL_PROVIDER *issuer, int flag);
377
389 DLLEXPORT int CALLCONVENTION tqsl_selectCACertificates(tQSL_Cert **certlist, int *ncerts, const char *type);
390
399 DLLEXPORT int CALLCONVENTION tqsl_getSelectedCertificate(tQSL_Cert *cert, const tQSL_Cert **certlist,
400 int idx);
401
404 DLLEXPORT int CALLCONVENTION tqsl_isCertificateExpired(tQSL_Cert cert, int *status);
405
408 DLLEXPORT int CALLCONVENTION tqsl_isCertificateSuperceded(tQSL_Cert cert, int *status);
409
412 DLLEXPORT int CALLCONVENTION tqsl_getCertificateKeyOnly(tQSL_Cert cert, int *keyonly);
413
416 DLLEXPORT int CALLCONVENTION tqsl_getCertificateEncoded(tQSL_Cert cert, char *buf, int bufsiz);
417
420 DLLEXPORT int CALLCONVENTION tqsl_getKeyEncoded(tQSL_Cert cert, char *buf, int bufsiz);
421
424 DLLEXPORT int CALLCONVENTION tqsl_importKeyPairEncoded(const char *callsign, const char *type, const char *keybuf, const char *certbuf);
425
428 DLLEXPORT int CALLCONVENTION tqsl_getCertificateSerial(tQSL_Cert cert, long *serial);
429
433 DLLEXPORT int CALLCONVENTION tqsl_getCertificateSerialExt(tQSL_Cert cert, char *serial, int serialsiz);
434
438 DLLEXPORT int CALLCONVENTION tqsl_getCertificateSerialLength(tQSL_Cert cert);
439
449 DLLEXPORT int CALLCONVENTION tqsl_getCertificateIssuer(tQSL_Cert cert, char *buf, int bufsiz);
450
460 DLLEXPORT int CALLCONVENTION tqsl_getCertificateIssuerOrganization(tQSL_Cert cert, char *buf, int bufsiz);
470 DLLEXPORT int CALLCONVENTION tqsl_getCertificateIssuerOrganizationalUnit(tQSL_Cert cert, char *buf, int bufsiz);
480 DLLEXPORT int CALLCONVENTION tqsl_getCertificateCallSign(tQSL_Cert cert, char *buf, int bufsiz);
490 DLLEXPORT int CALLCONVENTION tqsl_getCertificateAROName(tQSL_Cert cert, char *buf, int bufsiz);
491
501 DLLEXPORT int CALLCONVENTION tqsl_getCertificateEmailAddress(tQSL_Cert cert, char *buf, int bufsiz);
502
511 DLLEXPORT int CALLCONVENTION tqsl_getCertificateQSONotBeforeDate(tQSL_Cert cert, tQSL_Date *date);
512
521 DLLEXPORT int CALLCONVENTION tqsl_getCertificateQSONotAfterDate(tQSL_Cert cert, tQSL_Date *date);
522
531 DLLEXPORT int CALLCONVENTION tqsl_getCertificateNotBeforeDate(tQSL_Cert cert, tQSL_Date *date);
532
541 DLLEXPORT int CALLCONVENTION tqsl_getCertificateNotAfterDate(tQSL_Cert cert, tQSL_Date *date);
542
551 DLLEXPORT int CALLCONVENTION tqsl_getCertificateDXCCEntity(tQSL_Cert cert, int *dxcc);
552
563 DLLEXPORT int CALLCONVENTION tqsl_getCertificateRequestAddress1(tQSL_Cert cert, char *str, int bufsiz);
564
575 DLLEXPORT int CALLCONVENTION tqsl_getCertificateRequestAddress2(tQSL_Cert cert, char *str, int bufsiz);
576
587 DLLEXPORT int CALLCONVENTION tqsl_getCertificateRequestCity(tQSL_Cert cert, char *str, int bufsiz);
588
599 DLLEXPORT int CALLCONVENTION tqsl_getCertificateRequestState(tQSL_Cert cert, char *str, int bufsiz);
600
611 DLLEXPORT int CALLCONVENTION tqsl_getCertificateRequestPostalCode(tQSL_Cert cert, char *str, int bufsiz);
612
623 DLLEXPORT int CALLCONVENTION tqsl_getCertificateRequestCountry(tQSL_Cert cert, char *str, int bufsiz);
624
625 #define TQSL_PK_TYPE_ERR 0
626 #define TQSL_PK_TYPE_NONE 1
627 #define TQSL_PK_TYPE_UNENC 2
628 #define TQSL_PK_TYPE_ENC 3
629
644 DLLEXPORT int CALLCONVENTION tqsl_getCertificatePrivateKeyType(tQSL_Cert cert);
645
646
650 DLLEXPORT void CALLCONVENTION tqsl_freeCertificate(tQSL_Cert cert);
651
657 DLLEXPORT void CALLCONVENTION tqsl_freeCertificateList(tQSL_Cert* list, int ncerts);
658
659 #define TQSL_CERT_STATUS_UNK 0
660 #define TQSL_CERT_STATUS_SUP 1
661 #define TQSL_CERT_STATUS_EXP 2
662 #define TQSL_CERT_STATUS_OK 3
663 #define TQSL_CERT_STATUS_INV 4
664
679 DLLEXPORT int CALLCONVENTION tqsl_getCertificateStatus(long serial);
680
685 DLLEXPORT int CALLCONVENTION tqsl_setCertificateStatus(long serial, const char *status);
686
687 /* int tqsl_checkCertificate(tQSL_Cert); */
688
706 DLLEXPORT int CALLCONVENTION tqsl_importTQSLFile(const char *file, int(*cb)(int type, const char *message, void *userdata), void *user);
707
716 DLLEXPORT int CALLCONVENTION tqsl_getSerialFromTQSLFile(const char *file, long *serial);
717
720 DLLEXPORT int CALLCONVENTION tqsl_getNumProviders(int *n);
721
726 DLLEXPORT int CALLCONVENTION tqsl_getProvider(int idx, TQSL_PROVIDER *provider);
727
740 DLLEXPORT int CALLCONVENTION tqsl_createCertRequest(const char *filename, TQSL_CERT_REQ *req,
741 int(*pwcb)(char *pwbuf, int pwsize, void *userdata), void *user);
742
750 DLLEXPORT int CALLCONVENTION tqsl_exportPKCS12File(tQSL_Cert cert, const char *filename, const char *p12password);
751
760 DLLEXPORT int CALLCONVENTION tqsl_exportPKCS12Base64(tQSL_Cert cert, char *base64, int b64len, const char *p12password);
761
764 DLLEXPORT int CALLCONVENTION tqsl_importPKCS12File(const char *filename, const char *p12password, const char *password,
765 int (*pwcb)(char *buf, int bufsiz, void *userdata), int(*cb)(int type , const char *message, void *userdata), void *user);
766
769 DLLEXPORT int CALLCONVENTION tqsl_importPKCS12Base64(const char *base64, const char *p12password, const char *password,
770 int (*pwcb)(char *buf, int bufsiz, void *userdata), int(*cb)(int type , const char *message, void *userdata), void *user);
771
773 DLLEXPORT int CALLCONVENTION tqsl_getDeletedCallsignCertificates(char ***calls, int *ncall, const char *filter);
774
776 DLLEXPORT void CALLCONVENTION tqsl_freeDeletedCertificateList(char **list, int nloc);
777
779 DLLEXPORT int CALLCONVENTION tqsl_restoreCallsignCertificate(const char *callsign);
780
783 DLLEXPORT int CALLCONVENTION tqsl_deleteCertificate(tQSL_Cert cert);
784
807 DLLEXPORT int CALLCONVENTION tqsl_beginSigning(tQSL_Cert cert, char *password, int(*pwcb)(char *pwbuf, int pwsize, void *userdata), void *user);
808
813 DLLEXPORT int CALLCONVENTION tqsl_checkSigningStatus(tQSL_Cert cert);
814
819 DLLEXPORT int CALLCONVENTION tqsl_getMaxSignatureSize(tQSL_Cert cert, int *sigsize);
820
826 DLLEXPORT int CALLCONVENTION tqsl_signDataBlock(tQSL_Cert cert, const unsigned char *data, int datalen, unsigned char *sig, int *siglen);
827
832 DLLEXPORT int CALLCONVENTION tqsl_verifyDataBlock(tQSL_Cert cert, const unsigned char *data, int datalen, unsigned char *sig, int siglen);
833
841 DLLEXPORT int CALLCONVENTION tqsl_signQSORecord(tQSL_Cert cert, tQSL_Location loc, TQSL_QSO_RECORD *rec, unsigned char *sig, int *siglen);
842
847 DLLEXPORT int CALLCONVENTION tqsl_endSigning(tQSL_Cert cert);
848
953 /* Location field input types */
954
955 #define TQSL_LOCATION_FIELD_TEXT 1
956 #define TQSL_LOCATION_FIELD_DDLIST 2
957 #define TQSL_LOCATION_FIELD_LIST 3
958 #define TQSL_LOCATION_FIELD_BADZONE 4
959
960 /* Location field data types */
961 #define TQSL_LOCATION_FIELD_CHAR 1
962 #define TQSL_LOCATION_FIELD_INT 2
963
965 DLLEXPORT int CALLCONVENTION tqsl_initStationLocationCapture(tQSL_Location *locp);
966
971 DLLEXPORT int CALLCONVENTION tqsl_endStationLocationCapture(tQSL_Location *locp);
972
974 DLLEXPORT int CALLCONVENTION tqsl_updateStationLocationCapture(tQSL_Location loc);
975
978 DLLEXPORT int CALLCONVENTION tqsl_getNumStationLocationCapturePages(tQSL_Location loc, int *npages);
979
981 DLLEXPORT int CALLCONVENTION tqsl_getStationLocationCapturePage(tQSL_Location loc, int *page);
982
987 DLLEXPORT int CALLCONVENTION tqsl_setStationLocationCapturePage(tQSL_Location loc, int page);
988
992 DLLEXPORT int CALLCONVENTION tqsl_setStationLocationCertFlags(tQSL_Location loc, int flags);
993
995 DLLEXPORT int CALLCONVENTION tqsl_nextStationLocationCapture(tQSL_Location loc);
996
998 DLLEXPORT int CALLCONVENTION tqsl_getNextStationLocationCapturePage(tQSL_Location loc, int *page);
999
1001 DLLEXPORT int CALLCONVENTION tqsl_prevStationLocationCapture(tQSL_Location loc);
1002
1004 DLLEXPORT int CALLCONVENTION tqsl_getPrevStationLocationCapturePage(tQSL_Location loc, int *page);
1005
1007 DLLEXPORT int CALLCONVENTION tqsl_getCurrentStationLocationCapturePage(tQSL_Location loc, int *page);
1008
1010 DLLEXPORT int CALLCONVENTION tqsl_hasNextStationLocationCapture(tQSL_Location loc, int *rval);
1011
1013 DLLEXPORT int CALLCONVENTION tqsl_hasPrevStationLocationCapture(tQSL_Location loc, int *rval);
1014
1021 DLLEXPORT int CALLCONVENTION tqsl_saveStationLocationCapture(tQSL_Location loc, int overwrite);
1022
1024 DLLEXPORT int CALLCONVENTION tqsl_getStationLocationCaptureName(tQSL_Location loc, char *namebuf, int bufsiz);
1025
1027 DLLEXPORT int CALLCONVENTION tqsl_setStationLocationCaptureName(tQSL_Location loc, const char *name);
1028
1030 DLLEXPORT int CALLCONVENTION tqsl_getNumStationLocations(tQSL_Location loc, int *nloc);
1031
1033 DLLEXPORT int CALLCONVENTION tqsl_getStationLocationName(tQSL_Location loc, int idx, char *buf, int bufsiz);
1034
1036 DLLEXPORT int CALLCONVENTION tqsl_getStationLocationCallSign(tQSL_Location loc, int idx, char *buf, int bufsiz);
1037
1039 DLLEXPORT int CALLCONVENTION tqsl_getStationLocationField(tQSL_Location locp, const char *name, char *namebuf, int bufsize);
1040
1045 DLLEXPORT int CALLCONVENTION tqsl_getStationLocation(tQSL_Location *loc, const char *name);
1046
1053 DLLEXPORT int CALLCONVENTION tqsl_getStationLocationErrors(tQSL_Location loc, char *buf, int bufsiz);
1054
1058 DLLEXPORT int CALLCONVENTION tqsl_getStationDataEnc(tQSL_StationDataEnc *sdata);
1059
1062 DLLEXPORT int CALLCONVENTION tqsl_freeStationDataEnc(tQSL_StationDataEnc sdata);
1063
1065 DLLEXPORT int CALLCONVENTION tqsl_mergeStationLocations(const char *locdata);
1066
1068 DLLEXPORT int CALLCONVENTION tqsl_deleteStationLocation(const char *name);
1069
1071 DLLEXPORT int CALLCONVENTION tqsl_restoreStationLocation(const char *name);
1072
1074 DLLEXPORT int CALLCONVENTION tqsl_getDeletedStationLocations(char ***locp, int *nloc);
1075
1077 DLLEXPORT void CALLCONVENTION tqsl_freeDeletedLocationList(char **list, int nloc);
1078
1080 DLLEXPORT int CALLCONVENTION tqsl_getNumLocationField(tQSL_Location loc, int *numf);
1081
1083 DLLEXPORT int CALLCONVENTION tqsl_getLocationFieldDataLabelSize(tQSL_Location loc, int field_num, int *rval);
1084
1086 DLLEXPORT int CALLCONVENTION tqsl_getLocationFieldDataLabel(tQSL_Location loc, int field_num, char *buf, int bufsiz);
1087
1089 DLLEXPORT int CALLCONVENTION tqsl_getLocationFieldDataGABBISize(tQSL_Location loc, int field_num, int *rval);
1090
1092 DLLEXPORT int CALLCONVENTION tqsl_getLocationFieldDataGABBI(tQSL_Location loc, int field_num, char *buf, int bufsiz);
1093
1100 DLLEXPORT int CALLCONVENTION tqsl_getNumLocationField(tQSL_Location loc, int *numf);
1101
1103 DLLEXPORT int CALLCONVENTION tqsl_getLocationFieldDataLabelSize(tQSL_Location loc, int field_num, int *rval);
1104
1106 DLLEXPORT int CALLCONVENTION tqsl_getLocationFieldDataLabel(tQSL_Location loc, int field_num, char *buf, int bufsiz);
1107
1109 DLLEXPORT int CALLCONVENTION tqsl_getLocationFieldDataGABBISize(tQSL_Location loc, int field_num, int *rval);
1110
1112 DLLEXPORT int CALLCONVENTION tqsl_getLocationFieldDataGABBI(tQSL_Location loc, int field_num, char *buf, int bufsiz);
1113
1119 DLLEXPORT int CALLCONVENTION tqsl_getLocationFieldInputType(tQSL_Location loc, int field_num, int *type);
1120
1125 DLLEXPORT int CALLCONVENTION tqsl_getLocationFieldDataType(tQSL_Location loc, int field_num, int *type);
1126
1135 DLLEXPORT int CALLCONVENTION tqsl_getLocationFieldFlags(tQSL_Location loc, int field_num, int *flags);
1136
1138 DLLEXPORT int CALLCONVENTION tqsl_getLocationFieldDataLength(tQSL_Location loc, int field_num, int *rval);
1139
1146 DLLEXPORT int CALLCONVENTION tqsl_getLocationFieldCharData(tQSL_Location loc, int field_num, char *buf, int bufsiz);
1147
1153 DLLEXPORT int CALLCONVENTION tqsl_getLocationFieldIntData(tQSL_Location loc, int field_num, int *dat);
1154
1159 DLLEXPORT int CALLCONVENTION tqsl_getLocationFieldIndex(tQSL_Location loc, int field_num, int *dat);
1160
1162 DLLEXPORT int CALLCONVENTION tqsl_getNumLocationFieldListItems(tQSL_Location loc, int field_num, int *rval);
1163
1165 DLLEXPORT int CALLCONVENTION tqsl_getLocationFieldListItem(tQSL_Location loc, int field_num, int item_idx, char *buf, int bufsiz);
1166
1168 DLLEXPORT int CALLCONVENTION tqsl_setLocationFieldCharData(tQSL_Location loc, int field_num, const char *buf);
1169
1172 DLLEXPORT int CALLCONVENTION tqsl_setLocationFieldIntData(tQSL_Location loc, int field_num, int dat);
1173
1178 DLLEXPORT int CALLCONVENTION tqsl_setLocationFieldIndex(tQSL_Location loc, int field_num, int dat);
1179
1184 DLLEXPORT int CALLCONVENTION tqsl_getLocationFieldChanged(tQSL_Location loc, int field_num, int *changed);
1185
1187 DLLEXPORT int CALLCONVENTION tqsl_getLocationCallSign(tQSL_Location loc, char *buf, int bufsiz);
1188
1190 DLLEXPORT int CALLCONVENTION tqsl_setLocationCallSign(tQSL_Location loc, const char *buf, int dxcc);
1191
1193 DLLEXPORT int CALLCONVENTION tqsl_getLocationField(tQSL_Location locp, const char *field, char *buf, int bufsiz);
1194
1196 DLLEXPORT int CALLCONVENTION tqsl_getLocationFieldLabel(tQSL_Location locp, const char *field, char *buf, int bufsiz);
1197
1199 DLLEXPORT int CALLCONVENTION tqsl_setLocationField(tQSL_Location locp, const char *field, const char *buf);
1200
1202 DLLEXPORT int CALLCONVENTION tqsl_getLocationDXCCEntity(tQSL_Location loc, int *dxcc);
1203
1205 DLLEXPORT int CALLCONVENTION tqsl_getLocationQSODetails(tQSL_Location locp, char *buf, int buflen);
1206
1208 DLLEXPORT int CALLCONVENTION tqsl_getLocationStationDetails(tQSL_Location locp, char *buf, int buflen);
1209
1211 DLLEXPORT int CALLCONVENTION tqsl_saveCallsignLocationInfo(const char *callsign, const char *json);
1212
1214 DLLEXPORT int CALLCONVENTION tqsl_getCallsignLocationInfo(const char *callsign, char **buf);
1215
1218 DLLEXPORT int CALLCONVENTION tqsl_getNumDXCCEntity(int *number);
1219
1222 DLLEXPORT int CALLCONVENTION tqsl_getDXCCEntity(int index, int *number, const char **name);
1223
1226 DLLEXPORT int CALLCONVENTION tqsl_getDXCCEntityName(int number, const char **name);
1227
1230 DLLEXPORT int CALLCONVENTION tqsl_getDXCCZoneMap(int number, const char **zonemap);
1231
1234 DLLEXPORT int CALLCONVENTION tqsl_getDXCCStartDate(int number, tQSL_Date *d);
1235
1238 DLLEXPORT int CALLCONVENTION tqsl_getDXCCEndDate(int number, tQSL_Date *d);
1239
1242 DLLEXPORT int CALLCONVENTION tqsl_getDXCCDeleted(int number, int *deleted);
1243
1245 DLLEXPORT int CALLCONVENTION tqsl_getNumBand(int *number);
1246
1256 DLLEXPORT int CALLCONVENTION tqsl_getBand(int index, const char **name, const char **spectrum, int *low, int *high);
1257
1259 DLLEXPORT int CALLCONVENTION tqsl_getNumMode(int *number);
1260
1268 DLLEXPORT int CALLCONVENTION tqsl_getMode(int index, const char **mode, const char **group);
1269
1271 DLLEXPORT int CALLCONVENTION tqsl_getNumADIFMode(int *number);
1272
1278 DLLEXPORT int CALLCONVENTION tqsl_getADIFModeEntry(int index, const char **mode);
1279
1281 DLLEXPORT int CALLCONVENTION tqsl_getNumPropagationMode(int *number);
1282
1290 DLLEXPORT int CALLCONVENTION tqsl_getPropagationMode(int index, const char **name, const char **descrip);
1291
1293 DLLEXPORT int CALLCONVENTION tqsl_getNumSatellite(int *number);
1294
1304 DLLEXPORT int CALLCONVENTION tqsl_getSatellite(int index, const char **name, const char **descrip,
1305 tQSL_Date *start, tQSL_Date *end);
1306
1309 DLLEXPORT int CALLCONVENTION tqsl_clearCabrilloMap();
1310
1321 DLLEXPORT int CALLCONVENTION tqsl_setCabrilloMapEntry(const char *contest, int field, int contest_type);
1322
1334 DLLEXPORT int CALLCONVENTION tqsl_getCabrilloMapEntry(const char *contest, int *fieldnum, int *contest_type);
1335
1338 DLLEXPORT int CALLCONVENTION tqsl_clearADIFModes();
1339
1342 DLLEXPORT int CALLCONVENTION tqsl_setADIFMode(const char *adif_item, const char *mode);
1343
1346 DLLEXPORT int CALLCONVENTION tqsl_getADIFMode(const char *adif_item, char *mode, int nmode);
1347
1350 DLLEXPORT int CALLCONVENTION tqsl_getADIFSubMode(const char *adif_item, char *mode, char *submode, int nmode);
1351
1361 DLLEXPORT const char* CALLCONVENTION tqsl_getGABBItCERT(tQSL_Cert cert, int uid);
1362
1373 DLLEXPORT const char* CALLCONVENTION tqsl_getGABBItSTATION(tQSL_Location loc, int uid, int certuid);
1374
1387 DLLEXPORT const char* CALLCONVENTION tqsl_getGABBItCONTACT(tQSL_Cert cert, tQSL_Location loc, TQSL_QSO_RECORD *qso,
1388 int stationuid);
1389
1403 DLLEXPORT const char* CALLCONVENTION tqsl_getGABBItCONTACTData(tQSL_Cert cert, tQSL_Location loc, TQSL_QSO_RECORD *qso,
1404 int stationuid, char *signdata, int sdlen);
1405
1412 DLLEXPORT void CALLCONVENTION tqslTrace(const char *name, const char *format, ...);
1415 DLLEXPORT void CALLCONVENTION tqsl_closeDiagFile(void);
1418 DLLEXPORT int CALLCONVENTION tqsl_diagFileOpen(void);
1422 DLLEXPORT int CALLCONVENTION tqsl_openDiagFile(const char* file);
1423
1424 #ifdef _WIN32
1425 DLLEXPORT wchar_t* CALLCONVENTION utf8_to_wchar(const char* str);
1426 DLLEXPORT char* CALLCONVENTION wchar_to_utf8(const wchar_t* str, bool forceUTF8);
1427 DLLEXPORT void CALLCONVENTION free_wchar(wchar_t* ptr);
1428 #endif
1429
1430 #ifdef __cplusplus
1431 }
1432 #endif
1433
1434 /* Useful defines */
1435 #define TQSL_MAX_PW_LENGTH 32
1436
1437 #endif /* TQSLLIB_H */
adif.h
cabrillo.h
TQSL_ADIF_GET_FIELD_ERROR
TQSL_ADIF_GET_FIELD_ERROR
Response values returned from tqsl_getADIFField()
Definition: adif.h:52
TQSL_CABRILLO_ERROR_TYPE
TQSL_CABRILLO_ERROR_TYPE
Cabrillo status values.
Definition: cabrillo.h:40
tqsl_getCertificateRequestAddress1
DLLEXPORT int CALLCONVENTION tqsl_getCertificateRequestAddress1(tQSL_Cert cert, char *str, int bufsiz)
tqsl_getCertificateAROName
DLLEXPORT int CALLCONVENTION tqsl_getCertificateAROName(tQSL_Cert cert, char *buf, int bufsiz)
tqsl_importPKCS12File
DLLEXPORT int CALLCONVENTION tqsl_importPKCS12File(const char *filename, const char *p12password, const char *password, int(*pwcb)(char *buf, int bufsiz, void *userdata), int(*cb)(int type, const char *message, void *userdata), void *user)
tqsl_deleteCertificate
DLLEXPORT int CALLCONVENTION tqsl_deleteCertificate(tQSL_Cert cert)
tqsl_getCertificateRequestCity
DLLEXPORT int CALLCONVENTION tqsl_getCertificateRequestCity(tQSL_Cert cert, char *str, int bufsiz)
tqsl_exportPKCS12File
DLLEXPORT int CALLCONVENTION tqsl_exportPKCS12File(tQSL_Cert cert, const char *filename, const char *p12password)
tqsl_getCertificateRequestState
DLLEXPORT int CALLCONVENTION tqsl_getCertificateRequestState(tQSL_Cert cert, char *str, int bufsiz)
tqsl_getSelectedCertificate
DLLEXPORT int CALLCONVENTION tqsl_getSelectedCertificate(tQSL_Cert *cert, const tQSL_Cert **certlist, int idx)
tqsl_getCertificateIssuerOrganizationalUnit
DLLEXPORT int CALLCONVENTION tqsl_getCertificateIssuerOrganizationalUnit(tQSL_Cert cert, char *buf, int bufsiz)
tqsl_isCertificateSuperceded
DLLEXPORT int CALLCONVENTION tqsl_isCertificateSuperceded(tQSL_Cert cert, int *status)
tqsl_selectCACertificates
DLLEXPORT int CALLCONVENTION tqsl_selectCACertificates(tQSL_Cert **certlist, int *ncerts, const char *type)
tqsl_getCertificatePrivateKeyType
DLLEXPORT int CALLCONVENTION tqsl_getCertificatePrivateKeyType(tQSL_Cert cert)
tqsl_restoreCallsignCertificate
DLLEXPORT int CALLCONVENTION tqsl_restoreCallsignCertificate(const char *callsign)
tqsl_createCertRequest
DLLEXPORT int CALLCONVENTION tqsl_createCertRequest(const char *filename, TQSL_CERT_REQ *req, int(*pwcb)(char *pwbuf, int pwsize, void *userdata), void *user)
tqsl_importKeyPairEncoded
DLLEXPORT int CALLCONVENTION tqsl_importKeyPairEncoded(const char *callsign, const char *type, const char *keybuf, const char *certbuf)
tqsl_selectCertificates
DLLEXPORT int CALLCONVENTION tqsl_selectCertificates(tQSL_Cert **certlist, int *ncerts, const char *callsign, int dxcc, const tQSL_Date *date, const TQSL_PROVIDER *issuer, int flag)
tqsl_getCertificateSerialLength
DLLEXPORT int CALLCONVENTION tqsl_getCertificateSerialLength(tQSL_Cert cert)
tqsl_getCertificateQSONotAfterDate
DLLEXPORT int CALLCONVENTION tqsl_getCertificateQSONotAfterDate(tQSL_Cert cert, tQSL_Date *date)
tqsl_getSerialFromTQSLFile
DLLEXPORT int CALLCONVENTION tqsl_getSerialFromTQSLFile(const char *file, long *serial)
tqsl_importPKCS12Base64
DLLEXPORT int CALLCONVENTION tqsl_importPKCS12Base64(const char *base64, const char *p12password, const char *password, int(*pwcb)(char *buf, int bufsiz, void *userdata), int(*cb)(int type, const char *message, void *userdata), void *user)
tqsl_getCertificateSerial
DLLEXPORT int CALLCONVENTION tqsl_getCertificateSerial(tQSL_Cert cert, long *serial)
tqsl_getNumProviders
DLLEXPORT int CALLCONVENTION tqsl_getNumProviders(int *n)
tqsl_getCertificateIssuerOrganization
DLLEXPORT int CALLCONVENTION tqsl_getCertificateIssuerOrganization(tQSL_Cert cert, char *buf, int bufsiz)
tqsl_getCertificateQSONotBeforeDate
DLLEXPORT int CALLCONVENTION tqsl_getCertificateQSONotBeforeDate(tQSL_Cert cert, tQSL_Date *date)
tqsl_getCertificateNotAfterDate
DLLEXPORT int CALLCONVENTION tqsl_getCertificateNotAfterDate(tQSL_Cert cert, tQSL_Date *date)
tqsl_isCertificateExpired
DLLEXPORT int CALLCONVENTION tqsl_isCertificateExpired(tQSL_Cert cert, int *status)
tqsl_getCertificateEmailAddress
DLLEXPORT int CALLCONVENTION tqsl_getCertificateEmailAddress(tQSL_Cert cert, char *buf, int bufsiz)
tqsl_getCertificateNotBeforeDate
DLLEXPORT int CALLCONVENTION tqsl_getCertificateNotBeforeDate(tQSL_Cert cert, tQSL_Date *date)
tqsl_getProvider
DLLEXPORT int CALLCONVENTION tqsl_getProvider(int idx, TQSL_PROVIDER *provider)
tqsl_getCertificateRequestPostalCode
DLLEXPORT int CALLCONVENTION tqsl_getCertificateRequestPostalCode(tQSL_Cert cert, char *str, int bufsiz)
tqsl_getCertificateCallSign
DLLEXPORT int CALLCONVENTION tqsl_getCertificateCallSign(tQSL_Cert cert, char *buf, int bufsiz)
tqsl_freeCertificateList
DLLEXPORT void CALLCONVENTION tqsl_freeCertificateList(tQSL_Cert *list, int ncerts)
tqsl_getKeyEncoded
DLLEXPORT int CALLCONVENTION tqsl_getKeyEncoded(tQSL_Cert cert, char *buf, int bufsiz)
tqsl_getCertificateStatus
DLLEXPORT int CALLCONVENTION tqsl_getCertificateStatus(long serial)
tqsl_getCertificateKeyOnly
DLLEXPORT int CALLCONVENTION tqsl_getCertificateKeyOnly(tQSL_Cert cert, int *keyonly)
tqsl_exportPKCS12Base64
DLLEXPORT int CALLCONVENTION tqsl_exportPKCS12Base64(tQSL_Cert cert, char *base64, int b64len, const char *p12password)
tqsl_getCertificateRequestAddress2
DLLEXPORT int CALLCONVENTION tqsl_getCertificateRequestAddress2(tQSL_Cert cert, char *str, int bufsiz)
tqsl_getCertificateIssuer
DLLEXPORT int CALLCONVENTION tqsl_getCertificateIssuer(tQSL_Cert cert, char *buf, int bufsiz)
tqsl_getCertificateEncoded
DLLEXPORT int CALLCONVENTION tqsl_getCertificateEncoded(tQSL_Cert cert, char *buf, int bufsiz)
tqsl_getCertificateDXCCEntity
DLLEXPORT int CALLCONVENTION tqsl_getCertificateDXCCEntity(tQSL_Cert cert, int *dxcc)
tqsl_importTQSLFile
DLLEXPORT int CALLCONVENTION tqsl_importTQSLFile(const char *file, int(*cb)(int type, const char *message, void *userdata), void *user)
tqsl_getCertificateRequestCountry
DLLEXPORT int CALLCONVENTION tqsl_getCertificateRequestCountry(tQSL_Cert cert, char *str, int bufsiz)
tqsl_freeCertificate
DLLEXPORT void CALLCONVENTION tqsl_freeCertificate(tQSL_Cert cert)
tqsl_freeDeletedCertificateList
DLLEXPORT void CALLCONVENTION tqsl_freeDeletedCertificateList(char **list, int nloc)
tqsl_setCertificateStatus
DLLEXPORT int CALLCONVENTION tqsl_setCertificateStatus(long serial, const char *status)
tqsl_getCertificateSerialExt
DLLEXPORT int CALLCONVENTION tqsl_getCertificateSerialExt(tQSL_Cert cert, char *serial, int serialsiz)
tqsl_getDeletedCallsignCertificates
DLLEXPORT int CALLCONVENTION tqsl_getDeletedCallsignCertificates(char ***calls, int *ncall, const char *filter)
tqsl_getADIFMode
DLLEXPORT int CALLCONVENTION tqsl_getADIFMode(const char *adif_item, char *mode, int nmode)
tqsl_initStationLocationCapture
DLLEXPORT int CALLCONVENTION tqsl_initStationLocationCapture(tQSL_Location *locp)
tqsl_getLocationFieldFlags
DLLEXPORT int CALLCONVENTION tqsl_getLocationFieldFlags(tQSL_Location loc, int field_num, int *flags)
tqsl_setLocationFieldCharData
DLLEXPORT int CALLCONVENTION tqsl_setLocationFieldCharData(tQSL_Location loc, int field_num, const char *buf)
tqsl_getNumSatellite
DLLEXPORT int CALLCONVENTION tqsl_getNumSatellite(int *number)
tqsl_saveStationLocationCapture
DLLEXPORT int CALLCONVENTION tqsl_saveStationLocationCapture(tQSL_Location loc, int overwrite)
tqsl_getNumMode
DLLEXPORT int CALLCONVENTION tqsl_getNumMode(int *number)
tqsl_getDXCCEndDate
DLLEXPORT int CALLCONVENTION tqsl_getDXCCEndDate(int number, tQSL_Date *d)
tqsl_getStationLocation
DLLEXPORT int CALLCONVENTION tqsl_getStationLocation(tQSL_Location *loc, const char *name)
tqsl_setLocationFieldIndex
DLLEXPORT int CALLCONVENTION tqsl_setLocationFieldIndex(tQSL_Location loc, int field_num, int dat)
tqsl_getNumStationLocationCapturePages
DLLEXPORT int CALLCONVENTION tqsl_getNumStationLocationCapturePages(tQSL_Location loc, int *npages)
tqsl_getStationDataEnc
DLLEXPORT int CALLCONVENTION tqsl_getStationDataEnc(tQSL_StationDataEnc *sdata)
tqsl_getLocationFieldDataLabelSize
DLLEXPORT int CALLCONVENTION tqsl_getLocationFieldDataLabelSize(tQSL_Location loc, int field_num, int *rval)
tqsl_getNumStationLocations
DLLEXPORT int CALLCONVENTION tqsl_getNumStationLocations(tQSL_Location loc, int *nloc)
tqsl_setLocationFieldIntData
DLLEXPORT int CALLCONVENTION tqsl_setLocationFieldIntData(tQSL_Location loc, int field_num, int dat)
tqsl_setLocationField
DLLEXPORT int CALLCONVENTION tqsl_setLocationField(tQSL_Location locp, const char *field, const char *buf)
tqsl_getGABBItCONTACT
DLLEXPORT const char *CALLCONVENTION tqsl_getGABBItCONTACT(tQSL_Cert cert, tQSL_Location loc, TQSL_QSO_RECORD *qso, int stationuid)
tqsl_getLocationFieldDataType
DLLEXPORT int CALLCONVENTION tqsl_getLocationFieldDataType(tQSL_Location loc, int field_num, int *type)
tqsl_freeStationDataEnc
DLLEXPORT int CALLCONVENTION tqsl_freeStationDataEnc(tQSL_StationDataEnc sdata)
tqsl_getADIFModeEntry
DLLEXPORT int CALLCONVENTION tqsl_getADIFModeEntry(int index, const char **mode)
tqsl_endStationLocationCapture
DLLEXPORT int CALLCONVENTION tqsl_endStationLocationCapture(tQSL_Location *locp)
tqsl_getPrevStationLocationCapturePage
DLLEXPORT int CALLCONVENTION tqsl_getPrevStationLocationCapturePage(tQSL_Location loc, int *page)
tqsl_getStationLocationCapturePage
DLLEXPORT int CALLCONVENTION tqsl_getStationLocationCapturePage(tQSL_Location loc, int *page)
tqsl_setStationLocationCaptureName
DLLEXPORT int CALLCONVENTION tqsl_setStationLocationCaptureName(tQSL_Location loc, const char *name)
tqsl_getNumADIFMode
DLLEXPORT int CALLCONVENTION tqsl_getNumADIFMode(int *number)
tqsl_getStationLocationErrors
DLLEXPORT int CALLCONVENTION tqsl_getStationLocationErrors(tQSL_Location loc, char *buf, int bufsiz)
tqsl_getDeletedStationLocations
DLLEXPORT int CALLCONVENTION tqsl_getDeletedStationLocations(char ***locp, int *nloc)
tqsl_getNextStationLocationCapturePage
DLLEXPORT int CALLCONVENTION tqsl_getNextStationLocationCapturePage(tQSL_Location loc, int *page)
tqsl_getLocationFieldDataGABBI
DLLEXPORT int CALLCONVENTION tqsl_getLocationFieldDataGABBI(tQSL_Location loc, int field_num, char *buf, int bufsiz)
tqsl_getDXCCEntityName
DLLEXPORT int CALLCONVENTION tqsl_getDXCCEntityName(int number, const char **name)
tqsl_setStationLocationCapturePage
DLLEXPORT int CALLCONVENTION tqsl_setStationLocationCapturePage(tQSL_Location loc, int page)
tqsl_setLocationCallSign
DLLEXPORT int CALLCONVENTION tqsl_setLocationCallSign(tQSL_Location loc, const char *buf, int dxcc)
tqsl_hasNextStationLocationCapture
DLLEXPORT int CALLCONVENTION tqsl_hasNextStationLocationCapture(tQSL_Location loc, int *rval)
tqsl_getLocationField
DLLEXPORT int CALLCONVENTION tqsl_getLocationField(tQSL_Location locp, const char *field, char *buf, int bufsiz)
tqsl_getLocationFieldDataLabel
DLLEXPORT int CALLCONVENTION tqsl_getLocationFieldDataLabel(tQSL_Location loc, int field_num, char *buf, int bufsiz)
tqsl_getDXCCEntity
DLLEXPORT int CALLCONVENTION tqsl_getDXCCEntity(int index, int *number, const char **name)
tqsl_getDXCCStartDate
DLLEXPORT int CALLCONVENTION tqsl_getDXCCStartDate(int number, tQSL_Date *d)
tqsl_getNumLocationFieldListItems
DLLEXPORT int CALLCONVENTION tqsl_getNumLocationFieldListItems(tQSL_Location loc, int field_num, int *rval)
tqsl_getLocationFieldIntData
DLLEXPORT int CALLCONVENTION tqsl_getLocationFieldIntData(tQSL_Location loc, int field_num, int *dat)
tqsl_getLocationFieldListItem
DLLEXPORT int CALLCONVENTION tqsl_getLocationFieldListItem(tQSL_Location loc, int field_num, int item_idx, char *buf, int bufsiz)
tqsl_getCurrentStationLocationCapturePage
DLLEXPORT int CALLCONVENTION tqsl_getCurrentStationLocationCapturePage(tQSL_Location loc, int *page)
tqsl_prevStationLocationCapture
DLLEXPORT int CALLCONVENTION tqsl_prevStationLocationCapture(tQSL_Location loc)
tqsl_getStationLocationCallSign
DLLEXPORT int CALLCONVENTION tqsl_getStationLocationCallSign(tQSL_Location loc, int idx, char *buf, int bufsiz)
tqsl_getLocationStationDetails
DLLEXPORT int CALLCONVENTION tqsl_getLocationStationDetails(tQSL_Location locp, char *buf, int buflen)
tqsl_getGABBItSTATION
DLLEXPORT const char *CALLCONVENTION tqsl_getGABBItSTATION(tQSL_Location loc, int uid, int certuid)
tqsl_getMode
DLLEXPORT int CALLCONVENTION tqsl_getMode(int index, const char **mode, const char **group)
tqsl_updateStationLocationCapture
DLLEXPORT int CALLCONVENTION tqsl_updateStationLocationCapture(tQSL_Location loc)
tqsl_getStationLocationCaptureName
DLLEXPORT int CALLCONVENTION tqsl_getStationLocationCaptureName(tQSL_Location loc, char *namebuf, int bufsiz)
tqsl_getLocationQSODetails
DLLEXPORT int CALLCONVENTION tqsl_getLocationQSODetails(tQSL_Location locp, char *buf, int buflen)
tqsl_getNumBand
DLLEXPORT int CALLCONVENTION tqsl_getNumBand(int *number)
tqsl_getLocationFieldInputType
DLLEXPORT int CALLCONVENTION tqsl_getLocationFieldInputType(tQSL_Location loc, int field_num, int *type)
tqsl_restoreStationLocation
DLLEXPORT int CALLCONVENTION tqsl_restoreStationLocation(const char *name)
tqsl_getLocationFieldCharData
DLLEXPORT int CALLCONVENTION tqsl_getLocationFieldCharData(tQSL_Location loc, int field_num, char *buf, int bufsiz)
tqsl_nextStationLocationCapture
DLLEXPORT int CALLCONVENTION tqsl_nextStationLocationCapture(tQSL_Location loc)
tqsl_setStationLocationCertFlags
DLLEXPORT int CALLCONVENTION tqsl_setStationLocationCertFlags(tQSL_Location loc, int flags)
tqsl_getBand
DLLEXPORT int CALLCONVENTION tqsl_getBand(int index, const char **name, const char **spectrum, int *low, int *high)
tqsl_deleteStationLocation
DLLEXPORT int CALLCONVENTION tqsl_deleteStationLocation(const char *name)
tqsl_setADIFMode
DLLEXPORT int CALLCONVENTION tqsl_setADIFMode(const char *adif_item, const char *mode)
tqsl_getCallsignLocationInfo
DLLEXPORT int CALLCONVENTION tqsl_getCallsignLocationInfo(const char *callsign, char **buf)
tqsl_clearADIFModes
DLLEXPORT int CALLCONVENTION tqsl_clearADIFModes()
tqsl_setCabrilloMapEntry
DLLEXPORT int CALLCONVENTION tqsl_setCabrilloMapEntry(const char *contest, int field, int contest_type)
tqsl_clearCabrilloMap
DLLEXPORT int CALLCONVENTION tqsl_clearCabrilloMap()
tqsl_getNumLocationField
DLLEXPORT int CALLCONVENTION tqsl_getNumLocationField(tQSL_Location loc, int *numf)
tqsl_getNumDXCCEntity
DLLEXPORT int CALLCONVENTION tqsl_getNumDXCCEntity(int *number)
tqsl_getLocationFieldDataGABBISize
DLLEXPORT int CALLCONVENTION tqsl_getLocationFieldDataGABBISize(tQSL_Location loc, int field_num, int *rval)
tqsl_getADIFSubMode
DLLEXPORT int CALLCONVENTION tqsl_getADIFSubMode(const char *adif_item, char *mode, char *submode, int nmode)
tqsl_getLocationCallSign
DLLEXPORT int CALLCONVENTION tqsl_getLocationCallSign(tQSL_Location loc, char *buf, int bufsiz)
tqsl_getLocationFieldLabel
DLLEXPORT int CALLCONVENTION tqsl_getLocationFieldLabel(tQSL_Location locp, const char *field, char *buf, int bufsiz)
tqsl_getLocationFieldChanged
DLLEXPORT int CALLCONVENTION tqsl_getLocationFieldChanged(tQSL_Location loc, int field_num, int *changed)
tqsl_mergeStationLocations
DLLEXPORT int CALLCONVENTION tqsl_mergeStationLocations(const char *locdata)
tqsl_getStationLocationField
DLLEXPORT int CALLCONVENTION tqsl_getStationLocationField(tQSL_Location locp, const char *name, char *namebuf, int bufsize)
tqsl_getDXCCZoneMap
DLLEXPORT int CALLCONVENTION tqsl_getDXCCZoneMap(int number, const char **zonemap)
tqsl_getSatellite
DLLEXPORT int CALLCONVENTION tqsl_getSatellite(int index, const char **name, const char **descrip, tQSL_Date *start, tQSL_Date *end)
tqsl_getCabrilloMapEntry
DLLEXPORT int CALLCONVENTION tqsl_getCabrilloMapEntry(const char *contest, int *fieldnum, int *contest_type)
tqsl_getNumPropagationMode
DLLEXPORT int CALLCONVENTION tqsl_getNumPropagationMode(int *number)
tqsl_saveCallsignLocationInfo
DLLEXPORT int CALLCONVENTION tqsl_saveCallsignLocationInfo(const char *callsign, const char *json)
tqsl_getLocationFieldDataLength
DLLEXPORT int CALLCONVENTION tqsl_getLocationFieldDataLength(tQSL_Location loc, int field_num, int *rval)
tqsl_getPropagationMode
DLLEXPORT int CALLCONVENTION tqsl_getPropagationMode(int index, const char **name, const char **descrip)
tqsl_getGABBItCONTACTData
DLLEXPORT const char *CALLCONVENTION tqsl_getGABBItCONTACTData(tQSL_Cert cert, tQSL_Location loc, TQSL_QSO_RECORD *qso, int stationuid, char *signdata, int sdlen)
tqsl_getDXCCDeleted
DLLEXPORT int CALLCONVENTION tqsl_getDXCCDeleted(int number, int *deleted)
tqsl_hasPrevStationLocationCapture
DLLEXPORT int CALLCONVENTION tqsl_hasPrevStationLocationCapture(tQSL_Location loc, int *rval)
tqsl_getStationLocationName
DLLEXPORT int CALLCONVENTION tqsl_getStationLocationName(tQSL_Location loc, int idx, char *buf, int bufsiz)
tqsl_freeDeletedLocationList
DLLEXPORT void CALLCONVENTION tqsl_freeDeletedLocationList(char **list, int nloc)
tqsl_getGABBItCERT
DLLEXPORT const char *CALLCONVENTION tqsl_getGABBItCERT(tQSL_Cert cert, int uid)
tqsl_getLocationDXCCEntity
DLLEXPORT int CALLCONVENTION tqsl_getLocationDXCCEntity(tQSL_Location loc, int *dxcc)
tqsl_getLocationFieldIndex
DLLEXPORT int CALLCONVENTION tqsl_getLocationFieldIndex(tQSL_Location loc, int field_num, int *dat)
tqsl_verifyDataBlock
DLLEXPORT int CALLCONVENTION tqsl_verifyDataBlock(tQSL_Cert cert, const unsigned char *data, int datalen, unsigned char *sig, int siglen)
tqsl_getMaxSignatureSize
DLLEXPORT int CALLCONVENTION tqsl_getMaxSignatureSize(tQSL_Cert cert, int *sigsize)
tqsl_signDataBlock
DLLEXPORT int CALLCONVENTION tqsl_signDataBlock(tQSL_Cert cert, const unsigned char *data, int datalen, unsigned char *sig, int *siglen)
tqsl_beginSigning
DLLEXPORT int CALLCONVENTION tqsl_beginSigning(tQSL_Cert cert, char *password, int(*pwcb)(char *pwbuf, int pwsize, void *userdata), void *user)
tqsl_endSigning
DLLEXPORT int CALLCONVENTION tqsl_endSigning(tQSL_Cert cert)
tqsl_checkSigningStatus
DLLEXPORT int CALLCONVENTION tqsl_checkSigningStatus(tQSL_Cert cert)
tqsl_signQSORecord
DLLEXPORT int CALLCONVENTION tqsl_signQSORecord(tQSL_Cert cert, tQSL_Location loc, TQSL_QSO_RECORD *rec, unsigned char *sig, int *siglen)
tQSL_ADIF_Error
DLLEXPORTDATA TQSL_ADIF_GET_FIELD_ERROR tQSL_ADIF_Error
The ADIF error code.
tQSL_DiagFile
DLLEXPORTDATA FILE * tQSL_DiagFile
Diagnostic log file.
tqsl_decodeBase64
DLLEXPORT int CALLCONVENTION tqsl_decodeBase64(const char *input, unsigned char *data, int *datalen)
tqsl_getVersion
DLLEXPORT int CALLCONVENTION tqsl_getVersion(int *major, int *minor)
tqsl_compareDates
DLLEXPORT int CALLCONVENTION tqsl_compareDates(const tQSL_Date *a, const tQSL_Date *b)
tqsl_init
DLLEXPORT int CALLCONVENTION tqsl_init()
tQSL_CustomError
DLLEXPORTDATA char tQSL_CustomError[256]
Custom error message string.
tqsl_getErrorString
DLLEXPORT const char *CALLCONVENTION tqsl_getErrorString()
tqsl_isDateValid
DLLEXPORT int CALLCONVENTION tqsl_isDateValid(const tQSL_Date *d)
tqsl_subtractDates
DLLEXPORT int CALLCONVENTION tqsl_subtractDates(const tQSL_Date *a, const tQSL_Date *b, int *diff)
tqsl_isTimeValid
DLLEXPORT int CALLCONVENTION tqsl_isTimeValid(const tQSL_Time *t)
tqsl_isDateNull
DLLEXPORT int CALLCONVENTION tqsl_isDateNull(const tQSL_Date *d)
tqsl_setDirectory
DLLEXPORT int CALLCONVENTION tqsl_setDirectory(const char *dir)
tqsl_encodeBase64
DLLEXPORT int CALLCONVENTION tqsl_encodeBase64(const unsigned char *data, int datalen, char *output, int outputlen)
tqsl_initTime
DLLEXPORT int CALLCONVENTION tqsl_initTime(tQSL_Time *time, const char *str)
tqsl_convertDateToText
DLLEXPORT char *CALLCONVENTION tqsl_convertDateToText(const tQSL_Date *date, char *buf, int bufsiz)
tqsl_getConfigVersion
DLLEXPORT int CALLCONVENTION tqsl_getConfigVersion(int *major, int *minor)
tqsl_convertTimeToText
DLLEXPORT char *CALLCONVENTION tqsl_convertTimeToText(const tQSL_Time *time, char *buf, int bufsiz)
tQSL_ImportSerial
DLLEXPORTDATA long tQSL_ImportSerial
Serial number of recent certificate import.
tQSL_Error
DLLEXPORTDATA int tQSL_Error
Error code from most recent tQSL library call.
tQSL_Cabrillo_Error
DLLEXPORTDATA TQSL_CABRILLO_ERROR_TYPE tQSL_Cabrillo_Error
The ADIF error code.
tqsl_initDate
DLLEXPORT int CALLCONVENTION tqsl_initDate(tQSL_Date *date, const char *str)
tqsl_getErrorString_v
DLLEXPORT const char *CALLCONVENTION tqsl_getErrorString_v(int err)
tQSL_ErrorFile
DLLEXPORTDATA char tQSL_ErrorFile[TQSL_MAX_PATH_LEN]
File name of file giving error. (May be empty.)
tQSL_Errno
DLLEXPORTDATA int tQSL_Errno
System errno - stored when tQSL_Error == TQSL_SYSTEM_ERROR.
tQSL_ImportCall
DLLEXPORTDATA char tQSL_ImportCall[256]
Callsign used in import - used for missing public key error.
TQSL_QSO_RECORD
Definition: tqsllib.h:129
TQSL_QSO_RECORD::time_set
bool time_set
QSO specifies a time.
Definition: tqsllib.h:145
TQSL_QSO_RECORD::date_set
bool date_set
QSO specifies a date.
Definition: tqsllib.h:144
TQSL_QSO_RECORD::mode_set
bool mode_set
QSO specifies a mode.
Definition: tqsllib.h:142
TQSL_QSO_RECORD::date
tQSL_Date date
QSO date.
Definition: tqsllib.h:134
TQSL_QSO_RECORD::callsign_set
bool callsign_set
QSO specifies a call worked.
Definition: tqsllib.h:141
TQSL_QSO_RECORD::band_set
bool band_set
QSO specifies a band or frequency.
Definition: tqsllib.h:143
TQSL_QSO_RECORD::my_dxcc
int my_dxcc
QSO specifies MY_DXCC.
Definition: tqsllib.h:154
TQSL_QSO_RECORD::time
tQSL_Time time
QSO time.
Definition: tqsllib.h:135
tQSL_Date
Definition: tqsllib.h:86
tQSL_Date::month
int month
Numeric month.
Definition: tqsllib.h:88
tQSL_Date::year
int year
Numeric year.
Definition: tqsllib.h:87
tQSL_Date::day
int day
Numeric day.
Definition: tqsllib.h:89
tQSL_Time
Definition: tqsllib.h:93
tQSL_Time::second
int second
Time seconds field.
Definition: tqsllib.h:96
tQSL_Time::hour
int hour
Time hour field.
Definition: tqsllib.h:94
tQSL_Time::minute
int minute
Time minute field.
Definition: tqsllib.h:95
tqsl_cert_req_st
Definition: tqsllib.h:108
tqsl_cert_req_st::password
char password[TQSL_PASSWORD_MAX+1]
Password.
Definition: tqsllib.h:123
tqsl_cert_req_st::renew
char renew
Rewewal reference.
Definition: tqsllib.h:125
tqsl_cert_req_st::address2
char address2[TQSL_CRQ_ADDR_MAX+1]
Address 2.
Definition: tqsllib.h:114
tqsl_cert_req_st::qsoNotAfter
tQSL_Date qsoNotAfter
QSOs not after date.
Definition: tqsllib.h:122
tqsl_cert_req_st::signer
tQSL_Cert signer
Signing cert.
Definition: tqsllib.h:124
tqsl_cert_req_st::callSign
char callSign[TQSL_CALLSIGN_MAX+1]
Callsign.
Definition: tqsllib.h:111
tqsl_cert_req_st::state
char state[TQSL_CRQ_STATE_MAX+1]
State.
Definition: tqsllib.h:116
tqsl_cert_req_st::postalCode
char postalCode[TQSL_CRQ_POSTAL_MAX+1]
Postal Code.
Definition: tqsllib.h:117
tqsl_cert_req_st::providerUnit
char providerUnit[TQSL_NAME_ELEMENT_MAX+1]
Provider unit.
Definition: tqsllib.h:110
tqsl_cert_req_st::qsoNotBefore
tQSL_Date qsoNotBefore
QSOs not before date.
Definition: tqsllib.h:121
tqsl_cert_req_st::name
char name[TQSL_CRQ_NAME_MAX+1]
Name.
Definition: tqsllib.h:112
tqsl_cert_req_st::address1
char address1[TQSL_CRQ_ADDR_MAX+1]
Address 1.
Definition: tqsllib.h:113
tqsl_cert_req_st::dxccEntity
int dxccEntity
DXCC Entity code.
Definition: tqsllib.h:120
tqsl_cert_req_st::city
char city[TQSL_CRQ_CITY_MAX+1]
City.
Definition: tqsllib.h:115
tqsl_cert_req_st::country
char country[TQSL_CRQ_COUNTRY_MAX+1]
Country.
Definition: tqsllib.h:118
tqsl_cert_req_st::emailAddress
char emailAddress[TQSL_CRQ_EMAIL_MAX+1]
e-mail
Definition: tqsllib.h:119
tqsl_cert_req_st::providerName
char providerName[TQSL_NAME_ELEMENT_MAX+1]
< Cert request data
Definition: tqsllib.h:109
tqsl_provider_st
Definition: tqsllib.h:100
tqsl_provider_st::emailAddress
char emailAddress[TQSL_NAME_ELEMENT_MAX+1]
Provider e-mail.
Definition: tqsllib.h:103
tqsl_provider_st::url
char url[TQSL_NAME_ELEMENT_MAX+1]
Provider URL.
Definition: tqsllib.h:104
tqsl_provider_st::organizationName
char organizationName[TQSL_NAME_ELEMENT_MAX+1]
Provider name.
Definition: tqsllib.h:101
tqsl_provider_st::organizationalUnitName
char organizationalUnitName[TQSL_NAME_ELEMENT_MAX+1]
Provider unit.
Definition: tqsllib.h:102
CALLCONVENTION
#define CALLCONVENTION
Symbol exports - Windows only.
Definition: tqsllib.h:27
tQSL_Location
void * tQSL_Location
Opaque location type.
Definition: tqsllib.h:82
TQSL_ZONE_MAX
#define TQSL_ZONE_MAX
Max length of a zone number.
Definition: tqsllib.h:63
TQSL_MODE_MAX
#define TQSL_MODE_MAX
Max length of a mode name.
Definition: tqsllib.h:55
TQSL_GRID_MAX
#define TQSL_GRID_MAX
Max length of a grid set.
Definition: tqsllib.h:60
TQSL_CRQ_POSTAL_MAX
#define TQSL_CRQ_POSTAL_MAX
Max length of request zip.
Definition: tqsllib.h:51
tqsl_openDiagFile
DLLEXPORT int CALLCONVENTION tqsl_openDiagFile(const char *file)
TQSL_COUNTRY_MAX
#define TQSL_COUNTRY_MAX
Max length of a country name.
Definition: tqsllib.h:62
tqslTrace
DLLEXPORT void CALLCONVENTION tqslTrace(const char *name, const char *format,...)
TQSL_CRQ_STATE_MAX
#define TQSL_CRQ_STATE_MAX
Max length of request state.
Definition: tqsllib.h:50
TQSL_CRQ_COUNTRY_MAX
#define TQSL_CRQ_COUNTRY_MAX
Max length of req entity.
Definition: tqsllib.h:52
tqsl_closeDiagFile
DLLEXPORT void CALLCONVENTION tqsl_closeDiagFile(void)
TQSL_IOTA_MAX
#define TQSL_IOTA_MAX
Max length of a IOTA identifier.
Definition: tqsllib.h:64
TQSL_MAX_PATH_LEN
#define TQSL_MAX_PATH_LEN
Max length of a FS path.
Definition: tqsllib.h:43
DLLEXPORTDATA
#define DLLEXPORTDATA
Symbol exports - Windows only.
Definition: tqsllib.h:26
TQSL_PASSWORD_MAX
#define TQSL_PASSWORD_MAX
Max password length.
Definition: tqsllib.h:44
tQSL_BaseDir
DLLEXPORTDATA const char * tQSL_BaseDir
Base directory for tQSL library working files.
DLLEXPORT
#define DLLEXPORT
Symbol exports - Windows only.
Definition: tqsllib.h:25
tqsl_diagFileOpen
DLLEXPORT int CALLCONVENTION tqsl_diagFileOpen(void)
TQSL_PROVIDER
struct tqsl_provider_st TQSL_PROVIDER
TQSL_PROPMODE_MAX
#define TQSL_PROPMODE_MAX
Max length of a prop mode.
Definition: tqsllib.h:58
tQSL_StationDataEnc
char * tQSL_StationDataEnc
Opaque station data type.
Definition: tqsllib.h:83
TQSL_NAME_ELEMENT_MAX
#define TQSL_NAME_ELEMENT_MAX
Max Org name length.
Definition: tqsllib.h:45
tQSL_Cert
void * tQSL_Cert
Opaque certificate type.
Definition: tqsllib.h:81
TQSL_STATE_MAX
#define TQSL_STATE_MAX
Max length of a state name.
Definition: tqsllib.h:59
TQSL_CALLSIGN_MAX
#define TQSL_CALLSIGN_MAX
Max callsign length.
Definition: tqsllib.h:46
TQSL_CNTY_MAX
#define TQSL_CNTY_MAX
Max length of a county name.
Definition: tqsllib.h:61
TQSL_CRQ_EMAIL_MAX
#define TQSL_CRQ_EMAIL_MAX
Max length of req email.
Definition: tqsllib.h:53
TQSL_SATNAME_MAX
#define TQSL_SATNAME_MAX
Max length of a sat name.
Definition: tqsllib.h:57
tQSL_RsrcDir
DLLEXPORTDATA const char * tQSL_RsrcDir
Directory for resources bundled with tqsl executable.
TQSL_CERT_REQ
struct tqsl_cert_req_st TQSL_CERT_REQ
TQSL_BAND_MAX
#define TQSL_BAND_MAX
Max length of a band name.
Definition: tqsllib.h:54
TQSL_FREQ_MAX
#define TQSL_FREQ_MAX
Max length of a frequency.
Definition: tqsllib.h:56
TQSL_CRQ_NAME_MAX
#define TQSL_CRQ_NAME_MAX
Max length of request name.
Definition: tqsllib.h:47
TQSL_CRQ_CITY_MAX
#define TQSL_CRQ_CITY_MAX
Max length of request city.
Definition: tqsllib.h:49
TQSL_CRQ_ADDR_MAX
#define TQSL_CRQ_ADDR_MAX
Max length of request addr.
Definition: tqsllib.h:48