package gammu

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

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.

  • parameter unicode

    Whether file should be treated as unicode encoded (default = false, beware that unicode handling is somewhat buggy in libGammu).

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.

  • parameter path

    force the use of a custom path instead of the autodetected one (default: autodetection is performed).

    Raises Error CANTOPENFILE if no gammu rc file can be found. Raises Error FILENOTSUPPORTED if first found gammu rc file is not valid.

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
  • returns

    value of the INI file entry.