Lines Matching refs:ctx
44 struct lws_dbus_ctx ctx;
115 if (!dcwc || !dcwc->ctx.conn)
120 dbus_connection_remove_filter(dcwc->ctx.conn, filter, &dcwc->ctx);
121 dbus_connection_close(dcwc->ctx.conn);
122 dbus_connection_unref(dcwc->ctx.conn);
131 * ctx has effectively gone out of scope before this, and the connection can
132 * be cleaned up and the ctx freed.
136 cb_closing(struct lws_dbus_ctx *ctx)
139 (struct lws_dbus_ctx_wsproxy_client *)ctx;
164 dcwc->ctx.vh = vh;
165 dcwc->ctx.tsi = tsi;
173 dcwc->ctx.conn = dbus_connection_open_private(ads, &e);
174 if (!dcwc->ctx.conn) {
182 dcwc->ctx.conn = dbus_bus_get(DBUS_BUS_SYSTEM, &e);
183 if (!dcwc->ctx.conn) {
189 dbus_connection_set_exit_on_disconnect(dcwc->ctx.conn, 0);
191 if (!dbus_connection_add_filter(dcwc->ctx.conn, filter,
192 &dcwc->ctx, NULL)) {
202 if (lws_dbus_connection_setup(&dcwc->ctx, dcwc->ctx.conn, cb_closing)) {
294 if (!dbus_connection_send_with_reply(dcwc->ctx.conn, msg, &dcwc->ctx.pc,
301 dbus_pending_call_set_notify(dcwc->ctx.pc, pending_call_notify,
302 &dcwc->ctx, NULL);
347 if (!dbus_connection_send_with_reply(dbus_ctx->ctx.conn, msg,
348 &dbus_ctx->ctx.pc,
356 dbus_pending_call_set_notify(dbus_ctx->ctx.pc,
358 &dbus_ctx->ctx, NULL);