6 #ifndef WPA_DBUS_CTRL_H
7 #define WPA_DBUS_CTRL_H
11 typedef DBusMessage * (*WPADBusMethodHandler)(DBusMessage *message,
13 typedef void (*WPADBusArgumentFreeFunction)(
void *handler_arg);
15 typedef dbus_bool_t (*WPADBusPropertyAccessor)(DBusMessageIter *iter,
20 DBusConnection *connection;
29 u8 *prop_changed_flags;
35 WPADBusArgumentFreeFunction user_data_free_func;
38 enum dbus_arg_direction { ARG_IN, ARG_OUT };
43 enum dbus_arg_direction dir;
46 #define END_ARGS { NULL, NULL, ARG_IN }
54 const char *dbus_method;
56 const char *dbus_interface;
58 WPADBusMethodHandler method_handler;
69 const char *dbus_signal;
71 const char *dbus_interface;
82 const char *dbus_property;
84 const char *dbus_interface;
88 WPADBusPropertyAccessor getter;
90 WPADBusPropertyAccessor setter;
94 #define WPAS_DBUS_OBJECT_PATH_MAX 150
95 #define WPAS_DBUS_INTERFACE_MAX 150
96 #define WPAS_DBUS_METHOD_SIGNAL_PROP_MAX 50
97 #define WPAS_DBUS_AUTH_MODE_MAX 64
99 #define WPA_DBUS_INTROSPECTION_INTERFACE "org.freedesktop.DBus.Introspectable"
100 #define WPA_DBUS_INTROSPECTION_METHOD "Introspect"
101 #define WPA_DBUS_PROPERTIES_INTERFACE "org.freedesktop.DBus.Properties"
102 #define WPA_DBUS_PROPERTIES_GET "Get"
103 #define WPA_DBUS_PROPERTIES_SET "Set"
104 #define WPA_DBUS_PROPERTIES_GETALL "GetAll"
114 const char *path,
const char *ifname,
123 const char *interface,
124 DBusMessageIter *iter);
133 const char *path,
const char *interface,
134 const char *property);
144 const char *fallback_name,
145 const char *fallback_string);
DBus property description.
Definition: dbus_new_helpers.h:80
char * wpas_dbus_new_decompose_object_path(const char *path, const char *sep, char **item)
Decompose an interface object path into parts.
Definition: dbus_new_helpers.c:950
DBusMessage * wpa_dbus_introspect(DBusMessage *message, struct wpa_dbus_object_desc *obj_dsc)
Responds for Introspect calls on object.
Definition: dbus_new_introspect.c:249
void wpa_dbus_flush_all_changed_properties(DBusConnection *con)
Send all PropertiesChanged signals.
Definition: dbus_new_helpers.c:776
void free_dbus_object_desc(struct wpa_dbus_object_desc *obj_dsc)
Frees object description data structure.
Definition: dbus_new_helpers.c:432
void wpa_dbus_flush_object_changed_properties(DBusConnection *con, const char *path)
Send PropertiesChanged for object.
Definition: dbus_new_helpers.c:799
int wpa_dbus_register_object_per_iface(struct wpas_dbus_priv *ctrl_iface, const char *path, const char *ifname, struct wpa_dbus_object_desc *obj_desc)
Register a new object with dbus.
Definition: dbus_new_helpers.c:525
Definition: dbus_common_i.h:12
DBus signal description.
Definition: dbus_new_helpers.h:67
int wpa_dbus_ctrl_iface_init(struct wpas_dbus_priv *iface, char *dbus_path, char *dbus_service, struct wpa_dbus_object_desc *obj_desc)
Initialize dbus control interface.
Definition: dbus_new_helpers.c:465
int wpa_dbus_unregister_object_per_iface(struct wpas_dbus_priv *ctrl_iface, const char *path)
Unregisters DBus object.
Definition: dbus_new_helpers.c:575
Definition: dbus_new_helpers.h:40
DBusMessage * wpas_dbus_reply_new_from_error(DBusMessage *message, DBusError *error, const char *fallback_name, const char *fallback_string)
Create a new D-Bus error message from a dbus error structure.
Definition: dbus_new_helpers.c:1004
Definition: dbus_new_helpers.h:19
void wpa_dbus_mark_property_changed(struct wpas_dbus_priv *iface, const char *path, const char *interface, const char *property)
Mark a property as changed and.
Definition: dbus_new_helpers.c:838
dbus_bool_t wpa_dbus_get_object_properties(struct wpas_dbus_priv *iface, const char *path, const char *interface, DBusMessageIter *iter)
Put object's properties into dictionary.
Definition: dbus_new_helpers.c:894
DBus method description.
Definition: dbus_new_helpers.h:52