Interface Systemd

All Superinterfaces:
com.sun.jna.Library

@ThreadSafe public interface Systemd extends com.sun.jna.Library
JNA bindings for libsystemd. This class should be considered non-API as it may be removed if/when its code is incorporated into the JNA project.
  • Nested Class Summary

    Nested classes/interfaces inherited from interface com.sun.jna.Library

    com.sun.jna.Library.Handler
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Systemd
     

    Fields inherited from interface com.sun.jna.Library

    OPTION_ALLOW_OBJECTS, OPTION_CALLING_CONVENTION, OPTION_CLASSLOADER, OPTION_FUNCTION_MAPPER, OPTION_INVOCATION_MAPPER, OPTION_OPEN_FLAGS, OPTION_STRING_ENCODING, OPTION_STRUCTURE_ALIGNMENT, OPTION_SYMBOL_PROVIDER, OPTION_TYPE_MAPPER
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    sd_get_sessions(com.sun.jna.ptr.PointerByReference sessions)
    Enumerate sessions
    int
    sd_session_get_remote_host(String session, com.sun.jna.ptr.PointerByReference remote_host)
    Get remote host of session
    int
    sd_session_get_start_time(String session, com.sun.jna.ptr.LongByReference usec)
    Get start time of session
    int
    sd_session_get_tty(String session, com.sun.jna.ptr.PointerByReference tty)
    Get TTY of session
    int
    sd_session_get_username(String session, com.sun.jna.ptr.PointerByReference username)
    Get username of session
  • Field Details

    • INSTANCE

      static final Systemd INSTANCE
  • Method Details

    • sd_session_get_start_time

      int sd_session_get_start_time(String session, com.sun.jna.ptr.LongByReference usec)
      Get start time of session
      Parameters:
      session - Session ID or null for current session
      usec - Pointer to store microseconds since epoch
      Returns:
      0 on success, negative errno on failure
    • sd_session_get_username

      int sd_session_get_username(String session, com.sun.jna.ptr.PointerByReference username)
      Get username of session
      Parameters:
      session - Session ID or null for current session
      username - Pointer to store username string (must be freed)
      Returns:
      0 on success, negative errno on failure
    • sd_session_get_tty

      int sd_session_get_tty(String session, com.sun.jna.ptr.PointerByReference tty)
      Get TTY of session
      Parameters:
      session - Session ID or null for current session
      tty - Pointer to store TTY string (must be freed)
      Returns:
      0 on success, negative errno on failure
    • sd_session_get_remote_host

      int sd_session_get_remote_host(String session, com.sun.jna.ptr.PointerByReference remote_host)
      Get remote host of session
      Parameters:
      session - Session ID or null for current session
      remote_host - Pointer to store remote host string (must be freed)
      Returns:
      0 on success, negative errno on failure
    • sd_get_sessions

      int sd_get_sessions(com.sun.jna.ptr.PointerByReference sessions)
      Enumerate sessions
      Parameters:
      sessions - Pointer to store array of session IDs (must be freed)
      Returns:
      Number of sessions on success, negative errno on failure