Estonian ID Card C-library
libdigidoc
DigiDocService.h
1
#ifndef __DIGI_DOC_SRV_H__
2
#define __DIGI_DOC_SRV_H__
3
//==================================================
4
// FILE: DigiDocService.h
5
// PROJECT: Digi Doc
6
// DESCRIPTION: Digi Doc functions for DigiDocService access
7
// AUTHOR: Veiko Sinivee, Sunset Software O†
8
//==================================================
9
// Copyright (C) AS Sertifitseerimiskeskus
10
// This library is free software; you can redistribute it and/or
11
// modify it under the terms of the GNU Lesser General Public
12
// License as published by the Free Software Foundation; either
13
// version 2.1 of the License, or (at your option) any later version.
14
// This library is distributed in the hope that it will be useful,
15
// but WITHOUT ANY WARRANTY; without even the implied warranty of
16
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17
// Lesser General Public License for more details.
18
// GNU Lesser General Public Licence is available at
19
// http://www.gnu.org/copyleft/lesser.html
20
//==================================================
21
22
#include <libdigidoc/DigiDocDefs.h>
23
#include <libdigidoc/DigiDocHTTP.h>
24
#include <libdigidoc/DigiDocMem.h>
25
26
#ifdef __cplusplus
27
extern
"C"
{
28
#endif
29
30
#define STATUS_UNKNOWN 0
31
#define STATUS_OUTSTANDING_TRANSACTION 1
32
#define STATUS_SIGNATURE 2
33
#define STATUS_ERROR 3
34
35
36
//------------------------------------------
37
// Gets DigiDocService session status and returns status code
38
// If session is ready then signature will be returned
39
// pSigDoc - signed document object to be modified
40
// lSesscode - session code
41
// url - dds service url
42
// proxyHost - proxy hostname
43
// proxyPort -proxy port
44
// pStatus - buffer for returning status
45
// pMBufSig - buffer for returning signature
46
// returns DigiDocService session status code
47
// deprecated use ddsGetStatus(pSigDoc, lSesscode, url, proxyHost, proxyPort, pStatus, szFileName)
48
//------------------------------------------
49
DIGIDOC_DEPRECATED EXP_OPTION
int
ddsGetStatus(
SignedDoc
* pSigDoc,
long
lSesscode,
50
char
* url,
char
* proxyHost,
char
* proxyPort,
51
int
* pStatus);
52
53
//------------------------------------------
54
// Gets DigiDocService session status and returns status code
55
// If session is ready then signature will be returned
56
// pSigDoc - signed document object to be modified
57
// lSesscode - session code
58
// url - dds service url
59
// proxyHost - proxy hostname
60
// proxyPort -proxy port
61
// pStatus - buffer for returning status
62
// szFileName - ddoc filename to add signature from dds (optional)
63
// pMBufSig - buffer for returning signature
64
// returns DigiDocService session status code
65
//------------------------------------------
66
EXP_OPTION
int
ddsGetStatusWithFile(
SignedDoc
* pSigDoc,
long
lSesscode,
67
char
* url,
char
* proxyHost,
char
* proxyPort,
68
int
* pStatus,
const
char
* szFileName);
69
70
//--------------------------------------------------
71
// Signs the document and gets return status back
72
// pSigDoc - signed document object
73
// szIdCode - personal id code
74
// szPhoneNo - users phone number
75
// szLang - language code
76
// manifest - manifest or role
77
// city - signers address , city
78
// state - signers address , state or province
79
// zip - signers address , postal code
80
// country - signers address , country name
81
// pSesscode - pointer to long int buffer for returning session code
82
// szChallenge - buffer for returning challenge code (char 4)
83
// nChalLen - length of challenge buffer
84
// return error code or ERR_OK
85
//--------------------------------------------------
86
EXP_OPTION
int
ddsSign(
SignedDoc
* pSigDoc,
87
const
char
* szIdCode,
const
char
* szPhoneNo,
88
const
char
* szLang,
const
char
* szServiceName,
89
const
char
* manifest,
const
char
* city,
90
const
char
* state,
const
char
* zip,
91
const
char
* country,
92
char
* url,
char
* proxyHost,
char
* proxyPort,
93
long
* pSesscode,
char
* szChallenge,
int
nChalLen);
94
95
96
97
#ifdef __cplusplus
98
}
99
#endif
100
101
102
#endif // __DIGI_DOC_CFG_H__
SignedDoc_st
Definition:
DigiDocObj.h:177
Generated on Wed Apr 25 2018 13:52:12 for Estonian ID Card C-library by
1.8.17