libstrophe Documentation

repository·master·Indexed 19 days ago

https://github.com/strophe/libstrophe

A lightweight, C-based XMPP client library designed for minimal dependencies and high configurability across Linux, Unix, and Windows platforms. Supports multiple XML parsers including expat and libxml2, and TLS/SSL providers such as openssl and GnuTLS.

Tokens
543
Snippets
5
Records
6
Agent score
16%

What's inside libstrophe

  1. Install libstrophe from source

    master

    To build and install libstrophe from a source control checkout, follow these steps:

    1. Generate the configure script:
      ./bootstrap.sh
    2. Configure and build the library:
      ./configure
      make
    3. Install the library to your system (requires root/sudo):
      make install

    By default, the library installs to /usr/local/. To specify a different installation directory, use the --prefix option during the configuration step.

    ./bootstrap.sh
    ./configure
    make
    make install
  2. Compile libstrophe example files

    master

    To compile example files (such as bot.c) that use libstrophe, use gcc along with pkg-config to automatically include the necessary compiler flags and library links. This ensures that the correct include paths and library dependencies for libstrophe are provided to the compiler.

    gcc -o bot bot.c `pkg-config --cflags --libs libstrophe`
  3. Generate API documentation

    master

    The API documentation is written in Doxygen format. You can generate a local HTML version of the documentation using one of the following methods:

    1. Run doxygen directly.
    2. Run make docs (if your environment is configured correctly).

    Once generated, open the documentation at docs/html/index.html.

    make docs
  4. Configure libstrophe dependencies

    master

    libstrophe has several configurable dependencies. Use the following flags with ./configure to select your preferred implementations:

    XML Parsers

    • expat: The default parser.
    • libxml2: Use --with-libxml2 to switch to libxml2.

    TLS/SSL Providers (UNIX systems)

    • openssl: The default provider.
    • GnuTLS: Use --with-gnutls to switch to GnuTLS.