1ISDS.H.LIBDATOVK(3)          Manual for Libdatovka         ISDS.H.LIBDATOVK(3)
2
3
4

NAME

6       isds.h.libdatovka - API definition for libdatovka
7

SYNOPSIS

9       #include <libdatovka/isds.h>
10

DESCRIPTION

12       This header file declares interface for the libdatovka library.
13

CONSTANTS

15   Service locators
16       Addresses of known ISDS servers.
17
18       Base URLs of production ISDS instance
19           isds_locator
20                  extern const char isds_locator[];
21
22              Without client certificate authentication.
23
24           isds_cert_locator
25                  extern const char isds_cert_locator[];
26
27              With client certificate authentication.
28
29           isds_otp_locator
30                  extern const char isds_otp_locator[];
31
32              Without OTP authentication.
33
34       Base URLs of testing ISDS instance
35           isds_testing_locator
36                  extern const char isds_testing_locator[];
37
38              Without client certificate authentication.
39
40           isds_cert_testing_locator
41                  extern const char isds_cert_testing_locator[];
42
43              With client certificate authentication.
44
45           isds_otp_testing_locator
46                  extern const char isds_otp_testing_locator[];
47
48              Without OTP authentication.
49

DATA TYPES

51   struct isds_ctx
52           struct isds_ctx;
53
54       Context for specific ISDS box.
55
56   isds_error
57           typedef enum isds_error;
58
59       Error code. Known values:
60
61       IE_SUCCESS
62           No error. Numeric value 0.
63
64       IE_ERROR
65           Unspecified error.
66
67       IE_NOTSUP
68           Operation is not supported.
69
70       IE_INVAL
71           Invalid value.
72
73       IE_INVALID_CONTEXT
74           The context is not valid.
75
76       IE_NOT_LOGGED_IN
77           The context has not been logged in.
78
79       IE_CONNECTION_CLOSED
80           Network connection has been closed.
81
82       IE_TIMED_OUT
83           Time limit for network operation exceeded.
84
85       IE_NONEXIST
86           Requested entity doesn't exist.
87
88       IE_NOMEM
89           Not enough memory.
90
91       IE_NETWORK
92           Network error.
93
94       IE_HTTP
95           Error on HTTP level.
96
97       IE_SOAP
98           Error on SOAP level.
99
100       IE_XML
101           Error on XML level.
102
103       IE_ISDS
104           Problem with ISDS server.
105
106       IE_ENUM
107           Invalid enumeration value.
108
109       IE_DATE
110           Invalid date value.
111
112       IE_TOO_BIG
113           Value is too big.
114
115       IE_TOO_SMALL
116           Value is too small.
117
118       IE_NOTUNIQ
119           Value is not unique.
120
121       IE_NOTEQUAL
122           Compared values are not equal.
123
124       IE_PARTIAL_SUCCESS
125           Operation on a vector succeeded for some values but failed for oth‐
126           ers.
127
128       IE_ABORTED
129           Operation was aborted by application request.
130
131       IE_SECURITY
132           Security requirements were not satisfied.
133
134   isds_log_level
135           typedef enum isds_log_level;
136
137       Log level. Know values:
138
139       ILL_NONE
140           0
141
142       ILL_CRIT
143           10
144
145       ILL_ERR
146           20
147
148       ILL_WARNING
149           30
150
151       ILL_INFO
152           40
153
154       ILL_DEBUG
155           50
156
157       ILL_ALL
158           100
159
160   isds_log_facility
161           typedef enum isds_log_facility;
162
163       Log facility. Know values:
164
165       ILF_NONE
166           0x0
167
168       ILF_HTTP
169           0x1
170
171       ILF_SOAP
172           0x2
173
174       ILF_ISDS
175           0x4
176
177       ILF_FILE
178           0x8
179
180       ILF_SEC
181           0x10
182
183       ILF_XML
184           0x20
185
186       ILF_ALL
187           0xFF
188
189   isds_option
190           typedef enum isds_option;
191
192       libdatovka option identifiers. Known values:
193
194       IOPT_TLS_VERIFY_SERVER
195           Option type is _Bool. Whether to verify  server  identity.  Default
196           value is true.
197
198       IOPT_TLS_CA_FILE
199           Option type is char *. Option value is a file name with certificate
200           authority certificates. Default value depends on used cryptographic
201           library.
202
203       IOPT_TLS_CA_DIRECTORY
204           Option type is char *, Option value is a directory with certificate
205           authority certificates. Default value depends on used cryptographic
206           library.
207
208       IOPT_TLS_CRL_FILE
209           Option  type is char *. Option value is a file name with certificat
210           revocation list in PEM format. Default value depends on used  cryp‐
211           tographic library.
212
213       IOPT_NORMALIZE_MIME_TYPE
214           Optiona  type  is  _Bool.  Whether  to  normalize MIME type values.
215           Default value is false.
216
217   isds_tls_option
218           typedef enum isds_tls_option;
219
220
221           Warning
222           This type is deprecated.
223
224       TLS libdatovka option identifiers. Known values:
225
226       ITLS_VERIFY_SERVER
227           Option type is _Bool. Whether to verify server identity.
228
229       ITLS_CA_FILE
230           Option type is char *. Option value is a file name with certificate
231           authority certificates.
232
233       ITLS_CA_DIRECTORY
234           Option  type  is char *. Option value is a directory name with cer‐
235           tificate authority certificates.
236
237       ITLS_CRL_FILE
238           Option type is char *. Option value is a file name with certificate
239           revocation list in PEM format.
240
241   isds_pki_format
242           typedef enum isds_pki_format;
243
244       Cryptographic material encoding. Known values:
245
246       PKI_FORMAT_PEM
247           PEM format.
248
249       PKI_FORMAT_DER
250           DER format.
251
252       PKI_FORMAT_ENG
253           The material is stored in a cryptographic engine.
254
255   struct isds_pki_credentials
256           struct isds_pki_credentials;
257
258       This  structure  holds public key infrastructure cryptographic material
259       to authenticate a client. Members are:
260
261       char *engine;
262           String identifier of cryptographic engine  to  use  (where  key  is
263           stored). Use NULL for no engine.
264
265       isds_pki_format certificate_format;
266           Certificate format.
267
268       char *certificate;
269           A  path to client certificate, or a certificate nickname in case of
270           NSS as curl back-end, or key slot identifier  inside  cryptographic
271           engine.  Some  cryptographinc engines can pair certificate with key
272           automatically (NULL value).
273
274       isds_pki_format key_format;
275           Private key format.
276
277       char *key;
278           A path to client private key, or key identifier in case  an  engine
279           is used.
280
281       char *passphrase;
282           Zero terminated string with password for decrypting private key, or
283           engine PIN. Use NULL for no pass-phrase or to let the engine to ask
284           for it.
285
286   isds_otp_method
287           typedef enum isds_otp_method;
288
289       One-time password authentication method. Known values:
290
291       OTP_HMAC
292           HMAC-based OTP method.
293
294       OTP_TIME
295           Time-based OTP method.
296
297   isds_otp_resolution
298           typedef enum isds_otp_resolution;
299
300       One-time password authentication resolution. Known values:
301
302       OTP_RESOLUTION_SUCCESS
303           Authentication succeded.
304
305       OTP_RESOLUTION_UNKNOWN
306           Status is unkown.
307
308       OTP_RESOLUTION_BAD_AUTHENTICATION
309           Bad log-in. You can retry to log in.
310
311       OTP_RESOLUTION_ACCESS_BLOCKED
312           Access  blocked  for  60 minutes. (Because a brute force attack was
313           detected.)
314
315       OTP_RESOLUTION_PASSWORD_EXPIRED
316           Password has expired.
317
318               Note
319               It's not clear which password expired: OTP or regular password?
320
321       OTP_RESOLUTION_TOO_FAST
322           OTP cannot be sent repeatedly at this rate. (Minimal delay  depends
323           on TOTP window setting.)
324
325       OTP_RESOLUTION_UNAUTHORIZED
326           User name is not allowed to access requested URI.
327
328       OTP_RESOLUTION_TOTP_SENT
329           OTP has been generated and sent by the ISDS to the user.
330
331       OTP_RESOLUTION_TOTP_NOT_SENT
332           OTP could not been sent by the ISDS. Retry later.
333
334   struct isds_otp
335           struct isds_otp;
336
337       This structure holds one-time password when authenticating a client and
338       resolution of the authentication.
339
340       Input members are:
341
342       isds_otp_method method;
343           Select OTP method to use.
344
345       char *otp_code;
346           One-time password to use. Pass NULL, if you  do  not  know  it  yet
347           (e.g.   in  case of first phase of time-based OTP authentication to
348           request new code from ISDS.)
349
350       Output members are:
351
352       isds_otp_resolution resolution;
353           Fine-grade resolution of this OTP authentication attempt.
354
355   isds_DbType
356           typedef enum isds_DbType;
357
358       Box type. It classifies box owner by his legal status. Known values:
359
360       DBTYPE_OVM_MAIN
361           This is a special value  for  isds_find_box_by_fulltext.  It's  not
362           accepted by any other services.
363
364       DBTYPE_SYSTEM
365           This  is  a  special value for sender of messages sent by the ISDS.
366           You can find it only in incomming messages. It's  not  accepted  by
367           any other services.
368
369       DBTYPE_OVM
370           Standard government (state or municipality or similar) office.
371
372       DBTYPE_OVM_NOTAR
373           Notary (stopped being used, replaced with OVM_PFO).
374
375       DBTYPE_OVM_EXEKUT
376           Executor (stopped being used, replaced with OVM_PFO).
377
378       DBTYPE_OVM_REQ
379           Subsidiary  office  with OVM (governing) status assigned on request
380           (section 6 and 7 of the act).
381
382       DBTYPE_OVM_FO
383           Natural person with OVM status (without identification number).
384
385       DBTYPE_OVM_PFO
386           Natural person in business with OVM status (e.g. notary  or  execu‐
387           tor).
388
389       DBTYPE_OVM_PO
390           Juridical  person  with OVM status (arisen from previously existing
391           PO or PO_REQ).
392
393       DBTYPE_PO
394           Standard commercial organization (listed in trade registry).
395
396       DBTYPE_PO_ZAK
397           Other organization founded by an act (stopped being used,  replaced
398           with PO).
399
400       DBTYPE_PO_REQ
401           An organization with a box assigned on its request.
402
403       DBTYPE_PFO
404           Person in business.
405
406       DBTYPE_PFO_ADVOK
407           Lawyer.
408
409       DBTYPE_PFO_DANPOR
410           Tax consultant.
411
412       DBTYPE_PFO_INSSPR
413           Administrator of insolvency.
414
415       DBTYPE_PFO_AUDITOR
416           Statutory auditor.
417
418       DBTYPE_FO
419           Standard person.
420
421       Some  interfaces  refer to gross box type. These are the shortest names
422       of the identifiers.  For  example,  DBTYPE_OVM  is  a  gross  type  for
423       DB_OVM_NOTAR or DBTYPE_OVM. But not for DBTYPE_PO.
424
425   isds_DbState
426           typedef enum isds_DbState;
427
428       Box status from point of view of accessibility. Known values:
429
430       DBSTATE_ACCESSIBLE
431           The box is accessible.
432
433       DBSTATE_TEMP_INACCESSIBLE
434           The box is temporarily inaccessible (at the request of the user).
435
436       DBSTATE_NOT_YET_ACCESSIBLE
437           The box has not yet been activated.
438
439       DBSTATE_PERM_INACCESSIBLE
440           The box is permanently inaccessible.
441
442       DBSTATE_REMOVED
443           The box has been removed.
444
445       DBSTATE_TEMP_INACCESSIBLE_LAW
446           The box is temporarily inaccessible (because of the reasons enumer‐
447           ated in the law).
448
449   isds_privileges
450           typedef enum isds_privileges;
451
452       Distinct user permissions from point of view of ISDS. Instances can  be
453       bitmaps of any of these distinct values. Distinct known values are:
454
455       PRIVIL_READ_NON_PERSONAL
456           The  user  can  download  and read messages with dmPersonalDelivery
457           equaled to false.
458
459       PRIVIL_READ_ALL
460           The user can download and  read  messages  with  dmPersonalDelivery
461           equaled to true.
462
463       PRIVIL_CREATE_DM
464           The user can create and send messages, the user can download outgo‐
465           ing (sent) messages.
466
467       PRIVIL_VIEW_INFO
468           The user can list messages and read data about a message  post  and
469           delivery.
470
471       PRIVIL_SEARCH_DB
472           The user can can search for boxes.
473
474       PRIVIL_OWNER_ADM
475           The  user can administer his box (to add and remove permitted users
476           and to modify theirs permissions.)
477
478       PRIVIL_READ_VAULT
479           The user can read messages stored in the long term storage.
480
481               Note
482               This permission is not used since 2012-05.
483
484       PRIVIL_ERASE_VAULT
485           The user can delete messages from the long term storage.
486
487   isds_message_status
488           typedef enum isds_message_status;
489
490       Message status. Known values are:
491
492       MESSAGESTATE_SENT
493           The message has been put into ISDS.
494
495       MESSAGESTATE_STAMPED
496           Message was stamped by a time stamp authority.
497
498       MESSAGESTATE_INFECTED
499           The message included viruses. Infected documents have been  removed
500           from the message.
501
502       MESSAGESTATE_DELIVERED
503           The message was delivered. (dmDeliveryTime is populated.)
504
505       MESSAGESTATE_SUBSTITUTED
506           The message was delivered through fiction, dmAcceptanceTime is pop‐
507           ulated.
508
509       MESSAGESTATE_RECEIVED
510           The message was accepted  (by  user's  log-in  or  user's  explicit
511           request).  dmAcceptanceTime is populated.
512
513       MESSAGESTATE_READ
514           The message has been read by a user.
515
516       MESSAGESTATE_UNDELIVERABLE
517           The  message could not been delivered. (E.g.The recipient's box has
518           been made inaccessible meantime.)
519
520       MESSAGESTATE_REMOVED
521           The message's content was deleted.
522
523       MESSAGESTATE_IN_VAULT
524           The message is stored in the long term storage.
525
526       The values can be combined into a bit mask for some functions.  A  spe‐
527       cial MESSAGESTATE_ANY macro denotes any of the states.
528
529   isds_hash_algorithm
530           typedef enum isds_hash_algorithm;
531
532       Hash algorithm types. Known values are:
533
534       HASH_ALGORITHM_MD5
535           MD5.
536
537       HASH_ALGORITHM_SHA_1
538           SHA-1.
539
540       HASH_ALGORITHM_SHA_224
541           SHA-224.
542
543       HASH_ALGORITHM_SHA_256
544           SHA-256.
545
546       HASH_ALGORITHM_SHA_384
547           SHA-384.
548
549       HASH_ALGORITHM_SHA_512
550           SHA-256.
551
552   isds_buffer_strategy
553           typedef enum isds_buffer_strategy;
554
555       Buffer  storage strategy. This type defines how a function should embed
556       application provided buffer into raw element of output structure. Known
557       values are:
558
559       BUFFER_DONT_STORE
560           Don't fill raw member.
561
562       BUFFER_COPY
563           Copy buffer content into newly allocated raw member.
564
565       BUFFER_MOVE
566           Copy   pointer.  Leave  deallocation  to  structure  destructor  (‐
567           isds_*_free()).
568
569   struct isds_hash
570           struct isds_hash;
571
572       This is a hash value storage. Members are:
573
574       isds_hash_algorithm algorithm;
575           Hash algorithm.
576
577       size_t length;
578           Hash value length in bytes.
579
580       void *value;
581           Hash value as a byte stream.
582
583   struct isds_PersonName
584           struct isds_PersonName;
585
586       Name of a person. Members are:
587
588       char *pnFirstName;
589           First name.
590
591       char *pnMiddleName;
592           Middle name.
593
594       char *pnLastName;
595           Current last name.
596
597       char *pnLastNameAtBirth;
598           Last name at birth.
599
600   struct isds_BirthInfo
601           struct isds_BirthInfo;
602
603       Date and place of a birth. Members are:
604
605       struct tm *biDate;
606           Date of birth in local time  at  the  birth  place.  Only  tm_year,
607           tm_mon  and tm_mday members of the struct tm carry sane value. Oth‐
608           ers are undefined.
609
610       char *biCity;
611           City where a person was born.
612
613       char *biCounty;
614           Region where a person was born. This is the kind of region that  is
615           called Bezirk in German and okres in Czech.
616
617       char *biState;
618           State wher a person was born.
619
620   struct isds_Address
621           struct isds_Address;
622
623       Postal address. Members are:
624
625       char *adCity;
626           City.
627
628       char *adStreet;
629           Street.
630
631       char *adNumberInStreet;
632           Identification  of  an entrance on the street.  Číslo orientační in
633           Czech.
634
635       char *adNumberInMunicipality;
636           Identification of a building in the municipality.  Číslo popisné in
637           Czech.
638
639       char *adZipCode;
640           Postal code for mail routing.
641
642       char *adState;
643           State.
644
645   struct isds_DbOwnerInfo
646           struct isds_DbOwnerInfo;
647
648       Data about a box and his owner. NULL pointer values mean undefined val‐
649       ues. Members are:
650
651       char *dbID;
652           Box identifier. Specification limits the length to 7 characters.
653
654       isds_DbType *dbType;
655           Box type.
656
657       char *ic;
658           Identifier of the owner.
659
660       isds_PersonName *personName;
661           Name of a person owning the box.
662
663       char *firmName;
664           Name of a firm owning the box.
665
666       isds_BirthInfo *birthInfo;
667           Birth details of the person.
668
669       isds_Address *address;
670           Postal address of the owner.
671
672       char *nationality;
673           Nationality of the owner.
674
675       char *email;
676           E-mail addres of the owner.
677
678       char *telNumber;
679           Telephone number of the owner.
680
681       char *identifier;
682           External box identifier for data provider (OVM, PO, maybe  PFO  box
683           types.) Specification limits the length to 20 characters.
684
685       char *registryCode;
686           PFO  external  registry  code. Specification limits the length to 5
687           characters.
688
689       long int *dbState;
690           Box state. 1 means the box is active.
691
692               Note
693               The type is long  int  because  specification  declares  it  as
694               xsd:integer.
695
696               Note
697               TODO: enum?
698
699       _Bool *dbEffectiveOVM;
700           The Box has OVM role (section 5a of the act).
701
702       _Bool *dbOpenAddressing;
703           This non-OVM box is free to receive messages from anybody.
704
705   isds_UserType
706           typedef enum isds_UserType;
707
708       User type. Known values are:
709
710       USERTYPE_PRIMARY
711           Owner of the box.
712
713       USERTYPE_ENTRUSTED
714           User with limited access to the box.
715
716       USERTYPE_ADMINISTRATOR
717           User who can manage USERTYPE_ENTRUSTED users.
718
719       USERTYPE_OFFICIAL
720           ???
721
722       USERTYPE_OFFICIAL_CERT
723           ???
724
725       USERTYPE_LIQUIDATOR
726           Company liquidator.
727
728       USERTYPE_RECEIVER
729           Company receiver.
730
731       USERTYPE_GUARDIAN
732           Legal guardian.
733
734   struct isds_DbUserInfo
735           struct isds_DbUserInfo;
736
737       Data  about  a user. NULL pointer values mean undefined values. Members
738       are:
739
740       char *userID;
741           User identifier. Specification limits the length from 6 to 12 char‐
742           acters.
743
744       isds_UserType *userType;
745           User type.
746
747       long int *userPrivils;
748           Set of user permissions.
749
750       isds_PersonName *personName;
751           Name of the user.
752
753       isds_Address *address;
754           Postal address of the user.
755
756       struct tm *biDate;
757           Date  of birth in local time. Only tm_year, tm_mon and tm_mday mem‐
758           bers of the struct tm carry sane value. Others are undefined.
759
760       char *ic;
761           Identifier a supervising firm. Specification limits the length to 8
762           characters.
763
764       char *firmName;
765           Name  of a supervising firm. Specification limits the length to 100
766           characters.
767
768       char *caStreet;
769           Contact address. Street and number.
770
771       char *caCity;
772           Czech city of the contact address.
773
774       char *caZipCode;
775           Postal code of the contact address.
776
777       char *caState;
778           Abbreviated country of contact address. This value is optional  and
779           implicit meaning is CZ.
780
781   isds_event_type
782           typedef enum isds_event_type;
783
784       Message event type. Known values are:
785
786       EVENT_UNKNOWN
787           Event uknown to this library.
788
789       EVENT_ACCEPTED_BY_RECIPIENT
790           Message has been delivered and accepted by recipient action.
791
792       EVENT_ACCEPTED_BY_FICTION
793           Message  has  been delivered, acceptance period timed out, the mes‐
794           sage is considered accepted.
795
796       EVENT_ACCEPTED_BY_FICTION_NO_USER
797           Message has been delivered, acceptance  period  timed  out  because
798           there was no user who could accept the message.
799
800       EVENT_UNDELIVERABLE
801           Recipient box was made inaccessible, thus the message is undeliver‐
802           able.
803
804       EVENT_COMMERCIAL_ACCEPTED
805           Recipient confirmed acceptance of this commercial message.
806
807       EVENT_ENTERED_SYSTEM
808           The message entered the ISDSsystem, i.e.  it has been just sent  by
809           a sender.
810
811       EVENT_DELIVERED
812           The message has been delivered into recipient's box.
813
814       EVENT_PRIMARY_LOGIN
815           Primary user logged into recipent's box.
816
817       EVENT_ENTRUSTED_LOGIN
818           Entrusted user with capability to read logged into recipient's box.
819
820       EVENT_SYSCERT_LOGIN
821           An  application  authenticated  by  system  certificate logged into
822           recipient's box.
823
824   struct isds_event
825           struct isds_event;
826
827       An event that happened in a message life.  All  members  are  optional.
828       Members are:
829
830       struct timeval *time;
831           When the event occurred.
832
833       isds_event_type *type;
834           Type of the envent.
835
836       charr *description;
837           Human-readable  event  description  generated  by  the ISDS system.
838           (Very probably in Czech language).
839
840   struct isds_envelope
841           struct isds_envelope;
842
843       Message envelope. These are the metadata about a message. It does  con‐
844       tain the message documents.
845
846       Be  ware  that  the string length constraints are forced only on output
847       members transmitted to the ISDS. The other direction (downloading  from
848       the ISDS) can break these rules. It should not happen, but nobody knows
849       how much incompatible new version of the ISDS protocol will be. This is
850       the gold Internet rule: be strict on what you send, be tolerant on what
851       you receive.
852
853       Following members apply to incoming messages only:
854
855       char *dmID;
856           Message identifier. Maximal length is 20 characters.
857
858       char *dbIDSender;
859           Box identifier of the sender. Special value aaaaaaa means the  mes‐
860           sage  was  sent  by  the  ISDS system. Not by another user. Maximal
861           length is 7 characters.
862
863       char *dmSender;
864           Sender's name. Maximal length is 100 characters.
865
866       char *dmSenderAddress;
867           Postal address of the sender. Maximal length is 100 characters.
868
869       long int *dmSenderType;
870           Gross box type of the sender. You can use isds_DbType to  enumarate
871           some  known box types. This is a generic integer because the proto‐
872           col keeps the value unconstrained and the library must support  any
873           syntactically correct value.
874
875       char *dmRecipient;
876           Recipient's name. Maximal length is 100 characters.
877
878       char *dmRecipientAddress;
879           Postal address of the recipient. Maximal length is 100 characters.
880
881       _Bool *dmAmbiguousRecipient;
882           The recipient has OVM role.
883
884       Following  members are assigned by the ISDS in different phases of mes‐
885       sage life cycle:
886
887       unsigned long int *dmOrdinal;
888           Ordinal number in list of incoming/outgoing messages.
889
890       isds_message_status *dmMessageStatus;
891           Message state.
892
893       long int *dmAttachmentSize;
894           Size of message documents in kilobytes. The value is rounded.
895
896       struct timeval *dmDeliveryTime;
897           The time of delivering the message into recipient's box. It will be
898           NULL, if the message has not been delivered yet.
899
900       struct timeval *dmAcceptanceTime;
901           The  time  of acceptancing the message by the recipient. It will be
902           NULL, if message has not been accepted yet.
903
904       struct isds_hash *hash;
905           The message digest. This is a  hash  of  a  substring  representing
906           isds:dmDM  XML subtree. You can use isds_compute_message_hash func‐
907           tion to compute a hash of the message and then compare  it  against
908           this structure member using isds_hash_cmp function.
909
910       void *timestamp;
911           This is a binary image of a qualified time stamp of the hash value.
912           The time stamp is provided by the ISDS system. Messages  that  have
913           not yet been stamped will have this value NULL.
914
915       size_t timestamp_length;
916           Length of the timestamp value in bytes.
917
918       struct isds_list *events;
919           Events  the message passed trough. It's a list of isds_event struc‐
920           tures.
921
922       Following members apply to both outgoing and incoming messages:
923
924       char *dmSenderOrgUnit;
925           Sender's organisation unit as a string. This is optional.
926
927       long int *dmSenderOrgUnitNum;
928           Sender's organisation unit as a number. This is optional.
929
930       char *dbIDRecipient;
931           Recipent's box identifier. This is mandatory. Maximal length  is  7
932           characters.
933
934       char *dmRecipientOrgUnit;
935           Recipient's organisation unit as a string. This is optional.
936
937       long int *dmRecipientOrgUnitNum;
938           Recipent's organisation unit of as a number. This is optional.
939
940       char *dmToHands;
941           A person in recipient's organisation. This is optional.
942
943       char *dmAnnotation;
944           A subject (title) of the message. Maximal length is 255 characters.
945
946       char *dmRecipientRefNumber;
947           Czech:  číslo jednací příjemce. This is optional. Maximal length is
948           50 characters.
949
950       char *dmSenderRefNumber;
951           Czech: číslo jednací odesílatele. This is optional. Maximal  length
952           is 50 chars.
953
954       char *dmRecipientIdent;
955           Czech: spisová značka příjemce. This is optional. Maximal length is
956           50 characters.
957
958       char *dmSenderIdent;
959           Czech: spisová značka odesílatele This is optional. Maximal  length
960           is 50 chars.
961
962       Following  five members constitue a reference to an item from the Czech
963       Act Collection. The human-readable reference looks  like  Point  (Para‐
964       graph)  §  Section  Law/Year Coll.  The memebers apply to both incoming
965       and outgoing messages:
966
967       long int *dmLegalTitleLaw;
968           A number of an act mandating the authority.
969
970       long int *dmLegalTitleYear;
971           A year of issuing the act mandating the authority.
972
973       char *dmLegalTitleSect;
974           A section of the act mandating the authority. Czech: paragraf.
975
976       char *dmLegalTitlePar;
977           A paragraph of the act mandating the authority. Czech: odstavec.
978
979       char *dmLegalTitlePoint;
980           A point of the act mandating the authority. Czech: písmeno.
981
982       Other incoming/outgoing message members:
983
984       _Bool *dmPersonalDelivery;
985           If true, only person with higher privileges can read this message.
986
987       _Bool *dmAllowSubstDelivery;
988           Allow delivery through fiction.  I.e.  Even if  the  recipient  did
989           not read this message, the message is considered as delivered after
990           (currently) 10 days. This is called delivery through fiction. Oonly
991           OVM dbType sender can set it.
992
993       char *dmType;
994           Message type (commercial subtypes or government message).
995
996           Input values (when sending the message):
997
998           "I"
999               A  commercial  message offering paying the response (initiatory
1000               message). It's necessary to define dmSenderRefNumber member.
1001
1002           "K"
1003               A commercial message paid by the sender.
1004
1005           "O"
1006               A commercial response paid by the sender of a  initiatory  mes‐
1007               sage. It's necessary to copy a value from the dmSenderRefNumber
1008               of the initiatory message to the dmRecipientRefNumber  of  this
1009               message.
1010
1011           "V"
1012               A noncommercial government message. This is the default meaning
1013               if the value is undefined while sending a message.
1014
1015           Output values (when retrieving the message):
1016
1017           "A"
1018               This is a subsidized initiatory commercial  message  which  can
1019               pay a response.
1020
1021           "B"
1022               This  is  a  subsidized initiatory commercial message which has
1023               already paid the response.
1024
1025           "C"
1026               This is a subsidized initiatory commercial  message  where  the
1027               response offer has expired.
1028
1029           "D"
1030               This is an externally subsidized commercial messsage.
1031
1032           "E"
1033               This is a commercial message prepaid by a stamp.
1034
1035           "G"
1036               This is a commerical message paid by a sponsor.
1037
1038           "I"
1039               See the input values.
1040
1041           "K"
1042               See the input values.
1043
1044           "O"
1045               See the input values.
1046
1047           "V"
1048               See the input values.
1049
1050           "X"
1051               This  is  an  initiatory  commercial message where the response
1052               offer has expired.
1053
1054           "Y"
1055               This is an initiatory commercial message which has already paid
1056               the response.
1057
1058           "Z"
1059               This is limitedly subsidized commercial message.
1060
1061           Length  of  the value is exactly 1 UTF-8 character if defined. That
1062           means it's still zero-terminated character string.
1063
1064       Following members apply to outgoing messages only:
1065
1066       _Bool *dmOVM;
1067           OVM sending mode. Non-OVM dbType  boxes  that  have  dbEffectiveOVM
1068           equaled  to  true  MUST  select  between  true (OVM mode) and false
1069           (non-OVM mode). Otherwise the value is  optional  and  the  default
1070           value is true.
1071
1072       _Bool *dmPublishOwnID;
1073           To  allow to reveal sender's login name. The name will be available
1074           to the  recipient  through  isds_get_message_sender  function.  The
1075           sender's  box  type  and  identifier will be always available. This
1076           feature exists because more users can have access to  one  box  and
1077           the  recipient  could  not  tell  who was the sender. This value is
1078           optional. Default value is false.
1079
1080   isds_FileMetaType
1081           typedef enum isds_FileMetaType;
1082
1083       Document type from point fo view of hierarchy of documents  in  a  mes‐
1084       sage. Known values are:
1085
1086       FILEMETATYPE_MAIN
1087           Main document. There should be exactly one document of this type in
1088           a message.
1089
1090       FILEMETATYPE_ENCLOSURE
1091           An appendix. If a message has more documents, generic-purpose docu‐
1092           ments other than the main one should have this type.
1093
1094       FILEMETATYPE_SIGNATURE
1095           Digital signature. This document is a signature of another document
1096           in the message.
1097
1098       FILEMETATYPE_META
1099           XML document for electronic document information system,  elektron‐
1100           ická spisová služba (ESS) in Czech, purpose.
1101
1102   struct isds_document
1103           struct isds_document;
1104
1105       A message document. Members are:
1106
1107       _Bool is_xml;
1108           True if the document is an ISDS XML document. False if the document
1109           is an ISDS binary document.
1110
1111       xmlNodePtr xml_node_list;
1112           XML node-set presenting the XML document content. This is a pointer
1113           to  first  XML  node  of  the  XML representation of the message as
1114           stored in xml member of isds_message structure.  Use  children  and
1115           next members to walk through the document. See libxml2 library doc‐
1116           umentation for more details. The xml_node_list will be NULL if  the
1117           document is empty. It's valid only if the is_xml is true.
1118
1119       void *data;
1120           A  binary  document  content.  The  encoding  and format depends on
1121           dmMimeType member value. This is valid only if the is_xml is false.
1122
1123       size_t data_length;
1124           Length of the data buffer in bytes. It's valid only if  the  is_xml
1125           is false.
1126
1127       char *dmMimeType;
1128           MIME type of document. This member is mandatory.
1129
1130       isds_FileMetaType dmFileMetaType;
1131           Document type to create document hierarchy inside a message.
1132
1133       char *dmFileGuid;
1134           Message-local document identifier. It can be used as a key to refer
1135           to this document by dmUpFileGuid member from a different  document.
1136           This is optional.
1137
1138       char *dmUpFileGuid;
1139           A  reference to upper document identifier stored in dmFileGuid mem‐
1140           ber of different document.  You  can  use  isds_find_document_by_id
1141           function to locate the upper document. This value is optional.
1142
1143       char *dmFileDescr;
1144           Document name (title).  E.g.  a file name. This value is mandatory.
1145
1146       char *dmFormat;
1147           A reference to XML format definition that explains how to interpret
1148           the XML document.  E.g.  a URL to an  XML  schema.  This  value  is
1149           optional.
1150
1151   struct isds_box_state_period
1152           struct isds_box_state_period;
1153
1154       A box state valid in the time range. Members are:
1155
1156       struct timeval *from;
1157           Time range beginning.
1158
1159       struct timeval *to;
1160           Time range end.
1161
1162       long int dbState;
1163           Box  state.   1  means the box is accessible. Other values mean the
1164           box is inaccessible. You can use isds_DbState enum to identify some
1165           states.
1166

FUNCTIONS

1168       ·
1169
1170           const char *isds_strerror(const isds_error error);
1171
1172       ·
1173
1174           struct isds_ctx *isds_ctx_create(void);
1175

SEE ALSO

1177       libcurl(3), libdatovka(3), time.h(0p)
1178

AUTHORS

1180       CZ.NIC, z. s. p. o.
1181           Maintains libdatovka. Has been contributing to libisds.
1182
1183       Petr Písař
1184           He has written libisds.
1185
1186
1187
1188[FIXME: source]                   02/02/2021               ISDS.H.LIBDATOVK(3)
Impressum