ISDS.H.LIBDATOVK(3)

๐ŸŒธ NAME ๐ŸŒธ

Okay bestie, this is the manual page for ISDS.H.LIBDATOVK(3) โ€” the isds.h.libdatovka API definition for libdatovka, from the Manual for Libdatovka. ๐Ÿ’– Itโ€™s giving โ€œheader file that declares the interface for the libdatovka library,โ€ and weโ€™re gonna get into every last constant and type. No cap.

โœจ SYNOPSIS โœจ

#include <libdatovka/isds.h>

๐Ÿ’œ DESCRIPTION ๐Ÿ’œ

This header file declares interface for the libdatovka library. Thatโ€™s the whole assignment, bestie โ€” it declares the interface. โœจ


๐ŸŽ€ CONSTANTS ๐ŸŽ€

๐Ÿ—บ๏ธ Service locators

Addresses of known ISDS servers. These are the base URLs, and yes, there are production ones and testing ones. ๐Ÿ’…

๐Ÿญ Base URLs of production ISDS instance

  • isds_locator โ€” extern const char isds_locator[]; โ€” without client certificate authentication.
  • isds_cert_locator โ€” extern const char isds_cert_locator[]; โ€” with client certificate authentication.
  • isds_vodz_locator โ€” extern const char isds_vodz_locator[]; โ€” high-volume data message locator without client certificate authentication.
  • isds_vodz_cert_locator โ€” extern const char isds_vodz_cert_locator[]; โ€” high-volume data message locator with client certificate authentication.
  • isds_otp_locator โ€” extern const char isds_otp_locator[]; โ€” with OTP authentication.
  • isds_mep_locator โ€” extern const char isds_mep_locator[]; โ€” with MEP authentication.

๐Ÿงช Base URLs of testing ISDS instance

  • isds_testing_locator โ€” extern const char isds_testing_locator[]; โ€” without client certificate authentication.
  • isds_cert_testing_locator โ€” extern const char isds_cert_testing_locator[]; โ€” with client certificate authentication.
  • isds_vodz_testing_locator โ€” extern const char isds_vodz_testing_locator[]; โ€” high-volume data message locator without client certificate authentication.
  • isds_vodz_cert_testing_locator โ€” extern const char isds_vodz_cert_testing_locator[]; โ€” high-volume data message locator with client certificate authentication.
  • isds_otp_testing_locator โ€” extern const char isds_otp_testing_locator[]; โ€” with OTP authentication.
  • isds_mep_testing_locator โ€” extern const char isds_mep_testing_locator[]; โ€” with MEP authentication.

๐Ÿฆ‹ DATA TYPES ๐Ÿฆ‹

๐Ÿงธ struct isds_ctx

struct isds_ctx;

Context for specific ISDS box.

๐Ÿ’ฅ isds_error

typedef enum isds_error;

Error code. Known values:

  • IE_SUCCESS โ€” no error. Numeric value 0.
  • IE_ERROR โ€” unspecified error.
  • IE_NOTSUP โ€” operation is not supported.
  • IE_INVAL โ€” invalid value.
  • IE_INVALID_CONTEXT โ€” the context is not valid.
  • IE_NOT_LOGGED_IN โ€” the context has not been logged in.
  • IE_CONNECTION_CLOSED โ€” network connection has been closed.
  • IE_TIMED_OUT โ€” time limit for network operation exceeded.
  • IE_NONEXIST โ€” requested entity doesnโ€™t exist.
  • IE_NOMEM โ€” not enough memory.
  • IE_NETWORK โ€” network error.
  • IE_HTTP โ€” error on HTTP level.
  • IE_SOAP โ€” error on SOAP level.
  • IE_XML โ€” error on XML level.
  • IE_ISDS โ€” problem with ISDS server.
  • IE_ENUM โ€” invalid enumeration value.
  • IE_DATE โ€” invalid date value.
  • IE_TOO_BIG โ€” value is too big.
  • IE_TOO_SMALL โ€” value is too small.
  • IE_NOTUNIQ โ€” value is not unique.
  • IE_NOTEQUAL โ€” compared values are not equal.
  • IE_PARTIAL_SUCCESS โ€” operation on a vector succeeded for some values but failed for others.
  • IE_ABORTED โ€” operation was aborted by application request.
  • IE_SECURITY โ€” security requirements were not satisfied.

๐Ÿ“Š isds_log_level

typedef enum isds_log_level;

Log level. Known values:

  • ILL_NONE โ€” 0
  • ILL_CRIT โ€” 10
  • ILL_ERR โ€” 20
  • ILL_WARNING โ€” 30
  • ILL_INFO โ€” 40
  • ILL_DEBUG โ€” 50
  • ILL_ALL โ€” 100

๐ŸŽš๏ธ isds_log_facility

typedef enum isds_log_facility;

Log facility. Known values:

  • ILF_NONE โ€” 0x0
  • ILF_HTTP โ€” 0x1
  • ILF_SOAP โ€” 0x2
  • ILF_ISDS โ€” 0x4
  • ILF_FILE โ€” 0x8
  • ILF_SEC โ€” 0x10
  • ILF_XML โ€” 0x20
  • ILF_ALL โ€” 0xFF

โš™๏ธ isds_option

typedef enum isds_option;

libdatovka option identifiers. Known values:

  • IOPT_TLS_VERIFY_SERVER โ€” option type is _Bool. Whether to verify server identity. Default value is true.
  • IOPT_TLS_CA_FILE โ€” option type is char *. Option value is a file name with certificate authority certificates. Default value depends on used cryptographic library.
  • IOPT_TLS_CA_DIRECTORY โ€” option type is char *. Option value is a directory with certificate authority certificates. Default value depends on used cryptographic library.
  • IOPT_TLS_CRL_FILE โ€” option type is char *. Option value is a file name with certificate revocation list in PEM format. Default value depends on used cryptographic library.
  • IOPT_NORMALIZE_MIME_TYPE โ€” option type is _Bool. Whether to normalize MIME type values. Default value is false.

๐Ÿงจ isds_tls_option

typedef enum isds_tls_option;
โš ๏ธ Warning: This type is deprecated.

TLS libdatovka option identifiers. Known values:

  • ITLS_VERIFY_SERVER โ€” option type is _Bool. Whether to verify server identity.
  • ITLS_CA_FILE โ€” option type is char *. Option value is a file name with certificate authority certificates.
  • ITLS_CA_DIRECTORY โ€” option type is char *. Option value is a directory name with certificate authority certificates.
  • ITLS_CRL_FILE โ€” option type is char *. Option value is a file name with certificate revocation list in PEM format.

๐Ÿ” isds_pki_format

typedef enum isds_pki_format;

Cryptographic material encoding. Known values:

  • PKI_FORMAT_PEM โ€” PEM format.
  • PKI_FORMAT_DER โ€” DER format.
  • PKI_FORMAT_ENG โ€” the material is stored in a cryptographic engine.

๐Ÿชช struct isds_pki_credentials

struct isds_pki_credentials;

This structure holds public key infrastructure cryptographic material to authenticate a client. Members are:

  • char *engine; โ€” string identifier of cryptographic engine to use (where key is stored). Use NULL for no engine.
  • isds_pki_format certificate_format; โ€” certificate format.
  • char *certificate; โ€” a path to client certificate, or a certificate nickname in case of NSS as curl back-end, or key slot identifier inside cryptographic engine. Some cryptographic engines can pair certificate with key automatically (NULL value).
  • isds_pki_format key_format; โ€” private key format.
  • char *key; โ€” a path to client private key, or key identifier in case an engine is used.
  • char *passphrase; โ€” zero terminated string with password for decrypting private key, or engine PIN. Use NULL for no pass-phrase or to let the engine to ask for it.

๐Ÿ”‘ isds_otp_method

typedef enum isds_otp_method;

One-time password authentication method. Known values:

  • OTP_HMAC โ€” HMAC-based OTP method.
  • OTP_TIME โ€” time-based OTP method.

๐Ÿงฟ isds_otp_resolution

typedef enum isds_otp_resolution;

One-time password authentication resolution. Known values:

  • OTP_RESOLUTION_SUCCESS โ€” authentication succeeded.
  • OTP_RESOLUTION_UNKNOWN โ€” status is unknown.
  • OTP_RESOLUTION_BAD_AUTHENTICATION โ€” bad log-in. You can retry to log in.
  • OTP_RESOLUTION_ACCESS_BLOCKED โ€” access blocked for 60 minutes. (Because a brute force attack was detected.)
  • OTP_RESOLUTION_PASSWORD_EXPIRED โ€” password has expired.
๐Ÿ“ Note: Itโ€™s not clear which password expired: OTP or regular password?
  • OTP_RESOLUTION_TOO_FAST โ€” OTP cannot be sent repeatedly at this rate. (Minimal delay depends on TOTP window setting.)
  • OTP_RESOLUTION_UNAUTHORIZED โ€” user name is not allowed to access requested URI.
  • OTP_RESOLUTION_TOTP_SENT โ€” OTP has been generated and sent by the ISDS to the user.
  • OTP_RESOLUTION_TOTP_NOT_SENT โ€” OTP could not been sent by the ISDS. Retry later.

๐Ÿ“ฑ struct isds_otp

struct isds_otp;

This structure holds one-time password when authenticating a client and resolution of the authentication.

Input members are:

  • isds_otp_method method; โ€” select OTP method to use.
  • char *otp_code; โ€” one-time password to use. Pass NULL, if you do not know it yet (e.g. in case of first phase of time-based OTP authentication to request new code from ISDS.)

Output members are:

  • isds_otp_resolution resolution; โ€” fine-grade resolution of this OTP authentication attempt.

๐Ÿ“ฆ isds_DbType

typedef enum isds_DbType;

Box type. It classifies box owner by legal status. Known values:

  • DBTYPE_OVM_MAIN โ€” this is a special value for isds_find_box_by_fulltext. Itโ€™s not accepted by any other services.
  • DBTYPE_SYSTEM โ€” this is a special value for sender of messages sent by the ISDS. You can find it only in incoming messages. Itโ€™s not accepted by any other services.
  • DBTYPE_OVM โ€” standard government (state or municipality or similar) office.
  • DBTYPE_OVM_NOTAR โ€” notary (stopped being used, replaced with OVM_PFO).
  • DBTYPE_OVM_EXEKUT โ€” executor (stopped being used, replaced with OVM_PFO).
  • DBTYPE_OVM_REQ โ€” subsidiary office with OVM (governing) status assigned on request (section 6 and 7 of the act).
  • DBTYPE_OVM_FO โ€” natural person with OVM status (without identification number).
  • DBTYPE_OVM_PFO โ€” natural person in business with OVM status (e.g. notary or executor).
  • DBTYPE_OVM_PO โ€” juridical person with OVM status (arisen from previously existing PO or PO_REQ).
  • DBTYPE_PO โ€” standard commercial organization (listed in trade registry).
  • DBTYPE_PO_ZAK โ€” other organization founded by an act (stopped being used, replaced with PO).
  • DBTYPE_PO_REQ โ€” an organization with a box assigned on its request.
  • DBTYPE_PFO โ€” person in business.
  • DBTYPE_PFO_ADVOK โ€” lawyer.
  • DBTYPE_PFO_DANPOR โ€” tax consultant.
  • DBTYPE_PFO_INSSPR โ€” administrator of insolvency (stopped being used, replaced with OVM_PFO).
  • DBTYPE_PFO_AUDITOR โ€” statutory auditor.
  • DBTYPE_PFO_ZNALEC โ€” expert witness.
  • DBTYPE_PFO_TLUMOCNIK โ€” sworn translator.
  • DBTYPE_PFO_ARCH โ€” architect.
  • DBTYPE_PFO_AIAT โ€” authorised engineer / technician.
  • DBTYPE_PFO_AZI โ€” authorised geodetics engineer.
  • DBTYPE_PFO_REQ โ€” person in business on its request.
  • DBTYPE_FO โ€” standard person.

Some interfaces refer to gross box type. These are the shortest names of the identifiers. So like, for example, DBTYPE_OVM is a gross type for DB_OVM_NOTAR or DBTYPE_OVM. But not for DBTYPE_PO. iykyk ๐Ÿ’…


isds_DbState

typedef enum isds_DbState;

Box status from the point of view of accessibility. The known values are:

  • DBSTATE_ACCESSIBLE โ€” the box is accessible, we're so back ๐ŸŽ‰
  • DBSTATE_TEMP_INACCESSIBLE โ€” the box is temporarily inaccessible (at the request of the user).
  • DBSTATE_NOT_YET_ACCESSIBLE โ€” the box has not yet been activated. it's giving "not born yet" energy.
  • DBSTATE_PERM_INACCESSIBLE โ€” the box is permanently inaccessible. rip ๐Ÿ˜ญ
  • DBSTATE_REMOVED โ€” the box has been removed. gone gone.
  • DBSTATE_TEMP_INACCESSIBLE_LAW โ€” the box is temporarily inaccessible (because of the reasons enumerated in the law). the law said no ๐Ÿ’€

isds_privileges

typedef enum isds_privileges;

Distinct user permissions from the point of view of ISDS. Instances can be bitmaps of any of these distinct values. The distinct known values are:

  • PRIVIL_READ_NON_PERSONAL โ€” the user can download and read messages with dmPersonalDelivery equal to false.
  • PRIVIL_READ_ALL โ€” the user can download and read messages with dmPersonalDelivery equal to true.
  • PRIVIL_CREATE_DM โ€” the user can create and send messages, and the user can download outgoing (sent) messages.
  • PRIVIL_VIEW_INFO โ€” the user can list messages and read data about a message post and delivery.
  • PRIVIL_SEARCH_DB โ€” the user can search for boxes. (the original page says "can can", we love a little typo moment ๐Ÿซถ)
  • PRIVIL_OWNER_ADM โ€” the user can administer his box (to add and remove permitted users and to modify theirs permissions.)
  • PRIVIL_READ_VAULT โ€” the user can read messages stored in the long term storage.
Note โ€” this permission is not used since 2012-05. like, retired. she's resting.
  • PRIVIL_ERASE_VAULT โ€” the user can delete messages from the long term storage.

enum isds_message_status

typedef enum isds_message_status isds_message_status;

Message status. The known values are:

  • MESSAGESTATE_SENT โ€” the message has been put into ISDS.
  • MESSAGESTATE_STAMPED โ€” the message was stamped by a time stamp authority. official โœจ
  • MESSAGESTATE_INFECTED โ€” the message included viruses. Infected documents have been removed from the message. ๐Ÿ’€๐Ÿ’€๐Ÿ’€
  • MESSAGESTATE_DELIVERED โ€” the message was delivered. (dmDeliveryTime is populated.)
  • MESSAGESTATE_SUBSTITUTED โ€” the message was delivered through fiction, dmAcceptanceTime is populated.
  • MESSAGESTATE_RECEIVED โ€” the message was accepted (by user's log-in or user's explicit request). dmAcceptanceTime is populated.
  • MESSAGESTATE_READ โ€” the message has been read by a user. seen โœ…
  • MESSAGESTATE_UNDELIVERABLE โ€” the message could not been delivered. (E.g. the recipient's box has been made inaccessible meantime.) ๐Ÿ˜ญ
  • MESSAGESTATE_REMOVED โ€” the message's content was deleted.
  • MESSAGESTATE_IN_VAULT โ€” the message is stored in the long term storage.

The values can be combined into a bit mask for some functions. A special MESSAGESTATE_ANY macro denotes any of the states. very "select all" of it ๐Ÿ’…


isds_hash_algorithm

typedef enum isds_hash_algorithm;

Hash algorithm types. The known values are:

  • HASH_ALGORITHM_MD5 โ€” MD5.
  • HASH_ALGORITHM_SHA_1 โ€” SHA-1.
  • HASH_ALGORITHM_SHA_224 โ€” SHA-224.
  • HASH_ALGORITHM_SHA_256 โ€” SHA-256.
  • HASH_ALGORITHM_SHA_384 โ€” SHA-384.
  • HASH_ALGORITHM_SHA_512 โ€” SHA-256. ๐Ÿ‘€ (yes bestie, that's literally what the page says โ€” I'm not changing it, no cap)

isds_buffer_strategy

typedef enum isds_buffer_strategy;

Buffer storage strategy. This type defines how a function should embed an application-provided buffer into the raw element of the output structure. The known values are:

  • BUFFER_DONT_STORE โ€” don't fill the raw member. we pretend it's not there ๐Ÿ™ˆ
  • BUFFER_COPY โ€” copy the buffer content into a newly allocated raw member.
  • BUFFER_MOVE โ€” copy the pointer. Leave deallocation to the structure destructor (isds_*_free()).

struct isds_hash

struct isds_hash;

This is a hash value storage. The members are:

  • isds_hash_algorithm algorithm; โ€” hash algorithm.
  • size_t length; โ€” hash value length in bytes.
  • void *value; โ€” hash value as a byte stream.

struct isds_PersonName

struct isds_PersonName;

Name of a person. The members are:

  • char *pnFirstName; โ€” first name.
  • char *pnMiddleName; โ€” middle name.
  • char *pnLastName; โ€” current last name.
  • char *pnLastNameAtBirth; โ€” last name at birth.

struct isds_BirthInfo

struct isds_BirthInfo;

Date and place of a birth. The members are:

  • struct tm *biDate; โ€” date of birth in local time at the birth place. Only the tm_year, tm_mon and tm_mday members of the struct tm carry a sane value. The others are undefined. โš ๏ธ like, do not go reading them, bestie, they're not cooked properly.
  • char *biCity; โ€” city where a person was born.
  • char *biCounty; โ€” region where a person was born. This is the kind of region that is called Bezirk in German and okres in Czech.
  • char *biState; โ€” state wher a person was born. (again: the page's spelling, not mine ๐Ÿ’œ)

struct isds_Address

struct isds_Address;

Postal address. The members are:

  • char *adCity; โ€” city.
  • char *adStreet; โ€” street.
  • char *adNumberInStreet; โ€” identification of an entrance on the street. ฤŒรญslo orientaฤnรญ in Czech.
  • char *adNumberInMunicipality; โ€” identification of a building in the municipality. ฤŒรญslo popisnรฉ in Czech.
  • char *adZipCode; โ€” postal code for mail routing. ๐Ÿ“ฎ
  • char *adState; โ€” state.

struct isds_DbOwnerInfo

struct isds_DbOwnerInfo;

Data about a box and his owner. NULL pointer values mean undefined values. The members are:

  • char *dbID; โ€” box identifier. The specification limits the length to 7 characters.
  • isds_DbType *dbType; โ€” box type.
  • char *ic; โ€” identifier of the owner.
  • isds_PersonName *personName; โ€” name of a person owning the box.
  • char *firmName; โ€” name of a firm owning the box.
  • isds_BirthInfo *birthInfo; โ€” birth details of the person.
  • isds_Address *address; โ€” postal address of the owner.
  • char *nationality; โ€” nationality of the owner.
  • char *email; โ€” e-mail addres of the owner. ๐Ÿ“ง
  • char *telNumber; โ€” telephone number of the owner.
  • char *identifier; โ€” external box identifier for data provider (OVM, PO, maybe PFO box types.) The specification limits the length to 20 characters.
  • char *registryCode; โ€” PFO external registry code. The specification limits the length to 5 characters.
  • long int *dbState; โ€” box state. 1 means the box is active.
Note โ€” the type is long int because the specification declares it as xsd:integer. Note โ€” TODO: enum? (the page said it, I'm just the messenger ๐Ÿงš)
  • _Bool *dbEffectiveOVM; โ€” the box has OVM role (section 5a of the act).
  • _Bool *dbOpenAddressing; โ€” this non-OVM box is free to receive messages from anybody. open door policy, we love to see it ๐Ÿซถ

isds_UserType

typedef enum isds_UserType;

User type. The known values are:

  • USERTYPE_PRIMARY โ€” owner of the box. main character energy ๐Ÿ‘‘
  • USERTYPE_ENTRUSTED โ€” user with limited access to the box.
  • USERTYPE_ADMINISTRATOR โ€” user who can manage USERTYPE_ENTRUSTED users.
  • USERTYPE_OFFICIAL โ€” ???
  • USERTYPE_OFFICIAL_CERT โ€” ???
  • USERTYPE_LIQUIDATOR โ€” company liquidator.
  • USERTYPE_RECEIVER โ€” company receiver.
  • USERTYPE_GUARDIAN โ€” legal guardian.

(yes, two of them are literally ??? on the page. we respect the mystery ๐Ÿ’€)


struct isds_DbUserInfo

struct isds_DbUserInfo;

Data about a user. NULL pointer values mean undefined values. The members are:

  • char *userID; โ€” user identifier. The specification limits the length from 6 to 12 characters.
  • isds_UserType *userType; โ€” user type.
  • long int *userPrivils; โ€” set of user permissions.
  • isds_PersonName *personName; โ€” name of the user.
  • isds_Address *address; โ€” postal address of the user.
  • struct tm *biDate; โ€” date of birth in local time. Only the tm_year, tm_mon and tm_mday members of the struct tm carry a sane value. The others are undefined. โš ๏ธ
  • char *ic; โ€” identifier a supervising firm. The specification limits the length to 8 characters.
  • char *firmName; โ€” name of a supervising firm. The specification limits the length to 100 characters.
  • char *caStreet; โ€” contact address. Street and number.
  • char *caCity; โ€” Czech city of the contact address.
  • char *caZipCode; โ€” postal code of the contact address.
  • char *caState; โ€” abbreviated country of contact address. This value is optional and the implicit meaning is CZ.

isds_event_type

typedef enum isds_event_type;

Message event type. The known values are:

  • EVENT_UNKNOWN โ€” event unknown to this library. mystery era ๐Ÿ•ต๏ธ
  • EVENT_ACCEPTED_BY_RECIPIENT โ€” message has been delivered and accepted by recipient action.
  • EVENT_ACCEPTED_BY_FICTION โ€” message has been delivered, acceptance period timed out, the message is considered accepted.
  • EVENT_ACCEPTED_BY_FICTION_NO_USER โ€” message has been delivered, acceptance period timed out because there was no user who could accept the message.
  • EVENT_UNDELIVERABLE โ€” recipient box was made inaccessible, thus the message is undeliverable. ๐Ÿ˜ญ
  • EVENT_COMMERCIAL_ACCEPTED โ€” recipient confirmed acceptance of this commercial message. ๐Ÿ’ฐ
  • EVENT_ENTERED_SYSTEM โ€” the message entered the ISDSsystem, i.e. it has been just sent by a sender. (yes, "ISDSsystem" โ€” that's how it's written, no cap)
  • EVENT_DELIVERED โ€” the message has been delivered into recipient's box. ๐Ÿ“ฌ
  • EVENT_PRIMARY_LOGIN โ€” primary user logged into recipient's box.
  • EVENT_ENTRUSTED_LOGIN โ€” entrusted user with capability to read logged into recipient's box.
  • EVENT_SYSCERT_LOGIN โ€” an application authenticated by system certificate logged into recipient's box.

struct isds_event

struct isds_event;

An event that happened in a message's life. All members are optional. The members are:

  • struct isds_timeval *time; โ€” when the event occurred.
  • isds_event_type *type; โ€” type of the event.
  • char *description; โ€” human-readable event description generated by the ISDS system. (very probably in Czech language ๐Ÿ‡จ๐Ÿ‡ฟ)

enum isds_IdLevel_value

enum isds_IdLevel_value;

Specifies which information the sender of a data message wants to publish about his person. like, their public profile settings, basically ๐Ÿ’…

  • PUBLISH_USERTYPE โ€” publish information about the sender type. This information is always revealed to the recipient. no opting out, bestie.
  • PUBLISH_PERSONNAME โ€” publish sender's personal name.
  • PUBLISH_BIDATE โ€” publish sender's birth date.
  • PUBLISH_BICITY โ€” publish sender's birth city. This information is available only when the sender is SENDERTYPE_ENTRUSTED of a FO or PFO box.
  • PUBLISH_BICOUNTY โ€” publishes the sender's birth county ๐Ÿผ. Heads up: this info is only available when the sender is SENDERTYPE_ENTRUSTED of a FO or PFO box.
  • PUBLISH_ADCODE โ€” publishes the sender's RUIAN address code ๐Ÿก.
  • PUBLISH_FULLADDRESS โ€” publishes the sender's full address, the whole thing ๐Ÿ“ฌ.
  • PUBLISH_ROBIDENT โ€” publishes whether the sender is identified within the ROB ๐Ÿชช.

๐ŸŒธ struct isds_envelope

struct isds_envelope;

Okay so bestie, this is the message envelope ๐Ÿ’Œ โ€” it's all the metadata about a message. Like, it does contain the message documents.

โš ๏ธ Big vibe check first: those string-length constraints are only forced on output members that get transmitted to the ISDS. The other direction (downloading from the ISDS) can totally break these rules ๐Ÿ˜ญ. It shouldn't happen, but literally nobody knows how much an incompatible new version of the ISDS protocol will shake things up. This is the golden Internet rule, no cap: be strict on what you send, be tolerant on what you receive. โœจ

These members apply to incoming messages only ๐Ÿ‘‡

  • char *dmID; โ€” the message identifier. Max length is 20 characters ๐Ÿ”–.
  • char *dbIDSender; โ€” the box identifier of the sender. The special value aaaaaaa means the message was sent by the ISDS system itself, not by another user ๐Ÿ‘ป. Max length is 7 characters.
  • char *dmSender; โ€” the sender's name. Max length is 100 characters ๐Ÿ™‹.
  • char *dmSenderAddress; โ€” the sender's postal address. Max length is 100 characters ๐Ÿ“ฎ.
  • long int *dmSenderType; โ€” the gross box type of the sender. You can use isds_DbType to enumerate some known box types. It's a generic integer because the protocol keeps the value unconstrained and the library must support any syntactically correct value ๐Ÿงฉ.
  • char *dmRecipient; โ€” the recipient's name. Max length is 100 characters ๐Ÿซถ.
  • char *dmRecipientAddress; โ€” the recipient's postal address. Max length is 100 characters ๐Ÿ“ฌ.
  • _Bool *dmAmbiguousRecipient; โ€” the recipient has OVM role ๐ŸŽญ.

These members get assigned by the ISDS at different phases of the message life cycle ๐Ÿ’ซ

  • unsigned long int *dmOrdinal; โ€” the ordinal number in the list of incoming/outgoing messages ๐Ÿ”ข.
  • enum isds_message_status *dmMessageStatus; โ€” the message state ๐Ÿ“Š.
  • long int *dmAttachmentSize; โ€” size of the message documents in kilobytes. The value is rounded ๐Ÿ—‚๏ธ.
  • struct isds_timeval *dmDeliveryTime; โ€” the time the message got delivered into the recipient's box. It'll be NULL if the message hasn't been delivered yet โณ.
  • struct isds_timeval *dmAcceptanceTime; โ€” the time the recipient accepted the message. It'll be NULL if the message hasn't been accepted yet ๐ŸŒ™.
  • struct isds_hash *hash; โ€” the message digest. This is a hash of the substring representing the isds:dmDM XML subtree. You can use the isds_compute_message_hash function to compute a hash of the message and then compare it against this structure member using isds_hash_cmp ๐Ÿ”.
  • void *timestamp; โ€” this is a binary image of a qualified time stamp of the hash value. The time stamp is provided by the ISDS system. Messages that haven't been stamped yet will have this value NULL ๐Ÿ•ฐ๏ธ.
  • size_t timestamp_length; โ€” length of the timestamp value in bytes ๐Ÿ“.
  • struct isds_list *events; โ€” the events the message passed through. It's a list of isds_event structures ๐ŸŽž๏ธ.

These members apply to both outgoing and incoming messages ๐Ÿ’…

  • char *dmSenderOrgUnit; โ€” sender's organisation unit as a string. Optional ๐Ÿข.
  • long int *dmSenderOrgUnitNum; โ€” sender's organisation unit as a number. Optional ๐Ÿ”ข.
  • char *dbIDRecipient; โ€” recipient's box identifier. This one is mandatory, bestie, don't skip it ๐Ÿšจ. Max length is 7 characters.
  • char *dmRecipientOrgUnit; โ€” recipient's organisation unit as a string. Optional ๐Ÿฌ.
  • long int *dmRecipientOrgUnitNum; โ€” recipient's organisation unit as a number. Optional ๐Ÿ”ข.
  • char *dmToHands; โ€” a person in the recipient's organisation. Optional ๐Ÿ™‹โ€โ™€๏ธ.
  • char *dmAnnotation; โ€” the subject (title) of the message. Max length is 255 characters โœ๏ธ.
  • char *dmRecipientRefNumber; โ€” Czech: ฤรญslo jednacรญ pล™รญjemce. Optional. Max length is 50 characters ๐Ÿ“Ž.
  • char *dmSenderRefNumber; โ€” Czech: ฤรญslo jednacรญ odesรญlatele. Optional. Max length is 50 chars ๐Ÿ“Œ.
  • char *dmRecipientIdent; โ€” Czech: spisovรก znaฤka pล™รญjemce. Optional. Max length is 50 characters ๐Ÿ—ƒ๏ธ.
  • char *dmSenderIdent; โ€” Czech: spisovรก znaฤka odesรญlatele. Optional. Max length is 50 chars ๐Ÿ—„๏ธ.

The following five members make up a reference to an item from the Czech Act Collection ๐Ÿ‡จ๐Ÿ‡ฟ๐Ÿ“œ. The human-readable reference looks like Point (Paragraph) ยง Section Law/Year Coll. And these members apply to both incoming and outgoing messages:

  • long int *dmLegalTitleLaw; โ€” a number of an act mandating the authority โš–๏ธ.
  • long int *dmLegalTitleYear; โ€” a year of issuing the act mandating the authority ๐Ÿ“….
  • char *dmLegalTitleSect; โ€” a section of the act mandating the authority. Czech: paragraf ยง.
  • char *dmLegalTitlePar; โ€” a paragraph of the act mandating the authority. Czech: odstavec ยถ.
  • char *dmLegalTitlePoint; โ€” a point of the act mandating the authority. Czech: pรญsmeno ๐Ÿ”ค.

Other incoming/outgoing message members ๐ŸŽ€

  • _Bool *dmPersonalDelivery; โ€” if true, only a person with higher privileges can read this message ๐Ÿ™ˆ.
  • _Bool *dmAllowSubstDelivery; โ€” allow delivery through fiction. I.e. even if the recipient did not read this message, the message is considered as delivered after (currently) 10 days โฑ๏ธ. This is called delivery through fiction. Only an OVM dbType sender can set it.
  • char *dmType; โ€” message type (commercial subtypes or government message) ๐Ÿ’Œ.

Input values (when sending the message):

  • "I" โ€” a commercial message offering paying the response (initiatory message). It's necessary to define the dmSenderRefNumber member.
  • "K" โ€” a commercial message paid by the sender.
  • "O" โ€” a commercial response paid by the sender of an initiatory message. It's necessary to copy a value from the dmSenderRefNumber of the initiatory message to the dmRecipientRefNumber of this message.
  • "V" โ€” a non-commercial government message. This is the default meaning if the value is undefined while sending a message.

Output values (when retrieving the message):

  • "A" โ€” this is a subsidized initiatory commercial message which can pay a response.
  • "B" โ€” this is a subsidized initiatory commercial message which has already paid the response.
  • "C" โ€” this is a subsidized initiatory commercial message where the response offer has expired.
  • "D" โ€” this is an externally subsidized commercial message.
  • "E" โ€” this is a commercial message prepaid by a stamp.
  • "G" โ€” this is a commercial message paid by a sponsor.
  • "I" โ€” see the input values.
  • "K" โ€” see the input values.
  • "O" โ€” see the input values.
  • "V" โ€” see the input values.
  • "X" โ€” this is an initiatory commercial message where the response offer has expired.
  • "Y" โ€” this is an initiatory commercial message which has already paid the response.
  • "Z" โ€” this is a limitedly subsidized commercial message.

Length of the value is exactly 1 UTF-8 character if defined ๐Ÿ“. That means it's still a zero-terminated character string.

  • _Bool *dmVODZ; โ€” set to true when downloading lists of sent or received messages and a particular message is a high-volume data message ๐Ÿ—ƒ๏ธ.
  • long int *attsNum; โ€” set to the number of attachments when downloading lists of sent or received messages and a particular message is a high-volume data message ๐Ÿ“Ž.

These members apply to outgoing messages only ๐Ÿ“ค

  • _Bool *dmOVM; โ€” OVM sending mode. Non-OVM dbType boxes that have dbEffectiveOVM equal to true MUST select between true (OVM mode) and false (non-OVM mode) ๐Ÿšจ. Otherwise the value is optional and the default value is true.
  • _Bool *dmPublishOwnID; โ€” to allow revealing the sender's login name. The name will be available to the recipient through the isds_get_message_sender function. The sender's box type and identifier will always be available ๐Ÿ‘€. This feature exists because more users can have access to one box and the recipient couldn't tell who the sender was. This value is optional. Default value is false.
  • int *idLevel; โ€” specifies which personal information about the sender should be revealed to the recipient ๐Ÿชช. All specified information can be acquired by the recipient by using the isds_GetMessageAuthor2 function. The sender's box type and identifier will always be available. The value of dmPublishOwnID MUST be set to true in order to specify which additional information the sender wants to disclose. The actual value of the idLevel is the sum of the actual enum isds_IdLevel_value values โž•.

๐Ÿฆ‹ isds_FileMetaType

typedef enum isds_FileMetaType;

Document type from the point of view of the hierarchy of documents in a message ๐Ÿ—‚๏ธ. The known values are:

  • FILEMETATYPE_MAIN โ€” main document. There should be exactly one document of this type in a message ๐Ÿ‘‘.
  • FILEMETATYPE_ENCLOSURE โ€” an appendix. If a message has more documents, generic-purpose documents other than the main one should have this type ๐Ÿ“„.
  • FILEMETATYPE_SIGNATURE โ€” digital signature. This document is a signature of another document in the message โœ’๏ธ.
  • FILEMETATYPE_META โ€” XML document for electronic document information system, elektronickรก spisovรก sluลพba (ESS) in Czech, purpose ๐Ÿ›๏ธ.

๐Ÿ’œ struct isds_document

struct isds_document;

A message document ๐Ÿ“‘. The members are:

  • _Bool is_xml; โ€” true if the document is an ISDS XML document. False if the document is an ISDS binary document ๐Ÿงฌ.
  • xmlNodePtr xml_node_list; โ€” the XML node-set presenting the XML document content. This is a pointer to the first XML node of the XML representation of the message as stored in the xml member of the isds_message structure ๐ŸŒณ. Use the children and next members to walk through the document. See the libxml2 library documentation for more details. The xml_node_list will be NULL if the document is empty. It's valid only if is_xml is true.
  • void *data; โ€” a binary document content. The encoding and format depends on the dmMimeType member value ๐Ÿงฑ. This is valid only if is_xml is false.
  • size_t data_length; โ€” length of the data buffer in bytes ๐Ÿ“. It's valid only if is_xml is false.
  • char *dmMimeType; โ€” the MIME type of the document. This one is mandatory, bestie, no skipping it ๐Ÿ’…
  • isds_FileMetaType dmFileMetaType; โ€” the document type used to build the document hierarchy inside a message.
  • char *dmFileGuid; โ€” a message-local document identifier. It's literally a key ๐Ÿ”‘ you can use to point at this document from a different document via the dmUpFileGuid member. Optional.
  • char *dmUpFileGuid; โ€” a reference to an upper document's identifier, stored in the dmFileGuid member of a different document. Use the isds_find_document_by_id function to go find that upper document. Also optional.
  • char *dmFileDescr; โ€” the document name (title), like a file name, for example. Mandatory ๐Ÿซถ
  • char *dmFormat; โ€” a reference to an XML format definition that explains how to interpret the XML document. Like a URL to an XML schema, for instance. Optional.

struct isds_box_state_period ๐Ÿ•ฐ๏ธ

struct isds_box_state_period;

A box state that's valid in a time range. The members are:

  • struct isds_timeval *from; โ€” when the time range begins.
  • struct isds_timeval *to; โ€” when the time range ends.
  • long int dbState; โ€” the box state. 1 means the box is accessible. Any other value means the box is inaccessible. You can use the isds_DbState enum to identify some of those states.

struct isds_dmMessageAuthor ๐Ÿ‘ค

struct isds_dmMessageAuthor;

This is the response for GetMessageAuthor2. Members:

  • isds_sender_type *userType; โ€” the message sender type.
  • struct isds_PersonName2 *personName; โ€” contains pnGivenNames and pnLastName.
  • struct tm *biDate; โ€” date of birth in local time at the birth place. Only tm_year, tm_mon and tm_mday carry a sane value, so don't go trusting the rest ๐Ÿ˜ญ
  • char *biCity; โ€” city of birth.
  • char *biCounty; โ€” county of birth (German: Bezirk, Czech: okres).
  • char *adCode; โ€” RUIAN address code.
  • char *fullAddress; โ€” the full address.
  • _Bool *robIdent; โ€” flag saying whether the person is identified within the ROB.

enum isds_message_type ๐Ÿ’Œ

typedef enum isds_message_type isds_message_type;

Tells you which way the message is going โ€” received or sent:

  • MESSAGE_TYPE_RECEIVED โ€” it's a received message.
  • MESSAGE_TYPE_SENT โ€” it's a sent message.

enum isds_data_format ๐Ÿ“„

typedef enum isds_data_format isds_data_format;

Specifies the data format:

  • FORMAT_XML โ€” data in XML format.
  • FORMAT_CSV โ€” data in CSV format.

enum isds_asyncReqType โšก

typedef enum isds_asyncReqType isds_asyncReqType;

Specifies the synchronous request type:

  • ASYNC_REQ_TYPE_LIST_ERASED โ€” the response for the GetListOfErasedMessages request.

struct isds_erased_message ๐Ÿ—‘๏ธ

struct isds_erased_message;

Describes the entries in the lists of erased messages. Members:

  • char *dmID; โ€” message ID.
  • char *dbIDSender; โ€” box ID of the sender.
  • char *dmSender; โ€” sender name.
  • char *dbIDRecipient; โ€” box ID of the recipient.
  • char *dmRecipient; โ€” recipient name.
  • char *dmAnnotation; โ€” subject (title) of the message.
  • enum isds_message_status *dmMessageStatus; โ€” message state.
  • struct isds_timeval *dmDeliveryTime; โ€” time of delivery into a box.
  • struct isds_timeval *dmAcceptanceTime; โ€” time of acceptance of the message by a user.
  • char *dmType; โ€” message type.

โœจ FUNCTIONS โœจ

Okay bestie, here's the function lineup ๐Ÿ‘‘

const char *isds_strerror(const isds_error error);
struct isds_ctx *isds_ctx_create(void);

๐ŸŒˆ SEE ALSO ๐ŸŒˆ

Go touch some other manuals, iykyk:


๐Ÿ‘‘ AUTHORS ๐Ÿ‘‘

  • CZ.NIC, z. s. p. o. โ€” maintains libdatovka. Has been contributing to libisds.
  • Petr Pรญsaล™ โ€” he has written libisds.

And that's a wrap, babe ๐ŸŽ€ this page came from [FIXME: source] and it's dated 09/16/2026 โ€” go slay some ISDS calls, mwah ๐Ÿ’–๐Ÿฆ‹

๐Ÿ“ฆ where this page comes from