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 #endif
29
30 #include "adif.h"
31 #include "cabrillo.h"
32
37 /* Sizes */
38 #define TQSL_MAX_PATH_LEN 256
39 #define TQSL_PASSWORD_MAX 80
40 #define TQSL_NAME_ELEMENT_MAX 256
41 #define TQSL_CALLSIGN_MAX 13
42 #define TQSL_CRQ_NAME_MAX 60
43 #define TQSL_CRQ_ADDR_MAX 80
44 #define TQSL_CRQ_CITY_MAX 80
45 #define TQSL_CRQ_STATE_MAX 80
46 #define TQSL_CRQ_POSTAL_MAX 20
47 #define TQSL_CRQ_COUNTRY_MAX 80
48 #define TQSL_CRQ_EMAIL_MAX 180
49 #define TQSL_BAND_MAX 6
50 #define TQSL_MODE_MAX 16
51 #define TQSL_FREQ_MAX 20
52 #define TQSL_SATNAME_MAX 20
53 #define TQSL_PROPMODE_MAX 20
54 #define TQSL_STATE_MAX 30
55 #define TQSL_GRID_MAX 30
56 #define TQSL_CNTY_MAX 30
57 #define TQSL_COUNTRY_MAX 60
58 #define TQSL_ZONE_MAX 5
59 #define TQSL_IOTA_MAX 10
60
61 #define TQSL_CERT_CB_USER 0
62 #define TQSL_CERT_CB_CA 1
63 #define TQSL_CERT_CB_ROOT 2
64 #define TQSL_CERT_CB_PKEY 3
65 #define TQSL_CERT_CB_CONFIG 4
66 #define TQSL_CERT_CB_CERT_TYPE(x) ((x) & 0xf)
67 #define TQSL_CERT_CB_MILESTONE 0
68 #define TQSL_CERT_CB_RESULT 0x10
69 #define TQSL_CERT_CB_CALL_TYPE(x) ((x) & TQSL_CERT_CB_RESULT)
70 #define TQSL_CERT_CB_PROMPT 0
71 #define TQSL_CERT_CB_DUPLICATE 0x100
72 #define TQSL_CERT_CB_ERROR 0x200
73 #define TQSL_CERT_CB_LOADED 0x300
74 #define TQSL_CERT_CB_RESULT_TYPE(x) ((x) & 0x0f00)
75
76 typedef void * tQSL_Cert;
77 typedef void * tQSL_Location;
78 typedef char * tQSL_StationDataEnc;
79
81 typedef struct {
82 int year;
83 int month;
84 int day;
85 } tQSL_Date;
86
88 typedef struct {
89 int hour;
90 int minute;
91 int second;
92 } tQSL_Time;
93
95 typedef struct tqsl_provider_st {
96 char organizationName[TQSL_NAME_ELEMENT_MAX+1];
97 char organizationalUnitName[TQSL_NAME_ELEMENT_MAX+1];
98 char emailAddress[TQSL_NAME_ELEMENT_MAX+1];
99 char url[TQSL_NAME_ELEMENT_MAX+1];
100 } TQSL_PROVIDER;
101
103 typedef struct tqsl_cert_req_st {
104 char providerName[TQSL_NAME_ELEMENT_MAX+1];
105 char providerUnit[TQSL_NAME_ELEMENT_MAX+1];
106 char callSign[TQSL_CALLSIGN_MAX+1];
107 char name[TQSL_CRQ_NAME_MAX+1];
108 char address1[TQSL_CRQ_ADDR_MAX+1];
109 char address2[TQSL_CRQ_ADDR_MAX+1];
110 char city[TQSL_CRQ_CITY_MAX+1];
111 char state[TQSL_CRQ_STATE_MAX+1];
112 char postalCode[TQSL_CRQ_POSTAL_MAX+1];
113 char country[TQSL_CRQ_COUNTRY_MAX+1];
114 char emailAddress[TQSL_CRQ_EMAIL_MAX+1];
115 int dxccEntity;
116 tQSL_Date qsoNotBefore;
117 tQSL_Date qsoNotAfter;
118 char password[TQSL_PASSWORD_MAX+1];
119 tQSL_Cert signer;
120 char renew;
121 } TQSL_CERT_REQ;
122
124 typedef struct {
125 char callsign[TQSL_CALLSIGN_MAX+1];
126 char band[TQSL_BAND_MAX+1];
127 char mode[TQSL_MODE_MAX+1];
128 char submode[TQSL_MODE_MAX+1];
129 tQSL_Date date;
130 tQSL_Time time;
131 char freq[TQSL_FREQ_MAX+1];
132 char rxfreq[TQSL_FREQ_MAX+1];
133 char rxband[TQSL_BAND_MAX+1];
134 char propmode[TQSL_PROPMODE_MAX+1];
135 char satname[TQSL_SATNAME_MAX+1];
136 bool callsign_set;
137 bool mode_set;
138 bool band_set;
139 bool date_set;
140 bool time_set;
141 char my_state[TQSL_STATE_MAX+1];
142 char my_gridsquare[TQSL_GRID_MAX+1];
143 char my_vucc_grids[TQSL_GRID_MAX+1];
144 char my_county[TQSL_CNTY_MAX+1];
145 char my_country[TQSL_COUNTRY_MAX+1];
146 char my_cq_zone[TQSL_ZONE_MAX+1];
147 char my_itu_zone[TQSL_ZONE_MAX+1];
148 int my_dxcc;
149 char my_call[TQSL_CALLSIGN_MAX+1];
150 char my_owner[TQSL_CALLSIGN_MAX+1];
151 char my_operator[TQSL_CALLSIGN_MAX+1];
152 char my_iota[TQSL_IOTA_MAX+1];
153 } TQSL_QSO_RECORD;
154
156 DLLEXPORTDATA extern const char *tQSL_BaseDir;
158 DLLEXPORTDATA extern const char *tQSL_RsrcDir;
159
160 #ifdef __cplusplus
161 extern "C" {
162 #endif
163
168
171 DLLEXPORTDATA extern int tQSL_Error;
173 DLLEXPORTDATA extern TQSL_ADIF_GET_FIELD_ERROR tQSL_ADIF_Error;
175 DLLEXPORTDATA extern TQSL_CABRILLO_ERROR_TYPE tQSL_Cabrillo_Error;
177 DLLEXPORTDATA extern char tQSL_ErrorFile[256];
179 DLLEXPORTDATA extern char tQSL_CustomError[256];
181 DLLEXPORTDATA extern int tQSL_Errno;
183 DLLEXPORTDATA extern char tQSL_ImportCall[256];
185 DLLEXPORTDATA extern long tQSL_ImportSerial;
187 DLLEXPORTDATA extern FILE* tQSL_DiagFile;
188
193 DLLEXPORT int CALLCONVENTION tqsl_init();
194
204 DLLEXPORT int CALLCONVENTION tqsl_setDirectory(const char *dir);
205
209 DLLEXPORT const char* CALLCONVENTION tqsl_getErrorString();
210
215 DLLEXPORT const char* CALLCONVENTION tqsl_getErrorString_v(int err);
216
224 DLLEXPORT int CALLCONVENTION tqsl_encodeBase64(const unsigned char *data, int datalen, char *output, int outputlen);
225
234 DLLEXPORT int CALLCONVENTION tqsl_decodeBase64(const char *input, unsigned char *data, int *datalen);
235
242 DLLEXPORT int CALLCONVENTION tqsl_initDate(tQSL_Date *date, const char *str);
243
250 DLLEXPORT int CALLCONVENTION tqsl_initTime(tQSL_Time *time, const char *str);
251
261 DLLEXPORT int CALLCONVENTION tqsl_compareDates(const tQSL_Date *a, const tQSL_Date *b);
262
268 DLLEXPORT int CALLCONVENTION tqsl_subtractDates(const tQSL_Date *a, const tQSL_Date *b, int *diff);
269
274 DLLEXPORT char* CALLCONVENTION tqsl_convertDateToText(const tQSL_Date *date, char *buf, int bufsiz);
275
280 DLLEXPORT int CALLCONVENTION tqsl_isDateValid(const tQSL_Date *d);
281
286 DLLEXPORT int CALLCONVENTION tqsl_isDateNull(const tQSL_Date *d);
287
292 DLLEXPORT int CALLCONVENTION tqsl_isTimeValid(const tQSL_Time *t);
293
298 DLLEXPORT char* CALLCONVENTION tqsl_convertTimeToText(const tQSL_Time *time, char *buf, int bufsiz);
299
302 DLLEXPORT int CALLCONVENTION tqsl_getVersion(int *major, int *minor);
303
306 DLLEXPORT int CALLCONVENTION tqsl_getConfigVersion(int *major, int *minor);
307
336 #define TQSL_SELECT_CERT_WITHKEYS 1
337 #define TQSL_SELECT_CERT_EXPIRED 2
338 #define TQSL_SELECT_CERT_SUPERCEDED 4
339
340
367 DLLEXPORT int CALLCONVENTION tqsl_selectCertificates(tQSL_Cert **certlist, int *ncerts,
368 const char *callsign, int dxcc, const tQSL_Date *date, const TQSL_PROVIDER *issuer, int flag);
369
381 DLLEXPORT int CALLCONVENTION tqsl_selectCACertificates(tQSL_Cert **certlist, int *ncerts, const char *type);
382
391 DLLEXPORT int CALLCONVENTION tqsl_getSelectedCertificate(tQSL_Cert *cert, const tQSL_Cert **certlist,
392 int idx);
393
396 DLLEXPORT int CALLCONVENTION tqsl_isCertificateExpired(tQSL_Cert cert, int *status);
397
400 DLLEXPORT int CALLCONVENTION tqsl_isCertificateSuperceded(tQSL_Cert cert, int *status);
401
404 DLLEXPORT int CALLCONVENTION tqsl_getCertificateKeyOnly(tQSL_Cert cert, int *keyonly);
405
408 DLLEXPORT int CALLCONVENTION tqsl_getCertificateEncoded(tQSL_Cert cert, char *buf, int bufsiz);
409
412 DLLEXPORT int CALLCONVENTION tqsl_getKeyEncoded(tQSL_Cert cert, char *buf, int bufsiz);
413
416 DLLEXPORT int CALLCONVENTION tqsl_importKeyPairEncoded(const char *callsign, const char *type, const char *keybuf, const char *certbuf);
417
420 DLLEXPORT int CALLCONVENTION tqsl_getCertificateSerial(tQSL_Cert cert, long *serial);
421
425 DLLEXPORT int CALLCONVENTION tqsl_getCertificateSerialExt(tQSL_Cert cert, char *serial, int serialsiz);
426
430 DLLEXPORT int CALLCONVENTION tqsl_getCertificateSerialLength(tQSL_Cert cert);
431
441 DLLEXPORT int CALLCONVENTION tqsl_getCertificateIssuer(tQSL_Cert cert, char *buf, int bufsiz);
442
452 DLLEXPORT int CALLCONVENTION tqsl_getCertificateIssuerOrganization(tQSL_Cert cert, char *buf, int bufsiz);
462 DLLEXPORT int CALLCONVENTION tqsl_getCertificateIssuerOrganizationalUnit(tQSL_Cert cert, char *buf, int bufsiz);
472 DLLEXPORT int CALLCONVENTION tqsl_getCertificateCallSign(tQSL_Cert cert, char *buf, int bufsiz);
482 DLLEXPORT int CALLCONVENTION tqsl_getCertificateAROName(tQSL_Cert cert, char *buf, int bufsiz);
483
493 DLLEXPORT int CALLCONVENTION tqsl_getCertificateEmailAddress(tQSL_Cert cert, char *buf, int bufsiz);
494
503 DLLEXPORT int CALLCONVENTION tqsl_getCertificateQSONotBeforeDate(tQSL_Cert cert, tQSL_Date *date);
504
513 DLLEXPORT int CALLCONVENTION tqsl_getCertificateQSONotAfterDate(tQSL_Cert cert, tQSL_Date *date);
514
523 DLLEXPORT int CALLCONVENTION tqsl_getCertificateNotBeforeDate(tQSL_Cert cert, tQSL_Date *date);
524
533 DLLEXPORT int CALLCONVENTION tqsl_getCertificateNotAfterDate(tQSL_Cert cert, tQSL_Date *date);
534
543 DLLEXPORT int CALLCONVENTION tqsl_getCertificateDXCCEntity(tQSL_Cert cert, int *dxcc);
544
555 DLLEXPORT int CALLCONVENTION tqsl_getCertificateRequestAddress1(tQSL_Cert cert, char *str, int bufsiz);
556
567 DLLEXPORT int CALLCONVENTION tqsl_getCertificateRequestAddress2(tQSL_Cert cert, char *str, int bufsiz);
568
579 DLLEXPORT int CALLCONVENTION tqsl_getCertificateRequestCity(tQSL_Cert cert, char *str, int bufsiz);
580
591 DLLEXPORT int CALLCONVENTION tqsl_getCertificateRequestState(tQSL_Cert cert, char *str, int bufsiz);
592
603 DLLEXPORT int CALLCONVENTION tqsl_getCertificateRequestPostalCode(tQSL_Cert cert, char *str, int bufsiz);
604
615 DLLEXPORT int CALLCONVENTION tqsl_getCertificateRequestCountry(tQSL_Cert cert, char *str, int bufsiz);
616
617 #define TQSL_PK_TYPE_ERR 0
618 #define TQSL_PK_TYPE_NONE 1
619 #define TQSL_PK_TYPE_UNENC 2
620 #define TQSL_PK_TYPE_ENC 3
621
622
636 DLLEXPORT int CALLCONVENTION tqsl_getCertificatePrivateKeyType(tQSL_Cert cert);
637
638
642 DLLEXPORT void CALLCONVENTION tqsl_freeCertificate(tQSL_Cert cert);
643
649 DLLEXPORT void CALLCONVENTION tqsl_freeCertificateList(tQSL_Cert* list, int ncerts);
650
651 #define TQSL_CERT_STATUS_UNK 0
652 #define TQSL_CERT_STATUS_SUP 1
653 #define TQSL_CERT_STATUS_EXP 2
654 #define TQSL_CERT_STATUS_OK 3
655 #define TQSL_CERT_STATUS_INV 4
656
657
671 DLLEXPORT int CALLCONVENTION tqsl_getCertificateStatus(long serial);
672
677 DLLEXPORT int CALLCONVENTION tqsl_setCertificateStatus(long serial, const char *status);
678
679 /* int tqsl_checkCertificate(tQSL_Cert); */
680
698 DLLEXPORT int CALLCONVENTION tqsl_importTQSLFile(const char *file, int(*cb)(int type, const char *message, void *userdata), void *user);
699
708 DLLEXPORT int CALLCONVENTION tqsl_getSerialFromTQSLFile(const char *file, long *serial);
709
712 DLLEXPORT int CALLCONVENTION tqsl_getNumProviders(int *n);
713
718 DLLEXPORT int CALLCONVENTION tqsl_getProvider(int idx, TQSL_PROVIDER *provider);
719
732 DLLEXPORT int CALLCONVENTION tqsl_createCertRequest(const char *filename, TQSL_CERT_REQ *req,
733 int(*pwcb)(char *pwbuf, int pwsize, void *userdata), void *user);
734
742 DLLEXPORT int CALLCONVENTION tqsl_exportPKCS12File(tQSL_Cert cert, const char *filename, const char *p12password);
743
752 DLLEXPORT int CALLCONVENTION tqsl_exportPKCS12Base64(tQSL_Cert cert, char *base64, int b64len, const char *p12password);
753
756 DLLEXPORT int CALLCONVENTION tqsl_importPKCS12File(const char *filename, const char *p12password, const char *password,
757 int (*pwcb)(char *buf, int bufsiz, void *userdata), int(*cb)(int type , const char *message, void *userdata), void *user);
758
761 DLLEXPORT int CALLCONVENTION tqsl_importPKCS12Base64(const char *base64, const char *p12password, const char *password,
762 int (*pwcb)(char *buf, int bufsiz, void *userdata), int(*cb)(int type , const char *message, void *userdata), void *user);
763
765 DLLEXPORT int CALLCONVENTION tqsl_getDeletedCallsignCertificates(char ***calls, int *ncall, const char *filter);
766
768 DLLEXPORT void CALLCONVENTION tqsl_freeDeletedCertificateList(char **list, int nloc);
769
771 DLLEXPORT int CALLCONVENTION tqsl_restoreCallsignCertificate(const char *callsign);
772
775 DLLEXPORT int CALLCONVENTION tqsl_deleteCertificate(tQSL_Cert cert);
776
799 DLLEXPORT int CALLCONVENTION tqsl_beginSigning(tQSL_Cert cert, char *password, int(*pwcb)(char *pwbuf, int pwsize, void *userdata), void *user);
800
805 DLLEXPORT int CALLCONVENTION tqsl_checkSigningStatus(tQSL_Cert cert);
806
811 DLLEXPORT int CALLCONVENTION tqsl_getMaxSignatureSize(tQSL_Cert cert, int *sigsize);
812
818 DLLEXPORT int CALLCONVENTION tqsl_signDataBlock(tQSL_Cert cert, const unsigned char *data, int datalen, unsigned char *sig, int *siglen);
819
824 DLLEXPORT int CALLCONVENTION tqsl_verifyDataBlock(tQSL_Cert cert, const unsigned char *data, int datalen, unsigned char *sig, int siglen);
825
833 DLLEXPORT int CALLCONVENTION tqsl_signQSORecord(tQSL_Cert cert, tQSL_Location loc, TQSL_QSO_RECORD *rec, unsigned char *sig, int *siglen);
834
839 DLLEXPORT int CALLCONVENTION tqsl_endSigning(tQSL_Cert cert);
840
945 /* Location field input types */
946
947 #define TQSL_LOCATION_FIELD_TEXT 1
948 #define TQSL_LOCATION_FIELD_DDLIST 2
949 #define TQSL_LOCATION_FIELD_LIST 3
950 #define TQSL_LOCATION_FIELD_BADZONE 4
951
952 /* Location field data types */
953 #define TQSL_LOCATION_FIELD_CHAR 1
954 #define TQSL_LOCATION_FIELD_INT 2
955
956
957 DLLEXPORT int CALLCONVENTION tqsl_initStationLocationCapture(tQSL_Location *locp);
958
963 DLLEXPORT int CALLCONVENTION tqsl_endStationLocationCapture(tQSL_Location *locp);
964
966 DLLEXPORT int CALLCONVENTION tqsl_updateStationLocationCapture(tQSL_Location loc);
967
970 DLLEXPORT int CALLCONVENTION tqsl_getNumStationLocationCapturePages(tQSL_Location loc, int *npages);
971
973 DLLEXPORT int CALLCONVENTION tqsl_getStationLocationCapturePage(tQSL_Location loc, int *page);
974
979 DLLEXPORT int CALLCONVENTION tqsl_setStationLocationCapturePage(tQSL_Location loc, int page);
980
984 DLLEXPORT int CALLCONVENTION tqsl_setStationLocationCertFlags(tQSL_Location loc, int flags);
985
987 DLLEXPORT int CALLCONVENTION tqsl_nextStationLocationCapture(tQSL_Location loc);
988
990 DLLEXPORT int CALLCONVENTION tqsl_prevStationLocationCapture(tQSL_Location loc);
991
993 DLLEXPORT int CALLCONVENTION tqsl_hasNextStationLocationCapture(tQSL_Location loc, int *rval);
994
996 DLLEXPORT int CALLCONVENTION tqsl_hasPrevStationLocationCapture(tQSL_Location loc, int *rval);
997
1004 DLLEXPORT int CALLCONVENTION tqsl_saveStationLocationCapture(tQSL_Location loc, int overwrite);
1005
1007 DLLEXPORT int CALLCONVENTION tqsl_getStationLocationCaptureName(tQSL_Location loc, char *namebuf, int bufsiz);
1008
1010 DLLEXPORT int CALLCONVENTION tqsl_setStationLocationCaptureName(tQSL_Location loc, const char *name);
1011
1013 DLLEXPORT int CALLCONVENTION tqsl_getNumStationLocations(tQSL_Location loc, int *nloc);
1014
1016 DLLEXPORT int CALLCONVENTION tqsl_getStationLocationName(tQSL_Location loc, int idx, char *buf, int bufsiz);
1017
1019 DLLEXPORT int CALLCONVENTION tqsl_getStationLocationCallSign(tQSL_Location loc, int idx, char *buf, int bufsiz);
1020
1022 DLLEXPORT int CALLCONVENTION tqsl_getStationLocationField(tQSL_Location locp, const char *name, char *namebuf, int bufsize);
1023
1028 DLLEXPORT int CALLCONVENTION tqsl_getStationLocation(tQSL_Location *loc, const char *name);
1029
1036 DLLEXPORT int CALLCONVENTION tqsl_getStationLocationErrors(tQSL_Location loc, char *buf, int bufsiz);
1037
1041 DLLEXPORT int CALLCONVENTION tqsl_getStationDataEnc(tQSL_StationDataEnc *sdata);
1042
1045 DLLEXPORT int CALLCONVENTION tqsl_freeStationDataEnc(tQSL_StationDataEnc sdata);
1046
1048 DLLEXPORT int CALLCONVENTION tqsl_mergeStationLocations(const char *locdata);
1049
1051 DLLEXPORT int CALLCONVENTION tqsl_deleteStationLocation(const char *name);
1052
1054 DLLEXPORT int CALLCONVENTION tqsl_restoreStationLocation(const char *name);
1055
1057 DLLEXPORT int CALLCONVENTION tqsl_getDeletedStationLocations(char ***locp, int *nloc);
1058
1060 DLLEXPORT void CALLCONVENTION tqsl_freeDeletedLocationList(char **list, int nloc);
1061
1063 DLLEXPORT int CALLCONVENTION tqsl_getNumLocationField(tQSL_Location loc, int *numf);
1064
1066 DLLEXPORT int CALLCONVENTION tqsl_getLocationFieldDataLabelSize(tQSL_Location loc, int field_num, int *rval);
1067
1069 DLLEXPORT int CALLCONVENTION tqsl_getLocationFieldDataLabel(tQSL_Location loc, int field_num, char *buf, int bufsiz);
1070
1072 DLLEXPORT int CALLCONVENTION tqsl_getLocationFieldDataGABBISize(tQSL_Location loc, int field_num, int *rval);
1073
1075 DLLEXPORT int CALLCONVENTION tqsl_getLocationFieldDataGABBI(tQSL_Location loc, int field_num, char *buf, int bufsiz);
1076
1083 DLLEXPORT int CALLCONVENTION tqsl_getNumLocationField(tQSL_Location loc, int *numf);
1084
1086 DLLEXPORT int CALLCONVENTION tqsl_getLocationFieldDataLabelSize(tQSL_Location loc, int field_num, int *rval);
1087
1089 DLLEXPORT int CALLCONVENTION tqsl_getLocationFieldDataLabel(tQSL_Location loc, int field_num, char *buf, int bufsiz);
1090
1092 DLLEXPORT int CALLCONVENTION tqsl_getLocationFieldDataGABBISize(tQSL_Location loc, int field_num, int *rval);
1093
1095 DLLEXPORT int CALLCONVENTION tqsl_getLocationFieldDataGABBI(tQSL_Location loc, int field_num, char *buf, int bufsiz);
1096
1102 DLLEXPORT int CALLCONVENTION tqsl_getLocationFieldInputType(tQSL_Location loc, int field_num, int *type);
1103
1108 DLLEXPORT int CALLCONVENTION tqsl_getLocationFieldDataType(tQSL_Location loc, int field_num, int *type);
1109
1118 DLLEXPORT int CALLCONVENTION tqsl_getLocationFieldFlags(tQSL_Location loc, int field_num, int *flags);
1119
1121 DLLEXPORT int CALLCONVENTION tqsl_getLocationFieldDataLength(tQSL_Location loc, int field_num, int *rval);
1122
1129 DLLEXPORT int CALLCONVENTION tqsl_getLocationFieldCharData(tQSL_Location loc, int field_num, char *buf, int bufsiz);
1130
1136 DLLEXPORT int CALLCONVENTION tqsl_getLocationFieldIntData(tQSL_Location loc, int field_num, int *dat);
1137
1142 DLLEXPORT int CALLCONVENTION tqsl_getLocationFieldIndex(tQSL_Location loc, int field_num, int *dat);
1143
1145 DLLEXPORT int CALLCONVENTION tqsl_getNumLocationFieldListItems(tQSL_Location loc, int field_num, int *rval);
1146
1148 DLLEXPORT int CALLCONVENTION tqsl_getLocationFieldListItem(tQSL_Location loc, int field_num, int item_idx, char *buf, int bufsiz);
1149
1151 DLLEXPORT int CALLCONVENTION tqsl_setLocationFieldCharData(tQSL_Location loc, int field_num, const char *buf);
1152
1155 DLLEXPORT int CALLCONVENTION tqsl_setLocationFieldIntData(tQSL_Location loc, int field_num, int dat);
1156
1161 DLLEXPORT int CALLCONVENTION tqsl_setLocationFieldIndex(tQSL_Location loc, int field_num, int dat);
1162
1167 DLLEXPORT int CALLCONVENTION tqsl_getLocationFieldChanged(tQSL_Location loc, int field_num, int *changed);
1168
1170 DLLEXPORT int CALLCONVENTION tqsl_getLocationCallSign(tQSL_Location loc, char *buf, int bufsiz);
1171
1173 DLLEXPORT int CALLCONVENTION tqsl_setLocationCallSign(tQSL_Location loc, const char *buf);
1174
1176 DLLEXPORT int CALLCONVENTION tqsl_getLocationField(tQSL_Location locp, const char *field, char *buf, int bufsiz);
1177
1179 DLLEXPORT int CALLCONVENTION tqsl_setLocationField(tQSL_Location locp, const char *field, const char *buf);
1180
1182 DLLEXPORT int CALLCONVENTION tqsl_getLocationDXCCEntity(tQSL_Location loc, int *dxcc);
1183
1185 DLLEXPORT int CALLCONVENTION tqsl_getLocationQSODetails(tQSL_Location locp, char *buf, int buflen);
1186
1188 DLLEXPORT int CALLCONVENTION tqsl_getLocationStationDetails(tQSL_Location locp, char *buf, int buflen);
1189
1191 DLLEXPORT int CALLCONVENTION tqsl_saveCallsignLocationInfo(const char *callsign, const char *json);
1192
1194 DLLEXPORT int CALLCONVENTION tqsl_getCallsignLocationInfo(const char *callsign, char **buf);
1195
1198 DLLEXPORT int CALLCONVENTION tqsl_getNumDXCCEntity(int *number);
1199
1202 DLLEXPORT int CALLCONVENTION tqsl_getDXCCEntity(int index, int *number, const char **name);
1203
1206 DLLEXPORT int CALLCONVENTION tqsl_getDXCCEntityName(int number, const char **name);
1207
1210 DLLEXPORT int CALLCONVENTION tqsl_getDXCCZoneMap(int number, const char **zonemap);
1211
1214 DLLEXPORT int CALLCONVENTION tqsl_getDXCCStartDate(int number, tQSL_Date *d);
1215
1218 DLLEXPORT int CALLCONVENTION tqsl_getDXCCEndDate(int number, tQSL_Date *d);
1219
1222 DLLEXPORT int CALLCONVENTION tqsl_getDXCCDeleted(int number, int *deleted);
1223
1225 DLLEXPORT int CALLCONVENTION tqsl_getNumBand(int *number);
1226
1236 DLLEXPORT int CALLCONVENTION tqsl_getBand(int index, const char **name, const char **spectrum, int *low, int *high);
1237
1239 DLLEXPORT int CALLCONVENTION tqsl_getNumMode(int *number);
1240
1248 DLLEXPORT int CALLCONVENTION tqsl_getMode(int index, const char **mode, const char **group);
1249
1251 DLLEXPORT int CALLCONVENTION tqsl_getNumPropagationMode(int *number);
1252
1260 DLLEXPORT int CALLCONVENTION tqsl_getPropagationMode(int index, const char **name, const char **descrip);
1261
1263 DLLEXPORT int CALLCONVENTION tqsl_getNumSatellite(int *number);
1264
1274 DLLEXPORT int CALLCONVENTION tqsl_getSatellite(int index, const char **name, const char **descrip,
1275 tQSL_Date *start, tQSL_Date *end);
1276
1279 DLLEXPORT int CALLCONVENTION tqsl_clearCabrilloMap();
1280
1291 DLLEXPORT int CALLCONVENTION tqsl_setCabrilloMapEntry(const char *contest, int field, int contest_type);
1292
1304 DLLEXPORT int CALLCONVENTION tqsl_getCabrilloMapEntry(const char *contest, int *fieldnum, int *contest_type);
1305
1308 DLLEXPORT int CALLCONVENTION tqsl_clearADIFModes();
1309
1312 DLLEXPORT int CALLCONVENTION tqsl_setADIFMode(const char *adif_item, const char *mode);
1313
1316 DLLEXPORT int CALLCONVENTION tqsl_getADIFMode(const char *adif_item, char *mode, int nmode);
1317
1320 DLLEXPORT int CALLCONVENTION tqsl_getADIFSubMode(const char *adif_item, char *mode, char *submode, int nmode);
1321
1331 DLLEXPORT const char* CALLCONVENTION tqsl_getGABBItCERT(tQSL_Cert cert, int uid);
1332
1343 DLLEXPORT const char* CALLCONVENTION tqsl_getGABBItSTATION(tQSL_Location loc, int uid, int certuid);
1344
1357 DLLEXPORT const char* CALLCONVENTION tqsl_getGABBItCONTACT(tQSL_Cert cert, tQSL_Location loc, TQSL_QSO_RECORD *qso,
1358 int stationuid);
1359
1373 DLLEXPORT const char* CALLCONVENTION tqsl_getGABBItCONTACTData(tQSL_Cert cert, tQSL_Location loc, TQSL_QSO_RECORD *qso,
1374 int stationuid, char *signdata, int sdlen);
1375
1382 DLLEXPORT void CALLCONVENTION tqslTrace(const char *name, const char *format, ...);
1385 DLLEXPORT void CALLCONVENTION tqsl_closeDiagFile(void);
1388 DLLEXPORT int CALLCONVENTION tqsl_diagFileOpen(void);
1392 DLLEXPORT int CALLCONVENTION tqsl_openDiagFile(const char* file);
1393
1394 #ifdef _WIN32
1395 DLLEXPORT wchar_t* CALLCONVENTION utf8_to_wchar(const char* str);
1396 DLLEXPORT char* CALLCONVENTION wchar_to_utf8(const wchar_t* str, bool forceUTF8);
1397 DLLEXPORT void CALLCONVENTION free_wchar(wchar_t* ptr);
1398 #endif
1399
1400 #ifdef __cplusplus
1401 }
1402 #endif
1403
1404 /* Useful defines */
1405 #define TQSL_MAX_PW_LENGTH 32
1406
1407 #endif /* TQSLLIB_H */
tqsl_getCertificateQSONotBeforeDate
DLLEXPORT int CALLCONVENTION tqsl_getCertificateQSONotBeforeDate(tQSL_Cert cert, tQSL_Date *date)
tqslTrace
DLLEXPORT void CALLCONVENTION tqslTrace(const char *name, const char *format,...)
tqsl_freeStationDataEnc
DLLEXPORT int CALLCONVENTION tqsl_freeStationDataEnc(tQSL_StationDataEnc sdata)
tqsl_getCertificateStatus
DLLEXPORT int CALLCONVENTION tqsl_getCertificateStatus(long serial)
tqsl_getCertificateIssuerOrganization
DLLEXPORT int CALLCONVENTION tqsl_getCertificateIssuerOrganization(tQSL_Cert cert, char *buf, int bufsiz)
tQSL_Date::month
int month
Numeric month.
Definition: tqsllib.h:83
tqsl_getDXCCEndDate
DLLEXPORT int CALLCONVENTION tqsl_getDXCCEndDate(int number, tQSL_Date *d)
tqsl_getLocationFieldInputType
DLLEXPORT int CALLCONVENTION tqsl_getLocationFieldInputType(tQSL_Location loc, int field_num, int *type)
TQSL_QSO_RECORD
Definition: tqsllib.h:124
tqsl_getLocationQSODetails
DLLEXPORT int CALLCONVENTION tqsl_getLocationQSODetails(tQSL_Location locp, char *buf, int buflen)
tqsl_getCertificateRequestAddress2
DLLEXPORT int CALLCONVENTION tqsl_getCertificateRequestAddress2(tQSL_Cert cert, char *str, int bufsiz)
tqsl_setStationLocationCaptureName
DLLEXPORT int CALLCONVENTION tqsl_setStationLocationCaptureName(tQSL_Location loc, const char *name)
tqsl_getADIFSubMode
DLLEXPORT int CALLCONVENTION tqsl_getADIFSubMode(const char *adif_item, char *mode, char *submode, int nmode)
tqsl_getLocationFieldDataGABBI
DLLEXPORT int CALLCONVENTION tqsl_getLocationFieldDataGABBI(tQSL_Location loc, int field_num, char *buf, int bufsiz)
TQSL_BAND_MAX
#define TQSL_BAND_MAX
Max length of a band name.
Definition: tqsllib.h:49
tqsl_exportPKCS12File
DLLEXPORT int CALLCONVENTION tqsl_exportPKCS12File(tQSL_Cert cert, const char *filename, const char *p12password)
tqsl_getCertificateKeyOnly
DLLEXPORT int CALLCONVENTION tqsl_getCertificateKeyOnly(tQSL_Cert cert, int *keyonly)
tqsl_getCertificateSerial
DLLEXPORT int CALLCONVENTION tqsl_getCertificateSerial(tQSL_Cert cert, long *serial)
tQSL_Time::second
int second
Time seconds field.
Definition: tqsllib.h:91
tqsl_getLocationCallSign
DLLEXPORT int CALLCONVENTION tqsl_getLocationCallSign(tQSL_Location loc, char *buf, int bufsiz)
tqsl_getLocationDXCCEntity
DLLEXPORT int CALLCONVENTION tqsl_getLocationDXCCEntity(tQSL_Location loc, int *dxcc)
TQSL_PASSWORD_MAX
#define TQSL_PASSWORD_MAX
Max password length.
Definition: tqsllib.h:39
tqsl_cert_req_st::state
char state[TQSL_CRQ_STATE_MAX+1]
State.
Definition: tqsllib.h:111
tqsl_diagFileOpen
DLLEXPORT int CALLCONVENTION tqsl_diagFileOpen(void)
tqsl_getLocationFieldListItem
DLLEXPORT int CALLCONVENTION tqsl_getLocationFieldListItem(tQSL_Location loc, int field_num, int item_idx, char *buf, int bufsiz)
tqsl_getCertificateRequestAddress1
DLLEXPORT int CALLCONVENTION tqsl_getCertificateRequestAddress1(tQSL_Cert cert, char *str, int bufsiz)
tQSL_Time::minute
int minute
Time minute field.
Definition: tqsllib.h:90
tqsl_getNumStationLocations
DLLEXPORT int CALLCONVENTION tqsl_getNumStationLocations(tQSL_Location loc, int *nloc)
tqsl_isDateValid
DLLEXPORT int CALLCONVENTION tqsl_isDateValid(const tQSL_Date *d)
tQSL_Location
void * tQSL_Location
Opaque location type.
Definition: tqsllib.h:77
TQSL_CRQ_POSTAL_MAX
#define TQSL_CRQ_POSTAL_MAX
Max length of request zip.
Definition: tqsllib.h:46
tqsl_isCertificateExpired
DLLEXPORT int CALLCONVENTION tqsl_isCertificateExpired(tQSL_Cert cert, int *status)
tQSL_CustomError
DLLEXPORTDATA char tQSL_CustomError[256]
Custom error message string.
tqsl_freeDeletedCertificateList
DLLEXPORT void CALLCONVENTION tqsl_freeDeletedCertificateList(char **list, int nloc)
tqsl_getLocationFieldCharData
DLLEXPORT int CALLCONVENTION tqsl_getLocationFieldCharData(tQSL_Location loc, int field_num, char *buf, int bufsiz)
tqsl_provider_st::url
char url[TQSL_NAME_ELEMENT_MAX+1]
Provider URL.
Definition: tqsllib.h:99
tqsl_endStationLocationCapture
DLLEXPORT int CALLCONVENTION tqsl_endStationLocationCapture(tQSL_Location *locp)
tqsl_provider_st
Definition: tqsllib.h:95
tqsl_getCertificateRequestCity
DLLEXPORT int CALLCONVENTION tqsl_getCertificateRequestCity(tQSL_Cert cert, char *str, int bufsiz)
TQSL_NAME_ELEMENT_MAX
#define TQSL_NAME_ELEMENT_MAX
Max Org name length.
Definition: tqsllib.h:40
tqsl_cert_req_st::postalCode
char postalCode[TQSL_CRQ_POSTAL_MAX+1]
Postal Code.
Definition: tqsllib.h:112
tQSL_Error
DLLEXPORTDATA int tQSL_Error
Error code from most recent tQSL library call.
tqsl_restoreCallsignCertificate
DLLEXPORT int CALLCONVENTION tqsl_restoreCallsignCertificate(const char *callsign)
tqsl_getCertificateAROName
DLLEXPORT int CALLCONVENTION tqsl_getCertificateAROName(tQSL_Cert cert, char *buf, int bufsiz)
tqsl_getNumPropagationMode
DLLEXPORT int CALLCONVENTION tqsl_getNumPropagationMode(int *number)
tqsl_provider_st::emailAddress
char emailAddress[TQSL_NAME_ELEMENT_MAX+1]
Provider e-mail.
Definition: tqsllib.h:98
tqsl_getNumSatellite
DLLEXPORT int CALLCONVENTION tqsl_getNumSatellite(int *number)
tqsl_getCabrilloMapEntry
DLLEXPORT int CALLCONVENTION tqsl_getCabrilloMapEntry(const char *contest, int *fieldnum, int *contest_type)
TQSL_CRQ_CITY_MAX
#define TQSL_CRQ_CITY_MAX
Max length of request city.
Definition: tqsllib.h:44
TQSL_STATE_MAX
#define TQSL_STATE_MAX
Max length of a state name.
Definition: tqsllib.h:54
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_getDXCCStartDate
DLLEXPORT int CALLCONVENTION tqsl_getDXCCStartDate(int number, tQSL_Date *d)
tqsl_getStationDataEnc
DLLEXPORT int CALLCONVENTION tqsl_getStationDataEnc(tQSL_StationDataEnc *sdata)
TQSL_QSO_RECORD::callsign_set
bool callsign_set
QSO specifies a call worked.
Definition: tqsllib.h:136
tqsl_getCertificateRequestPostalCode
DLLEXPORT int CALLCONVENTION tqsl_getCertificateRequestPostalCode(tQSL_Cert cert, char *str, int bufsiz)
tqsl_getLocationField
DLLEXPORT int CALLCONVENTION tqsl_getLocationField(tQSL_Location locp, const char *field, char *buf, int bufsiz)
tQSL_Date::year
int year
Numeric year.
Definition: tqsllib.h:82
tqsl_openDiagFile
DLLEXPORT int CALLCONVENTION tqsl_openDiagFile(const char *file)
tQSL_DiagFile
DLLEXPORTDATA FILE * tQSL_DiagFile
Diagnostic log file.
tqsl_getSelectedCertificate
DLLEXPORT int CALLCONVENTION tqsl_getSelectedCertificate(tQSL_Cert *cert, const tQSL_Cert **certlist, int idx)
tqsl_getStationLocationCaptureName
DLLEXPORT int CALLCONVENTION tqsl_getStationLocationCaptureName(tQSL_Location loc, char *namebuf, int bufsiz)
tqsl_initStationLocationCapture
DLLEXPORT int CALLCONVENTION tqsl_initStationLocationCapture(tQSL_Location *locp)
tqsl_getDXCCDeleted
DLLEXPORT int CALLCONVENTION tqsl_getDXCCDeleted(int number, int *deleted)
tqsl_updateStationLocationCapture
DLLEXPORT int CALLCONVENTION tqsl_updateStationLocationCapture(tQSL_Location loc)
tQSL_ErrorFile
DLLEXPORTDATA char tQSL_ErrorFile[256]
File name of file giving error. (May be empty.)
tqsl_getKeyEncoded
DLLEXPORT int CALLCONVENTION tqsl_getKeyEncoded(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_getCallsignLocationInfo
DLLEXPORT int CALLCONVENTION tqsl_getCallsignLocationInfo(const char *callsign, char **buf)
TQSL_CNTY_MAX
#define TQSL_CNTY_MAX
Max length of a county name.
Definition: tqsllib.h:56
TQSL_CRQ_STATE_MAX
#define TQSL_CRQ_STATE_MAX
Max length of request state.
Definition: tqsllib.h:45
tqsl_getGABBItCONTACT
DLLEXPORT const char *CALLCONVENTION tqsl_getGABBItCONTACT(tQSL_Cert cert, tQSL_Location loc, TQSL_QSO_RECORD *qso, int stationuid)
tqsl_cert_req_st::address1
char address1[TQSL_CRQ_ADDR_MAX+1]
Address 1.
Definition: tqsllib.h:108
tqsl_getCertificateRequestState
DLLEXPORT int CALLCONVENTION tqsl_getCertificateRequestState(tQSL_Cert cert, char *str, int bufsiz)
tqsl_getLocationFieldDataType
DLLEXPORT int CALLCONVENTION tqsl_getLocationFieldDataType(tQSL_Location loc, int field_num, int *type)
tqsl_deleteCertificate
DLLEXPORT int CALLCONVENTION tqsl_deleteCertificate(tQSL_Cert cert)
TQSL_ADIF_GET_FIELD_ERROR
TQSL_ADIF_GET_FIELD_ERROR
Response values returned from tqsl_getADIFField()
Definition: adif.h:52
TQSL_ZONE_MAX
#define TQSL_ZONE_MAX
Max length of a zone number.
Definition: tqsllib.h:58
tqsl_getStationLocationCapturePage
DLLEXPORT int CALLCONVENTION tqsl_getStationLocationCapturePage(tQSL_Location loc, int *page)
tqsl_freeCertificate
DLLEXPORT void CALLCONVENTION tqsl_freeCertificate(tQSL_Cert cert)
tqsl_provider_st::organizationName
char organizationName[TQSL_NAME_ELEMENT_MAX+1]
Provider name.
Definition: tqsllib.h:96
tqsl_cert_req_st::dxccEntity
int dxccEntity
DXCC Entity code.
Definition: tqsllib.h:115
TQSL_CABRILLO_ERROR_TYPE
TQSL_CABRILLO_ERROR_TYPE
Cabrillo status values.
Definition: cabrillo.h:40
TQSL_GRID_MAX
#define TQSL_GRID_MAX
Max length of a grid set.
Definition: tqsllib.h:55
TQSL_CRQ_COUNTRY_MAX
#define TQSL_CRQ_COUNTRY_MAX
Max length of req entity.
Definition: tqsllib.h:47
tqsl_setDirectory
DLLEXPORT int CALLCONVENTION tqsl_setDirectory(const char *dir)
tqsl_setLocationFieldCharData
DLLEXPORT int CALLCONVENTION tqsl_setLocationFieldCharData(tQSL_Location loc, int field_num, const char *buf)
tqsl_getStationLocation
DLLEXPORT int CALLCONVENTION tqsl_getStationLocation(tQSL_Location *loc, const char *name)
tqsl_convertTimeToText
DLLEXPORT char *CALLCONVENTION tqsl_convertTimeToText(const tQSL_Time *time, char *buf, int bufsiz)
tqsl_getDXCCEntity
DLLEXPORT int CALLCONVENTION tqsl_getDXCCEntity(int index, int *number, const char **name)
tqsl_importTQSLFile
DLLEXPORT int CALLCONVENTION tqsl_importTQSLFile(const char *file, int(*cb)(int type, const char *message, void *userdata), void *user)
tQSL_Cabrillo_Error
DLLEXPORTDATA TQSL_CABRILLO_ERROR_TYPE tQSL_Cabrillo_Error
The ADIF error code.
TQSL_QSO_RECORD::date_set
bool date_set
QSO specifies a date.
Definition: tqsllib.h:139
tqsl_setLocationFieldIndex
DLLEXPORT int CALLCONVENTION tqsl_setLocationFieldIndex(tQSL_Location loc, int field_num, int dat)
adif.h
tQSL_Cert
void * tQSL_Cert
Opaque certificate type.
Definition: tqsllib.h:76
cabrillo.h
tqsl_getLocationStationDetails
DLLEXPORT int CALLCONVENTION tqsl_getLocationStationDetails(tQSL_Location locp, char *buf, int buflen)
tqsl_cert_req_st::renew
char renew
Rewewal reference.
Definition: tqsllib.h:120
tqsl_isDateNull
DLLEXPORT int CALLCONVENTION tqsl_isDateNull(const tQSL_Date *d)
tqsl_deleteStationLocation
DLLEXPORT int CALLCONVENTION tqsl_deleteStationLocation(const char *name)
tqsl_getDeletedCallsignCertificates
DLLEXPORT int CALLCONVENTION tqsl_getDeletedCallsignCertificates(char ***calls, int *ncall, const char *filter)
tqsl_hasPrevStationLocationCapture
DLLEXPORT int CALLCONVENTION tqsl_hasPrevStationLocationCapture(tQSL_Location loc, int *rval)
tqsl_decodeBase64
DLLEXPORT int CALLCONVENTION tqsl_decodeBase64(const char *input, unsigned char *data, int *datalen)
tqsl_setLocationCallSign
DLLEXPORT int CALLCONVENTION tqsl_setLocationCallSign(tQSL_Location loc, const char *buf)
tqsl_cert_req_st::providerUnit
char providerUnit[TQSL_NAME_ELEMENT_MAX+1]
Provider unit.
Definition: tqsllib.h:105
tqsl_setStationLocationCertFlags
DLLEXPORT int CALLCONVENTION tqsl_setStationLocationCertFlags(tQSL_Location loc, int flags)
tqsl_getLocationFieldIndex
DLLEXPORT int CALLCONVENTION tqsl_getLocationFieldIndex(tQSL_Location loc, int field_num, int *dat)
tqsl_clearCabrilloMap
DLLEXPORT int CALLCONVENTION tqsl_clearCabrilloMap()
TQSL_COUNTRY_MAX
#define TQSL_COUNTRY_MAX
Max length of a country name.
Definition: tqsllib.h:57
tqsl_encodeBase64
DLLEXPORT int CALLCONVENTION tqsl_encodeBase64(const unsigned char *data, int datalen, char *output, int outputlen)
tqsl_prevStationLocationCapture
DLLEXPORT int CALLCONVENTION tqsl_prevStationLocationCapture(tQSL_Location loc)
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_StationDataEnc
char * tQSL_StationDataEnc
Opaque station data type.
Definition: tqsllib.h:78
tqsl_selectCACertificates
DLLEXPORT int CALLCONVENTION tqsl_selectCACertificates(tQSL_Cert **certlist, int *ncerts, const char *type)
tqsl_getNumBand
DLLEXPORT int CALLCONVENTION tqsl_getNumBand(int *number)
tqsl_checkSigningStatus
DLLEXPORT int CALLCONVENTION tqsl_checkSigningStatus(tQSL_Cert cert)
tqsl_saveCallsignLocationInfo
DLLEXPORT int CALLCONVENTION tqsl_saveCallsignLocationInfo(const char *callsign, const char *json)
tqsl_cert_req_st::signer
tQSL_Cert signer
Signing cert.
Definition: tqsllib.h:119
tqsl_getCertificatePrivateKeyType
DLLEXPORT int CALLCONVENTION tqsl_getCertificatePrivateKeyType(tQSL_Cert cert)
tqsl_getErrorString
DLLEXPORT const char *CALLCONVENTION tqsl_getErrorString()
tqsl_getLocationFieldChanged
DLLEXPORT int CALLCONVENTION tqsl_getLocationFieldChanged(tQSL_Location loc, int field_num, int *changed)
tQSL_ImportSerial
DLLEXPORTDATA long tQSL_ImportSerial
Serial number of recent certificate import.
tqsl_getStationLocationErrors
DLLEXPORT int CALLCONVENTION tqsl_getStationLocationErrors(tQSL_Location loc, char *buf, int bufsiz)
tqsl_getConfigVersion
DLLEXPORT int CALLCONVENTION tqsl_getConfigVersion(int *major, int *minor)
tqsl_getErrorString_v
DLLEXPORT const char *CALLCONVENTION tqsl_getErrorString_v(int err)
tqsl_cert_req_st::providerName
char providerName[TQSL_NAME_ELEMENT_MAX+1]
< Cert request data
Definition: tqsllib.h:104
TQSL_QSO_RECORD::time
tQSL_Time time
QSO time.
Definition: tqsllib.h:130
tQSL_Time
Definition: tqsllib.h:88
tqsl_getDXCCZoneMap
DLLEXPORT int CALLCONVENTION tqsl_getDXCCZoneMap(int number, const char **zonemap)
tqsl_setLocationField
DLLEXPORT int CALLCONVENTION tqsl_setLocationField(tQSL_Location locp, const char *field, const char *buf)
tqsl_getMaxSignatureSize
DLLEXPORT int CALLCONVENTION tqsl_getMaxSignatureSize(tQSL_Cert cert, int *sigsize)
tqsl_getCertificateCallSign
DLLEXPORT int CALLCONVENTION tqsl_getCertificateCallSign(tQSL_Cert cert, char *buf, int bufsiz)
tqsl_closeDiagFile
DLLEXPORT void CALLCONVENTION tqsl_closeDiagFile(void)
tqsl_cert_req_st::name
char name[TQSL_CRQ_NAME_MAX+1]
Name.
Definition: tqsllib.h:107
tqsl_cert_req_st::qsoNotBefore
tQSL_Date qsoNotBefore
QSOs not before date.
Definition: tqsllib.h:116
DLLEXPORTDATA
#define DLLEXPORTDATA
Symbol exports - Windows only.
Definition: tqsllib.h:26
tqsl_cert_req_st::callSign
char callSign[TQSL_CALLSIGN_MAX+1]
Callsign.
Definition: tqsllib.h:106
tqsl_getCertificateDXCCEntity
DLLEXPORT int CALLCONVENTION tqsl_getCertificateDXCCEntity(tQSL_Cert cert, int *dxcc)
TQSL_QSO_RECORD::mode_set
bool mode_set
QSO specifies a mode.
Definition: tqsllib.h:137
tqsl_verifyDataBlock
DLLEXPORT int CALLCONVENTION tqsl_verifyDataBlock(tQSL_Cert cert, const unsigned char *data, int datalen, unsigned char *sig, int siglen)
tqsl_getStationLocationName
DLLEXPORT int CALLCONVENTION tqsl_getStationLocationName(tQSL_Location loc, int idx, char *buf, int bufsiz)
tqsl_getLocationFieldDataLength
DLLEXPORT int CALLCONVENTION tqsl_getLocationFieldDataLength(tQSL_Location loc, int field_num, int *rval)
CALLCONVENTION
#define CALLCONVENTION
Symbol exports - Windows only.
Definition: tqsllib.h:27
tqsl_cert_req_st::city
char city[TQSL_CRQ_CITY_MAX+1]
City.
Definition: tqsllib.h:110
TQSL_CERT_REQ
struct tqsl_cert_req_st TQSL_CERT_REQ
tqsl_cert_req_st::password
char password[TQSL_PASSWORD_MAX+1]
Password.
Definition: tqsllib.h:118
tqsl_initDate
DLLEXPORT int CALLCONVENTION tqsl_initDate(tQSL_Date *date, const char *str)
tQSL_Errno
DLLEXPORTDATA int tQSL_Errno
System errno - stored when tQSL_Error == TQSL_SYSTEM_ERROR.
TQSL_CALLSIGN_MAX
#define TQSL_CALLSIGN_MAX
Max callsign length.
Definition: tqsllib.h:41
tqsl_mergeStationLocations
DLLEXPORT int CALLCONVENTION tqsl_mergeStationLocations(const char *locdata)
TQSL_PROPMODE_MAX
#define TQSL_PROPMODE_MAX
Max length of a prop mode.
Definition: tqsllib.h:53
TQSL_QSO_RECORD::my_dxcc
int my_dxcc
QSO specifies MY_DXCC.
Definition: tqsllib.h:148
tqsl_getCertificateIssuerOrganizationalUnit
DLLEXPORT int CALLCONVENTION tqsl_getCertificateIssuerOrganizationalUnit(tQSL_Cert cert, char *buf, int bufsiz)
tQSL_BaseDir
DLLEXPORTDATA const char * tQSL_BaseDir
Base directory for tQSL library working files.
tQSL_ADIF_Error
DLLEXPORTDATA TQSL_ADIF_GET_FIELD_ERROR tQSL_ADIF_Error
The ADIF error code.
tqsl_cert_req_st::country
char country[TQSL_CRQ_COUNTRY_MAX+1]
Country.
Definition: tqsllib.h:113
tqsl_nextStationLocationCapture
DLLEXPORT int CALLCONVENTION tqsl_nextStationLocationCapture(tQSL_Location loc)
tqsl_importKeyPairEncoded
DLLEXPORT int CALLCONVENTION tqsl_importKeyPairEncoded(const char *callsign, const char *type, const char *keybuf, const char *certbuf)
tqsl_getLocationFieldDataLabel
DLLEXPORT int CALLCONVENTION tqsl_getLocationFieldDataLabel(tQSL_Location loc, int field_num, char *buf, int bufsiz)
tqsl_getCertificateNotBeforeDate
DLLEXPORT int CALLCONVENTION tqsl_getCertificateNotBeforeDate(tQSL_Cert cert, tQSL_Date *date)
tqsl_getNumStationLocationCapturePages
DLLEXPORT int CALLCONVENTION tqsl_getNumStationLocationCapturePages(tQSL_Location loc, int *npages)
tqsl_endSigning
DLLEXPORT int CALLCONVENTION tqsl_endSigning(tQSL_Cert cert)
tqsl_getVersion
DLLEXPORT int CALLCONVENTION tqsl_getVersion(int *major, int *minor)
tqsl_setCertificateStatus
DLLEXPORT int CALLCONVENTION tqsl_setCertificateStatus(long serial, const char *status)
tqsl_getADIFMode
DLLEXPORT int CALLCONVENTION tqsl_getADIFMode(const char *adif_item, char *mode, int nmode)
tqsl_setCabrilloMapEntry
DLLEXPORT int CALLCONVENTION tqsl_setCabrilloMapEntry(const char *contest, int field, int contest_type)
TQSL_CRQ_NAME_MAX
#define TQSL_CRQ_NAME_MAX
Max length of request name.
Definition: tqsllib.h:42
tqsl_clearADIFModes
DLLEXPORT int CALLCONVENTION tqsl_clearADIFModes()
TQSL_IOTA_MAX
#define TQSL_IOTA_MAX
Max length of a IOTA identifier.
Definition: tqsllib.h:59
TQSL_QSO_RECORD::date
tQSL_Date date
QSO date.
Definition: tqsllib.h:129
tqsl_getNumLocationFieldListItems
DLLEXPORT int CALLCONVENTION tqsl_getNumLocationFieldListItems(tQSL_Location loc, int field_num, int *rval)
tqsl_freeDeletedLocationList
DLLEXPORT void CALLCONVENTION tqsl_freeDeletedLocationList(char **list, int nloc)
tqsl_freeCertificateList
DLLEXPORT void CALLCONVENTION tqsl_freeCertificateList(tQSL_Cert *list, int ncerts)
tqsl_setLocationFieldIntData
DLLEXPORT int CALLCONVENTION tqsl_setLocationFieldIntData(tQSL_Location loc, int field_num, int dat)
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_cert_req_st::qsoNotAfter
tQSL_Date qsoNotAfter
QSOs not after date.
Definition: tqsllib.h:117
tqsl_getSatellite
DLLEXPORT int CALLCONVENTION tqsl_getSatellite(int index, const char **name, const char **descrip, tQSL_Date *start, tQSL_Date *end)
tqsl_getStationLocationField
DLLEXPORT int CALLCONVENTION tqsl_getStationLocationField(tQSL_Location locp, const char *name, char *namebuf, int bufsize)
TQSL_MODE_MAX
#define TQSL_MODE_MAX
Max length of a mode name.
Definition: tqsllib.h:50
tqsl_getDXCCEntityName
DLLEXPORT int CALLCONVENTION tqsl_getDXCCEntityName(int number, const char **name)
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_getCertificateNotAfterDate
DLLEXPORT int CALLCONVENTION tqsl_getCertificateNotAfterDate(tQSL_Cert cert, tQSL_Date *date)
tqsl_getCertificateEmailAddress
DLLEXPORT int CALLCONVENTION tqsl_getCertificateEmailAddress(tQSL_Cert cert, char *buf, int bufsiz)
tqsl_saveStationLocationCapture
DLLEXPORT int CALLCONVENTION tqsl_saveStationLocationCapture(tQSL_Location loc, int overwrite)
tqsl_getStationLocationCallSign
DLLEXPORT int CALLCONVENTION tqsl_getStationLocationCallSign(tQSL_Location loc, int idx, char *buf, int bufsiz)
tqsl_getNumDXCCEntity
DLLEXPORT int CALLCONVENTION tqsl_getNumDXCCEntity(int *number)
tqsl_subtractDates
DLLEXPORT int CALLCONVENTION tqsl_subtractDates(const tQSL_Date *a, const tQSL_Date *b, int *diff)
tqsl_getDeletedStationLocations
DLLEXPORT int CALLCONVENTION tqsl_getDeletedStationLocations(char ***locp, int *nloc)
tqsl_cert_req_st::emailAddress
char emailAddress[TQSL_CRQ_EMAIL_MAX+1]
e-mail
Definition: tqsllib.h:114
tqsl_signDataBlock
DLLEXPORT int CALLCONVENTION tqsl_signDataBlock(tQSL_Cert cert, const unsigned char *data, int datalen, unsigned char *sig, int *siglen)
tqsl_isTimeValid
DLLEXPORT int CALLCONVENTION tqsl_isTimeValid(const tQSL_Time *t)
tqsl_getGABBItSTATION
DLLEXPORT const char *CALLCONVENTION tqsl_getGABBItSTATION(tQSL_Location loc, int uid, int certuid)
tqsl_getGABBItCERT
DLLEXPORT const char *CALLCONVENTION tqsl_getGABBItCERT(tQSL_Cert cert, int uid)
tQSL_ImportCall
DLLEXPORTDATA char tQSL_ImportCall[256]
Callsign used in import - used for missing public key error.
tqsl_hasNextStationLocationCapture
DLLEXPORT int CALLCONVENTION tqsl_hasNextStationLocationCapture(tQSL_Location loc, int *rval)
tqsl_getProvider
DLLEXPORT int CALLCONVENTION tqsl_getProvider(int idx, TQSL_PROVIDER *provider)
DLLEXPORT
#define DLLEXPORT
Symbol exports - Windows only.
Definition: tqsllib.h:25
tqsl_getLocationFieldDataGABBISize
DLLEXPORT int CALLCONVENTION tqsl_getLocationFieldDataGABBISize(tQSL_Location loc, int field_num, int *rval)
tqsl_getLocationFieldFlags
DLLEXPORT int CALLCONVENTION tqsl_getLocationFieldFlags(tQSL_Location loc, int field_num, int *flags)
tqsl_restoreStationLocation
DLLEXPORT int CALLCONVENTION tqsl_restoreStationLocation(const char *name)
TQSL_CRQ_EMAIL_MAX
#define TQSL_CRQ_EMAIL_MAX
Max length of req email.
Definition: tqsllib.h:48
tqsl_getCertificateRequestCountry
DLLEXPORT int CALLCONVENTION tqsl_getCertificateRequestCountry(tQSL_Cert cert, char *str, int bufsiz)
TQSL_FREQ_MAX
#define TQSL_FREQ_MAX
Max length of a frequency.
Definition: tqsllib.h:51
tqsl_getCertificateSerialLength
DLLEXPORT int CALLCONVENTION tqsl_getCertificateSerialLength(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_exportPKCS12Base64
DLLEXPORT int CALLCONVENTION tqsl_exportPKCS12Base64(tQSL_Cert cert, char *base64, int b64len, const char *p12password)
tqsl_provider_st::organizationalUnitName
char organizationalUnitName[TQSL_NAME_ELEMENT_MAX+1]
Provider unit.
Definition: tqsllib.h:97
tqsl_getNumMode
DLLEXPORT int CALLCONVENTION tqsl_getNumMode(int *number)
tQSL_Time::hour
int hour
Time hour field.
Definition: tqsllib.h:89
TQSL_SATNAME_MAX
#define TQSL_SATNAME_MAX
Max length of a sat name.
Definition: tqsllib.h:52
tQSL_Date
Definition: tqsllib.h:81
tqsl_getLocationFieldDataLabelSize
DLLEXPORT int CALLCONVENTION tqsl_getLocationFieldDataLabelSize(tQSL_Location loc, int field_num, int *rval)
TQSL_QSO_RECORD::time_set
bool time_set
QSO specifies a time.
Definition: tqsllib.h:140
tqsl_compareDates
DLLEXPORT int CALLCONVENTION tqsl_compareDates(const tQSL_Date *a, const tQSL_Date *b)
tqsl_getCertificateSerialExt
DLLEXPORT int CALLCONVENTION tqsl_getCertificateSerialExt(tQSL_Cert cert, char *serial, int serialsiz)
TQSL_CRQ_ADDR_MAX
#define TQSL_CRQ_ADDR_MAX
Max length of request addr.
Definition: tqsllib.h:43
tQSL_Date::day
int day
Numeric day.
Definition: tqsllib.h:84
TQSL_QSO_RECORD::band_set
bool band_set
QSO specifies a band or frequency.
Definition: tqsllib.h:138
tqsl_getCertificateIssuer
DLLEXPORT int CALLCONVENTION tqsl_getCertificateIssuer(tQSL_Cert cert, char *buf, int bufsiz)
tqsl_getSerialFromTQSLFile
DLLEXPORT int CALLCONVENTION tqsl_getSerialFromTQSLFile(const char *file, long *serial)
tqsl_getLocationFieldIntData
DLLEXPORT int CALLCONVENTION tqsl_getLocationFieldIntData(tQSL_Location loc, int field_num, int *dat)
tqsl_getCertificateQSONotAfterDate
DLLEXPORT int CALLCONVENTION tqsl_getCertificateQSONotAfterDate(tQSL_Cert cert, tQSL_Date *date)
tqsl_cert_req_st::address2
char address2[TQSL_CRQ_ADDR_MAX+1]
Address 2.
Definition: tqsllib.h:109
tqsl_initTime
DLLEXPORT int CALLCONVENTION tqsl_initTime(tQSL_Time *time, const char *str)
tqsl_beginSigning
DLLEXPORT int CALLCONVENTION tqsl_beginSigning(tQSL_Cert cert, char *password, int(*pwcb)(char *pwbuf, int pwsize, void *userdata), void *user)
tqsl_getPropagationMode
DLLEXPORT int CALLCONVENTION tqsl_getPropagationMode(int index, const char **name, const char **descrip)
TQSL_PROVIDER
struct tqsl_provider_st TQSL_PROVIDER
tqsl_getNumLocationField
DLLEXPORT int CALLCONVENTION tqsl_getNumLocationField(tQSL_Location loc, int *numf)
tqsl_cert_req_st
Definition: tqsllib.h:103
tqsl_getMode
DLLEXPORT int CALLCONVENTION tqsl_getMode(int index, const char **mode, const char **group)
tQSL_RsrcDir
DLLEXPORTDATA const char * tQSL_RsrcDir
Directory for resources bundled with tqsl executable.
tqsl_getBand
DLLEXPORT int CALLCONVENTION tqsl_getBand(int index, const char **name, const char **spectrum, int *low, int *high)
tqsl_getCertificateEncoded
DLLEXPORT int CALLCONVENTION tqsl_getCertificateEncoded(tQSL_Cert cert, char *buf, int bufsiz)
tqsl_getNumProviders
DLLEXPORT int CALLCONVENTION tqsl_getNumProviders(int *n)
tqsl_init
DLLEXPORT int CALLCONVENTION tqsl_init()
tqsl_setADIFMode
DLLEXPORT int CALLCONVENTION tqsl_setADIFMode(const char *adif_item, const char *mode)
tqsl_isCertificateSuperceded
DLLEXPORT int CALLCONVENTION tqsl_isCertificateSuperceded(tQSL_Cert cert, int *status)
tqsl_convertDateToText
DLLEXPORT char *CALLCONVENTION tqsl_convertDateToText(const tQSL_Date *date, char *buf, int bufsiz)
tqsl_setStationLocationCapturePage
DLLEXPORT int CALLCONVENTION tqsl_setStationLocationCapturePage(tQSL_Location loc, int page)