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

tqsllib.h File Reference

#include "adif.h"
#include "cabrillo.h"

Go to the source code of this file.

Classes

struct  tqsl_cert_req_st
struct  tQSL_Date
struct  tqsl_provider_st
struct  TQSL_QSO_RECORD
struct  tQSL_Time

Defines

#define DLLEXPORT
#define DLLEXPORTDATA
#define TQSL_MAX_PATH_LEN   256
#define TQSL_PASSWORD_MAX   80
#define TQSL_NAME_ELEMENT_MAX   256
#define TQSL_CALLSIGN_MAX   13
#define TQSL_CRQ_NAME_MAX   60
#define TQSL_CRQ_ADDR_MAX   80
#define TQSL_CRQ_CITY_MAX   80
#define TQSL_CRQ_STATE_MAX   80
#define TQSL_CRQ_POSTAL_MAX   20
#define TQSL_CRQ_COUNTRY_MAX   80
#define TQSL_CRQ_EMAIL_MAX   180
#define TQSL_BAND_MAX   6
#define TQSL_MODE_MAX   16
#define TQSL_FREQ_MAX   20
#define TQSL_SATNAME_MAX   6
#define TQSL_PROPMODE_MAX   6
#define TQSL_CERT_CB_USER   0
#define TQSL_CERT_CB_CA   1
#define TQSL_CERT_CB_ROOT   2
#define TQSL_CERT_CB_PKEY   3
#define TQSL_CERT_CB_CONFIG   4
#define TQSL_CERT_CB_CERT_TYPE(x)   ((x) & 0xf)
#define TQSL_CERT_CB_MILESTONE   0
#define TQSL_CERT_CB_RESULT   0x10
#define TQSL_CERT_CB_CALL_TYPE(x)   ((x) & TQSL_CERT_CB_RESULT)
#define TQSL_CERT_CB_PROMPT   0
#define TQSL_CERT_CB_DUPLICATE   0x100
#define TQSL_CERT_CB_ERROR   0x200
#define TQSL_CERT_CB_LOADED   0x300
#define TQSL_CERT_CB_RESULT_TYPE(x)   ((x) & 0x0f00)
#define TQSL_SELECT_CERT_WITHKEYS   1
#define TQSL_SELECT_CERT_EXPIRED   2
#define TQSL_SELECT_CERT_SUPERCEDED   4
#define TQSL_PK_TYPE_ERR   0
#define TQSL_PK_TYPE_NONE   1
#define TQSL_PK_TYPE_UNENC   2
#define TQSL_PK_TYPE_ENC   3
#define TQSL_LOCATION_FIELD_TEXT   1
#define TQSL_LOCATION_FIELD_DDLIST   2
#define TQSL_LOCATION_FIELD_LIST   3
#define TQSL_LOCATION_FIELD_CHAR   1
#define TQSL_LOCATION_FIELD_INT   2
#define TQSL_MAX_PW_LENGTH   32

Typedefs

typedef void * tQSL_Cert
typedef void * tQSL_Location
typedef tqsl_provider_st TQSL_PROVIDER
typedef tqsl_cert_req_st TQSL_CERT_REQ

Functions

DLLEXPORT int tqsl_init ()
DLLEXPORT int tqsl_setDirectory (const char *dir)
DLLEXPORT const char * tqsl_getErrorString ()
DLLEXPORT const char * tqsl_getErrorString_v (int err)
DLLEXPORT int tqsl_encodeBase64 (const unsigned char *data, int datalen, char *output, int outputlen)
DLLEXPORT int tqsl_decodeBase64 (const char *input, unsigned char *data, int *datalen)
DLLEXPORT int tqsl_initDate (tQSL_Date *date, const char *str)
DLLEXPORT int tqsl_initTime (tQSL_Time *time, const char *str)
DLLEXPORT int tqsl_compareDates (const tQSL_Date *a, const tQSL_Date *b)
DLLEXPORT char * tqsl_convertDateToText (const tQSL_Date *date, char *buf, int bufsiz)
DLLEXPORT int tqsl_isDateValid (const tQSL_Date *d)
DLLEXPORT int tqsl_isDateNull (const tQSL_Date *d)
DLLEXPORT int tqsl_isTimeValid (const tQSL_Time *t)
DLLEXPORT char * tqsl_convertTimeToText (const tQSL_Time *time, char *buf, int bufsiz)
DLLEXPORT int tqsl_getVersion (int *major, int *minor)
DLLEXPORT int tqsl_getConfigVersion (int *major, int *minor)
DLLEXPORT int tqsl_selectCertificates (tQSL_Cert **certlist, int *ncerts, const char *callsign, int dxcc, const tQSL_Date *date, const TQSL_PROVIDER *issuer, int flag)
DLLEXPORT int tqsl_getSelectedCertificate (tQSL_Cert *cert, const tQSL_Cert **certlist, int idx)
DLLEXPORT int tqsl_getCertificateKeyOnly (tQSL_Cert cert, int *keyonly)
DLLEXPORT int tqsl_getCertificateEncoded (tQSL_Cert cert, char *buf, int bufsiz)
DLLEXPORT int tqsl_getCertificateSerial (tQSL_Cert cert, long *serial)
DLLEXPORT int tqsl_getCertificateIssuer (tQSL_Cert cert, char *buf, int bufsiz)
DLLEXPORT int tqsl_getCertificateIssuerOrganization (tQSL_Cert cert, char *buf, int bufsiz)
DLLEXPORT int tqsl_getCertificateIssuerOrganizationalUnit (tQSL_Cert cert, char *buf, int bufsiz)
DLLEXPORT int tqsl_getCertificateCallSign (tQSL_Cert cert, char *buf, int bufsiz)
DLLEXPORT int tqsl_getCertificateAROName (tQSL_Cert cert, char *buf, int bufsiz)
DLLEXPORT int tqsl_getCertificateEmailAddress (tQSL_Cert cert, char *buf, int bufsiz)
DLLEXPORT int tqsl_getCertificateQSONotBeforeDate (tQSL_Cert cert, tQSL_Date *date)
DLLEXPORT int tqsl_getCertificateQSONotAfterDate (tQSL_Cert cert, tQSL_Date *date)
DLLEXPORT int tqsl_getCertificateNotBeforeDate (tQSL_Cert cert, tQSL_Date *date)
DLLEXPORT int tqsl_getCertificateNotAfterDate (tQSL_Cert cert, tQSL_Date *date)
DLLEXPORT int tqsl_getCertificateDXCCEntity (tQSL_Cert cert, int *dxcc)
DLLEXPORT int tqsl_getCertificateRequestAddress1 (tQSL_Cert cert, char *str, int bufsiz)
DLLEXPORT int tqsl_getCertificateRequestAddress2 (tQSL_Cert cert, char *str, int bufsiz)
DLLEXPORT int tqsl_getCertificateRequestCity (tQSL_Cert cert, char *str, int bufsiz)
DLLEXPORT int tqsl_getCertificateRequestState (tQSL_Cert cert, char *str, int bufsiz)
DLLEXPORT int tqsl_getCertificateRequestPostalCode (tQSL_Cert cert, char *str, int bufsiz)
DLLEXPORT int tqsl_getCertificateRequestCountry (tQSL_Cert cert, char *str, int bufsiz)
DLLEXPORT int tqsl_getCertificatePrivateKeyType (tQSL_Cert cert)
DLLEXPORT void tqsl_freeCertificate (tQSL_Cert cert)
DLLEXPORT int tqsl_importTQSLFile (const char *file, int(*cb)(int type, const char *message, void *userdata), void *user)
DLLEXPORT int tqsl_getNumProviders (int *n)
DLLEXPORT int tqsl_getProvider (int idx, TQSL_PROVIDER *provider)
DLLEXPORT int tqsl_createCertRequest (const char *filename, TQSL_CERT_REQ *req, int(*pwcb)(char *pwbuf, int pwsize, void *userdata), void *user)
DLLEXPORT int tqsl_exportPKCS12File (tQSL_Cert cert, const char *filename, const char *p12password)
DLLEXPORT int 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)
DLLEXPORT int tqsl_deleteCertificate (tQSL_Cert cert)
DLLEXPORT int tqsl_beginSigning (tQSL_Cert cert, char *password, int(*pwcb)(char *pwbuf, int pwsize, void *userdata), void *user)
DLLEXPORT int tqsl_checkSigningStatus (tQSL_Cert cert)
DLLEXPORT int tqsl_getMaxSignatureSize (tQSL_Cert cert, int *sigsize)
DLLEXPORT int tqsl_signDataBlock (tQSL_Cert cert, const unsigned char *data, int datalen, unsigned char *sig, int *siglen)
DLLEXPORT int tqsl_verifyDataBlock (tQSL_Cert cert, const unsigned char *data, int datalen, unsigned char *sig, int siglen)
DLLEXPORT int tqsl_signQSORecord (tQSL_Cert cert, tQSL_Location loc, TQSL_QSO_RECORD *rec, unsigned char *sig, int *siglen)
DLLEXPORT int tqsl_endSigning (tQSL_Cert cert)
DLLEXPORT int tqsl_initStationLocationCapture (tQSL_Location *locp)
DLLEXPORT int tqsl_endStationLocationCapture (tQSL_Location *locp)
DLLEXPORT int tqsl_updateStationLocationCapture (tQSL_Location loc)
DLLEXPORT int tqsl_getStationLocationCapturePage (tQSL_Location loc, int *page)
DLLEXPORT int tqsl_setStationLocationCapturePage (tQSL_Location loc, int page)
DLLEXPORT int tqsl_nextStationLocationCapture (tQSL_Location loc)
DLLEXPORT int tqsl_prevStationLocationCapture (tQSL_Location loc)
DLLEXPORT int tqsl_hasNextStationLocationCapture (tQSL_Location loc, int *rval)
DLLEXPORT int tqsl_hasPrevStationLocationCapture (tQSL_Location loc, int *rval)
DLLEXPORT int tqsl_saveStationLocationCapture (tQSL_Location loc, int overwrite)
DLLEXPORT int tqsl_getStationLocationCaptureName (tQSL_Location loc, char *namebuf, int bufsiz)
DLLEXPORT int tqsl_setStationLocationCaptureName (tQSL_Location loc, const char *name)
DLLEXPORT int tqsl_getNumStationLocations (tQSL_Location loc, int *nloc)
DLLEXPORT int tqsl_getStationLocationName (tQSL_Location loc, int idx, char *buf, int bufsiz)
DLLEXPORT int tqsl_getStationLocationCallSign (tQSL_Location loc, int idx, char *buf, int bufsiz)
DLLEXPORT int tqsl_getStationLocation (tQSL_Location *loc, const char *name)
DLLEXPORT int tqsl_deleteStationLocation (const char *name)
DLLEXPORT int tqsl_getNumLocationField (tQSL_Location loc, int *numf)
DLLEXPORT int tqsl_getLocationFieldDataLabelSize (tQSL_Location loc, int field_num, int *rval)
DLLEXPORT int tqsl_getLocationFieldDataLabel (tQSL_Location loc, int field_num, char *buf, int bufsiz)
DLLEXPORT int tqsl_getLocationFieldDataGABBISize (tQSL_Location loc, int field_num, int *rval)
DLLEXPORT int tqsl_getLocationFieldDataGABBI (tQSL_Location loc, int field_num, char *buf, int bufsiz)
DLLEXPORT int tqsl_getLocationFieldInputType (tQSL_Location loc, int field_num, int *type)
DLLEXPORT int tqsl_getLocationFieldDataType (tQSL_Location loc, int field_num, int *type)
DLLEXPORT int tqsl_getLocationFieldDataLength (tQSL_Location loc, int field_num, int *rval)
DLLEXPORT int tqsl_getLocationFieldCharData (tQSL_Location loc, int field_num, char *buf, int bufsiz)
DLLEXPORT int tqsl_getLocationFieldIntData (tQSL_Location loc, int field_num, int *dat)
DLLEXPORT int tqsl_getLocationFieldIndex (tQSL_Location loc, int field_num, int *dat)
DLLEXPORT int tqsl_getNumLocationFieldListItems (tQSL_Location loc, int field_num, int *rval)
DLLEXPORT int tqsl_getLocationFieldListItem (tQSL_Location loc, int field_num, int item_idx, char *buf, int bufsiz)
DLLEXPORT int tqsl_setLocationFieldCharData (tQSL_Location loc, int field_num, const char *buf)
DLLEXPORT int tqsl_setLocationFieldIntData (tQSL_Location loc, int field_num, int dat)
DLLEXPORT int tqsl_setLocationFieldIndex (tQSL_Location loc, int field_num, int dat)
DLLEXPORT int tqsl_getLocationFieldChanged (tQSL_Location loc, int field_num, int *changed)
DLLEXPORT int tqsl_getLocationCallSign (tQSL_Location loc, char *buf, int bufsiz)
DLLEXPORT int tqsl_getLocationDXCCEntity (tQSL_Location loc, int *dxcc)
DLLEXPORT int tqsl_getNumDXCCEntity (int *number)
DLLEXPORT int tqsl_getDXCCEntity (int index, int *number, const char **name)
DLLEXPORT int tqsl_getDXCCEntityName (int number, const char **name)
DLLEXPORT int tqsl_getNumBand (int *number)
DLLEXPORT int tqsl_getBand (int index, const char **name, const char **spectrum, int *low, int *high)
DLLEXPORT int tqsl_getNumMode (int *number)
DLLEXPORT int tqsl_getMode (int index, const char **mode, const char **group)
DLLEXPORT int tqsl_getNumPropagationMode (int *number)
DLLEXPORT int tqsl_getPropagationMode (int index, const char **name, const char **descrip)
DLLEXPORT int tqsl_getNumSatellite (int *number)
DLLEXPORT int tqsl_getSatellite (int index, const char **name, const char **descrip, tQSL_Date *start, tQSL_Date *end)
DLLEXPORT int tqsl_clearCabrilloMap ()
DLLEXPORT int tqsl_setCabrilloMapEntry (const char *contest, int field, int contest_type)
DLLEXPORT int tqsl_getCabrilloMapEntry (const char *contest, int *fieldnum, int *contest_type)
DLLEXPORT int tqsl_clearADIFModes ()
DLLEXPORT int tqsl_setADIFMode (const char *adif_item, const char *mode)
DLLEXPORT int tqsl_getADIFMode (const char *adif_item, char *mode, int nmode)
DLLEXPORT const char * tqsl_getGABBItCERT (tQSL_Cert cert, int uid)
DLLEXPORT const char * tqsl_getGABBItSTATION (tQSL_Location loc, int uid, int certuid)
DLLEXPORT const char * tqsl_getGABBItCONTACT (tQSL_Cert cert, tQSL_Location loc, TQSL_QSO_RECORD *qso, int stationuid)

Variables

const char * tQSL_BaseDir
 Base directory for tQSL library working files.

DLLEXPORTDATA int tQSL_Error
 Error code from most recent tQSL library call.

DLLEXPORTDATA TQSL_ADIF_GET_FIELD_ERROR tQSL_ADIF_Error
 The ADIF error code.

DLLEXPORTDATA TQSL_CABRILLO_ERROR_TYPE tQSL_Cabrillo_Error
 The ADIF error code.

DLLEXPORTDATA char tQSL_ErrorFile [256]
 File name of file giving error. (May be empty.).

DLLEXPORTDATA char tQSL_CustomError [256]
 Custom error message string.


Detailed Description

tQSL library functions.

Typedef Documentation

typedef struct tqsl_cert_req_st TQSL_CERT_REQ
 

Certificate request data

typedef struct tqsl_provider_st TQSL_PROVIDER
 

Certificate provider data


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