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_DsManage_ChangeISDSPassword
,
14 SERVICE_DS_Dx_EraseMessage
,
15 SERVICE_DS_Dz_DummyOperation
,
16 SERVICE_DS_Dz_ResignISDSDocument
,
19 struct service_configuration
{
20 service_id name
; /* Identifier of SOAP service */
21 const void *arguments
; /* Configuration for the service */
24 /* Type of credit change event */
26 SERVER_CREDIT_CHARGED
, /* Credit has been charged */
27 SERVER_CREDIT_DISCHARGED
, /* Credit has been discharged */
28 SERVER_CREDIT_MESSAGE_SENT
, /* Credit has been spent for sending
29 a commerical message */
30 SERVER_CREDIT_STORAGE_SET
, /* Credit has been spent for setting
31 a long-term storage */
32 SERVER_CREDIT_EXPIRED
/* Credit has expired */
33 } server_credit_event_type
;
35 /* Data specific for SERVER_CREDIT_CHARGED server_credit_event_type */
36 struct server_credit_event_charged
{
37 char *transaction
; /* Transaction identified;
38 NULL-terminated string. */
41 /* Data specific for SERVER_CREDIT_DISCHARGED server_credit_event_type */
42 struct server_credit_event_discharged
{
43 char *transaction
; /* Transaction identified;
44 NULL-terminated string. */
47 /* Data specific for SERVER_CREDIT_MESSAGE_SENT server_credit_event_type */
48 struct server_credit_event_message_sent
{
49 char *recipient
; /* Recipent's box ID of the sent message */
50 char *message_id
; /* ID of the sent message */
53 /* Data specific for SERVER_CREDIT_STORAGE_SET server_credit_event_type */
54 struct server_credit_event_storage_set
{
55 long int new_capacity
; /* New storage capacity. The unit is
57 struct tm
*new_valid_from
; /* The new capacity is available since
59 struct tm
*new_valid_to
; /* The new capacity expires on date. */
60 long int *old_capacity
; /* Previous storage capacity; Optional.
61 The unit is a message. */
62 struct tm
*old_valid_from
; /* Date; Optional; Only tm_year,
63 tm_mon, and tm_mday carry sane value. */
64 struct tm
*old_valid_to
; /* Date; Optional. */
65 char *initiator
; /* Name of a user who initiated this
69 /* Event about change of credit for sending commerical services */
70 struct server_credit_event
{
72 struct timeval
*time
; /* When the credit was changed. */
73 long int credit_change
; /* Difference in credit value caused by
74 this event. The unit is 1/100 CZK. */
75 long int new_credit
; /* Credit value after this event.
76 The unit is 1/100 CZK. */
77 server_credit_event_type type
; /* Type of the event */
79 /* Datails specific for the type */
81 struct server_credit_event_charged charged
;
82 /* SERVER_CREDIT_CHARGED */
83 struct server_credit_event_discharged discharged
;
84 /* SERVER_CREDIT_DISCHAGED */
85 struct server_credit_event_message_sent message_sent
;
86 /* SERVER_CREDIT_MESSAGE_SENT */
87 struct server_credit_event_storage_set storage_set
;
88 /* SERVER_CREDIT_STORAGE_SET */
92 /* General linked list */
94 struct server_list
*next
; /* Next list item,
95 or NULL if current is last */
96 void *data
; /* Payload */
97 void (*destructor
) (void **); /* Payload deallocator;
98 Use NULL to have static data member. */
101 struct arguments_DS_df_DataBoxCreditInfo
{
102 const char *status_code
;
103 const char *status_message
;
104 const char *box_id
; /* Require this dbID in request */
105 const struct tm
*from_date
; /* Require this ciFromDate in request */
106 const struct tm
*to_date
; /* Require this ciTodate in request */
107 const long int current_credit
; /* Return this currentCredit */
108 const char *email
; /* Return this notifEmail */
109 const struct server_list
*history
; /* Return this ciRecords */
112 struct arguments_DS_Dz_ResignISDSDocument
{
113 const char *status_code
;
114 const char *status_message
;
115 const struct tm
*valid_to
; /* Return this date if not NULL */
118 struct arguments_DS_Dx_EraseMessage
{
119 const char *message_id
; /* Expected message ID */
120 _Bool incoming
; /* Expected message direction,
124 struct arguments_DS_DsManage_ChangeISDSPassword
{
125 const char *username
; /* User ID */
126 const char *current_password
; /* User password */
129 struct arguments_asws_changePassword_ChangePasswordOTP
{
130 const char *username
; /* User ID */
131 const char *current_password
; /* User password */
132 enum auth_otp_method method
; /* OTP method */
133 const char *reference_number
; /* Return this string if not NULL */
136 struct arguments_asws_changePassword_SendSMSCode
{
137 const char *status_code
;
138 const char *status_message
;
139 const char *reference_number
; /* Return this string if not NULL */