libwebsockets
Lightweight C library for HTML5 websockets
lws-dbus.h File Reference
#include <dbus/dbus.h>
+ Include dependency graph for lws-dbus.h:

Go to the source code of this file.

Data Structures

struct  lws_dbus_ctx
 

Typedefs

typedef DBusHandlerResult(* lws_dbus_message_handler) (DBusConnection *conn, DBusMessage *message, DBusMessage **reply, void *d)
 
typedef void(* lws_dbus_closing_t) (struct lws_dbus_ctx *ctx)
 

Functions

LWS_VISIBLE LWS_EXTERN int lws_dbus_connection_setup (struct lws_dbus_ctx *ctx, DBusConnection *conn, lws_dbus_closing_t cb_closing)
 
LWS_VISIBLE LWS_EXTERN DBusServer * lws_dbus_server_listen (struct lws_dbus_ctx *ctx, const char *ads, DBusError *err, DBusNewConnectionFunction new_conn)
 

Data Structure Documentation

◆ lws_dbus_ctx

struct lws_dbus_ctx

Definition at line 43 of file lws-dbus.h.

+ Collaboration diagram for lws_dbus_ctx:
Data Fields
struct lws_dll2_owner owner
struct lws_dll2 next
struct lws_vhost * vh
int tsi
DBusConnection * conn
DBusServer * dbs
DBusWatch * w[4]
DBusPendingCall * pc
char hup
char timeouts
lws_dbus_closing_t cb_closing

Typedef Documentation

◆ lws_dbus_message_handler

typedef DBusHandlerResult(* lws_dbus_message_handler) (DBusConnection *conn, DBusMessage *message, DBusMessage **reply, void *d)

Definition at line 37 of file lws-dbus.h.

◆ lws_dbus_closing_t

typedef void(* lws_dbus_closing_t) (struct lws_dbus_ctx *ctx)

Definition at line 41 of file lws-dbus.h.

Function Documentation

◆ lws_dbus_connection_setup()

LWS_VISIBLE LWS_EXTERN int lws_dbus_connection_setup ( struct lws_dbus_ctx ctx,
DBusConnection *  conn,
lws_dbus_closing_t  cb_closing 
)

lws_dbus_connection_setup() - bind dbus connection object to lws event loop

Parameters
ctxadditional information about the connection
connthe DBusConnection object to bind

This configures a DBusConnection object to use lws for watchers and timeout operations.

◆ lws_dbus_server_listen()

LWS_VISIBLE LWS_EXTERN DBusServer * lws_dbus_server_listen ( struct lws_dbus_ctx ctx,
const char *  ads,
DBusError *  err,
DBusNewConnectionFunction  new_conn 
)

lws_dbus_server_listen() - bind dbus connection object to lws event loop

Parameters
ctxadditional information about the connection
adsthe DBUS address to listen on, eg, "unix:abstract=mysocket"
erra DBusError object to take any extra error information
new_conna callback function to prepare new accepted connections

This creates a DBusServer and binds it to the lws event loop, and your callback to accept new connections.