1 #ifndef __ISDS_SERVICES_H
2 #define __ISDS_SERVICES_H
4 #include <time.h> /* struct tm */
5 #include <sys/time.h> /* struct timeval */
6 #include "server_types.h"
10 SERVICE_asws_changePassword_ChangePasswordOTP
,
11 SERVICE_asws_changePassword_SendSMSCode
,
12 SERVICE_DS_df_DataBoxCreditInfo
,
13 SERVICE_DS_df_FindDataBox
,
14 SERVICE_DS_df_FindPersonalDataBox
,
15 SERVICE_DS_df_GetDataBoxActivityStatus
,
16 SERVICE_DS_df_ISDSSearch2
,
17 SERVICE_DS_DsManage_ChangeISDSPassword
,
18 SERVICE_DS_Dx_EraseMessage
,
19 SERVICE_DS_Dz_DummyOperation
,
20 SERVICE_DS_Dz_ResignISDSDocument
,
23 struct service_configuration
{
24 service_id name
; /* Identifier of SOAP service */
25 const void *arguments
; /* Configuration for the service */
28 /* Type of credit change event */
30 SERVER_CREDIT_CHARGED
, /* Credit has been charged */
31 SERVER_CREDIT_DISCHARGED
, /* Credit has been discharged */
32 SERVER_CREDIT_MESSAGE_SENT
, /* Credit has been spent for sending
33 a commerical message */
34 SERVER_CREDIT_STORAGE_SET
, /* Credit has been spent for setting
35 a long-term storage */
36 SERVER_CREDIT_EXPIRED
/* Credit has expired */
37 } server_credit_event_type
;
39 /* Data specific for SERVER_CREDIT_CHARGED server_credit_event_type */
40 struct server_credit_event_charged
{
41 char *transaction
; /* Transaction identified;
42 NULL-terminated string. */
45 /* Data specific for SERVER_CREDIT_DISCHARGED server_credit_event_type */
46 struct server_credit_event_discharged
{
47 char *transaction
; /* Transaction identified;
48 NULL-terminated string. */
51 /* Data specific for SERVER_CREDIT_MESSAGE_SENT server_credit_event_type */
52 struct server_credit_event_message_sent
{
53 char *recipient
; /* Recipent's box ID of the sent message */
54 char *message_id
; /* ID of the sent message */
57 /* Data specific for SERVER_CREDIT_STORAGE_SET server_credit_event_type */
58 struct server_credit_event_storage_set
{
59 long int new_capacity
; /* New storage capacity. The unit is
61 struct tm
*new_valid_from
; /* The new capacity is available since
63 struct tm
*new_valid_to
; /* The new capacity expires on date. */
64 long int *old_capacity
; /* Previous storage capacity; Optional.
65 The unit is a message. */
66 struct tm
*old_valid_from
; /* Date; Optional; Only tm_year,
67 tm_mon, and tm_mday carry sane value. */
68 struct tm
*old_valid_to
; /* Date; Optional. */
69 char *initiator
; /* Name of a user who initiated this
73 /* Event about change of credit for sending commerical services */
74 struct server_credit_event
{
76 struct timeval
*time
; /* When the credit was changed. */
77 long int credit_change
; /* Difference in credit value caused by
78 this event. The unit is 1/100 CZK. */
79 long int new_credit
; /* Credit value after this event.
80 The unit is 1/100 CZK. */
81 server_credit_event_type type
; /* Type of the event */
83 /* Datails specific for the type */
85 struct server_credit_event_charged charged
;
86 /* SERVER_CREDIT_CHARGED */
87 struct server_credit_event_discharged discharged
;
88 /* SERVER_CREDIT_DISCHAGED */
89 struct server_credit_event_message_sent message_sent
;
90 /* SERVER_CREDIT_MESSAGE_SENT */
91 struct server_credit_event_storage_set storage_set
;
92 /* SERVER_CREDIT_STORAGE_SET */
96 /* An ISDSSearch2 result */
97 struct server_db_result
{
98 char *id
; /* dbID value */
99 char *type
; /* dbType value */
100 char *name
; /* dbName value */
101 char *address
; /* dbAddress value */
102 struct tm
*birth_date
; /* dbBiDate value */
103 char *ic
; /* dbICO value */
104 _Bool ovm
; /* dbEffectiveOVM value */
105 char *send_options
; /* dbSendOptions value */
108 /* Union of tdbOwnerInfo and tdbPersonalOwnerInfo XSD types */
109 struct server_owner_info
{
117 char *pnLastNameAtBirth
;
127 char *adNumberInStreet
;
128 char *adNumberInMunicipality
;
132 _Bool email_exists
; /* Return empty email element */
134 _Bool telNumber_exists
; /* Return empty telNumber element */
139 _Bool
*dbEffectiveOVM
;
140 _Bool
*dbOpenAddressing
;
143 /* Box state period */
144 struct server_box_state_period
{
145 struct timeval
*from
;
150 /* General linked list */
152 struct server_list
*next
; /* Next list item,
153 or NULL if current is last */
154 void *data
; /* Payload */
155 void (*destructor
) (void **); /* Payload deallocator;
156 Use NULL to have static data member. */
159 struct arguments_DS_df_DataBoxCreditInfo
{
160 const char *status_code
;
161 const char *status_message
;
162 const char *box_id
; /* Require this dbID in request */
163 const struct tm
*from_date
; /* Require this ciFromDate in request */
164 const struct tm
*to_date
; /* Require this ciTodate in request */
165 const long int current_credit
; /* Return this currentCredit */
166 const char *email
; /* Return this notifEmail */
167 const struct server_list
*history
; /* Return this ciRecords */
170 struct arguments_DS_df_FindDataBox
{
171 const char *status_code
;
172 const char *status_message
;
173 const struct server_owner_info
*criteria
; /* generalized tDbOwnerInfo */
174 const _Bool results_exists
; /* Return dbResults element */
175 const struct server_list
*results
; /* Return list of
176 struct server_owner_info * as
180 struct arguments_DS_df_FindPersonalDataBox
{
181 const char *status_code
;
182 const char *status_message
;
183 const struct server_owner_info
*criteria
; /* generalized
184 tdbPerosnalOwnerInfo */
185 const _Bool results_exists
; /* Return dbResults element */
186 const struct server_list
*results
; /* Return list of
187 struct server_owner_info * as
191 struct arguments_DS_df_GetDataBoxActivityStatus
{
192 const char *status_code
;
193 const char *status_message
;
194 const char *box_id
; /* Input */
195 const struct timeval
*from
; /* Input */
196 const struct timeval
*to
; /* Input */
197 const char *result_box_id
; /* Output */
198 const _Bool results_exists
; /* Return Periods element */
199 const struct server_list
*results
; /* Return list of
200 struct server_box_state_period * as
204 struct arguments_DS_df_ISDSSearch2
{
205 const char *status_code
;
206 const char *status_message
;
207 const char *search_text
; /* Require this searchText in a request */
208 const char *search_type
; /* Require this searchType in a request */
209 const char *search_scope
; /* Require this searchScope in a request */
210 const long int *search_page_number
; /* Require this page in a request */
211 const long int *search_page_size
; /* Require this pageSize in a request */
212 const _Bool
*search_highlighting_value
; /* Require this highlighting
213 value in a request */
214 const unsigned long int *total_count
; /* Return this totalCount */
215 const unsigned long int *current_count
; /* Return this currentCount */
216 const unsigned long int *position
; /* Return this position */
217 const _Bool
*last_page
; /* Return this lastPage */
218 const _Bool results_exists
; /* Return dbResults element */
219 const struct server_list
*results
; /* Return list of
220 struct server_db_result* as dbResults */
223 struct arguments_DS_Dz_ResignISDSDocument
{
224 const char *status_code
;
225 const char *status_message
;
226 const struct tm
*valid_to
; /* Return this date if not NULL */
229 struct arguments_DS_Dx_EraseMessage
{
230 const char *message_id
; /* Expected message ID */
231 _Bool incoming
; /* Expected message direction,
235 struct arguments_DS_DsManage_ChangeISDSPassword
{
236 const char *username
; /* User ID */
237 const char *current_password
; /* User password */
240 struct arguments_asws_changePassword_ChangePasswordOTP
{
241 const char *username
; /* User ID */
242 const char *current_password
; /* User password */
243 enum auth_otp_method method
; /* OTP method */
244 const char *reference_number
; /* Return this string if not NULL */
247 struct arguments_asws_changePassword_SendSMSCode
{
248 const char *status_code
;
249 const char *status_message
;
250 const char *reference_number
; /* Return this string if not NULL */