Module Gammu.INI

These functions parse ini file and make them available in easily accessible manner.

type sections
val read : ?⁠unicode:bool ‑> string ‑> sections

read fname reads INI data from the file fname.

val of_gammurc : ?⁠path:string ‑> unit ‑> sections

Finds and reads gammu configuration file. The search order depends on platform. On POSIX systems it looks for ~/.gammurc and then for /etc/gammurc and also follows freedesktop.org/XDG specifications and reads ~/.config/gammu/config (in versions > 1.28.92 of libGammu), on Windows for gammurc in Application data folder, then in home and last fallback is in current directory.

val config : sections ‑> int ‑> config

read_config section num processes and returns gammu configuration represented by the numth section of the INI file representation section. Beware that numth section is in facts the section named "gammunum" in the file itself.

val get_value : sections ‑> section:string ‑> key:string ‑> string