Classes | Defines | Typedefs | Enumerations | Functions
dbus_new_helpers.h File Reference
#include <dbus/dbus.h>
Include dependency graph for dbus_new_helpers.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  wpa_dbus_argument
struct  wpa_dbus_method_desc
struct  wpa_dbus_object_desc
struct  wpa_dbus_property_desc
struct  wpa_dbus_signal_desc

Defines

#define END_ARGS   { NULL, NULL, ARG_IN }
#define WPA_DBUS_INTROSPECTION_INTERFACE   "org.freedesktop.DBus.Introspectable"
#define WPA_DBUS_INTROSPECTION_METHOD   "Introspect"
#define WPA_DBUS_PROPERTIES_GET   "Get"
#define WPA_DBUS_PROPERTIES_GETALL   "GetAll"
#define WPA_DBUS_PROPERTIES_INTERFACE   "org.freedesktop.DBus.Properties"
#define WPA_DBUS_PROPERTIES_SET   "Set"
#define WPAS_DBUS_INTERFACE_MAX   150
#define WPAS_DBUS_METHOD_SIGNAL_PROP_MAX   50
#define WPAS_DBUS_OBJECT_PATH_MAX   150

Typedefs

typedef void(* WPADBusArgumentFreeFunction )(void *handler_arg)
typedef DBusMessage *(* WPADBusMethodHandler )(DBusMessage *message, void *user_data)
typedef DBusMessage *(* WPADBusPropertyAccessor )(DBusMessage *message, const void *user_data)

Enumerations

enum  dbus_arg_direction { ARG_IN, ARG_OUT }
enum  dbus_prop_access { R, W, RW }

Functions

void free_dbus_object_desc (struct wpa_dbus_object_desc *obj_dsc)
int wpa_dbus_ctrl_iface_init (struct wpas_dbus_priv *iface, char *dbus_path, char *dbus_service, struct wpa_dbus_object_desc *obj_desc)
void wpa_dbus_flush_all_changed_properties (DBusConnection *con)
void wpa_dbus_flush_object_changed_properties (DBusConnection *con, const char *path)
void wpa_dbus_get_object_properties (struct wpas_dbus_priv *iface, const char *path, const char *interface, DBusMessageIter *dict_iter)
DBusMessage * wpa_dbus_introspect (DBusMessage *message, struct wpa_dbus_object_desc *obj_dsc)
void wpa_dbus_mark_property_changed (struct wpas_dbus_priv *iface, const char *path, const char *interface, const char *property)
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)
int wpa_dbus_unregister_object_per_iface (struct wpas_dbus_priv *ctrl_iface, const char *path)

Define Documentation

#define END_ARGS   { NULL, NULL, ARG_IN }

Definition at line 57 of file dbus_new_helpers.h.

#define WPA_DBUS_INTROSPECTION_INTERFACE   "org.freedesktop.DBus.Introspectable"

Definition at line 108 of file dbus_new_helpers.h.

#define WPA_DBUS_INTROSPECTION_METHOD   "Introspect"

Definition at line 109 of file dbus_new_helpers.h.

#define WPA_DBUS_PROPERTIES_GET   "Get"

Definition at line 111 of file dbus_new_helpers.h.

#define WPA_DBUS_PROPERTIES_GETALL   "GetAll"

Definition at line 113 of file dbus_new_helpers.h.

#define WPA_DBUS_PROPERTIES_INTERFACE   "org.freedesktop.DBus.Properties"

Definition at line 110 of file dbus_new_helpers.h.

#define WPA_DBUS_PROPERTIES_SET   "Set"

Definition at line 112 of file dbus_new_helpers.h.

#define WPAS_DBUS_INTERFACE_MAX   150

Definition at line 105 of file dbus_new_helpers.h.

Definition at line 106 of file dbus_new_helpers.h.

#define WPAS_DBUS_OBJECT_PATH_MAX   150

Definition at line 104 of file dbus_new_helpers.h.


Typedef Documentation

typedef void(* WPADBusArgumentFreeFunction)(void *handler_arg)

Definition at line 23 of file dbus_new_helpers.h.

typedef DBusMessage*(* WPADBusMethodHandler)(DBusMessage *message, void *user_data)

Definition at line 21 of file dbus_new_helpers.h.

typedef DBusMessage*(* WPADBusPropertyAccessor)(DBusMessage *message, const void *user_data)

Definition at line 25 of file dbus_new_helpers.h.


Enumeration Type Documentation

Enumerator:
ARG_IN 
ARG_OUT 

Definition at line 49 of file dbus_new_helpers.h.

Enumerator:
R 
W 
RW 

Definition at line 47 of file dbus_new_helpers.h.


Function Documentation

void free_dbus_object_desc ( struct wpa_dbus_object_desc obj_dsc)

free_dbus_object_desc - Frees object description data structure : DBus connection : Object description to free

Frees each of properties, methods and signals description lists and the object description structure itself.

Definition at line 455 of file dbus_new_helpers.c.

int wpa_dbus_ctrl_iface_init ( struct wpas_dbus_priv iface,
char *  dbus_path,
char *  dbus_service,
struct wpa_dbus_object_desc obj_desc 
)

wpa_dbus_ctrl_iface_init - Initialize dbus control interface : Pointer to application specific data structure : DBus path to interface object : DBus service name to register with : a pointer to function which will handle dbus messages coming on interface Returns: 0 on success, -1 on failure

Initialize the dbus control interface and start receiving commands from external programs over the bus.

Definition at line 487 of file dbus_new_helpers.c.

void wpa_dbus_flush_all_changed_properties ( DBusConnection *  con)

wpa_dbus_flush_all_changed_properties - Send all PropertiesChanged signals : DBus connection

Traverses through all registered objects and sends PropertiesChanged for each properties.

Definition at line 742 of file dbus_new_helpers.c.

void wpa_dbus_flush_object_changed_properties ( DBusConnection *  con,
const char *  path 
)

wpa_dbus_flush_object_changed_properties - Send PropertiesChanged for object : DBus connection : path to a DBus object for which PropertiesChanged will be sent.

Iterates over all properties registered with object and for each interface containing properties marked as changed, sends a PropertiesChanged signal containing names and new values of properties that have changed.

You need to call this function after wpa_dbus_mark_property_changed() if you want to send PropertiesChanged signal immediately (i.e., without waiting timeout to expire). PropertiesChanged signal for an object is sent automatically short time after first marking property as changed. All PropertiesChanged signals are sent automatically after responding on DBus message, so if you marked a property changed as a result of DBus call (e.g., param setter), you usually do not need to call this function.

Definition at line 765 of file dbus_new_helpers.c.

void wpa_dbus_get_object_properties ( struct wpas_dbus_priv iface,
const char *  path,
const char *  interface,
DBusMessageIter *  dict_iter 
)

Definition at line 859 of file dbus_new_helpers.c.

DBusMessage* wpa_dbus_introspect ( DBusMessage *  message,
struct wpa_dbus_object_desc obj_dsc 
)

wpa_dbus_introspect - Responds for Introspect calls on object : Message with Introspect call : Object description on which Introspect was called Returns: Message with introspection result XML string as only argument

Iterates over all methods, signals and properties registered with object and generates introspection data for the object as XML string.

Definition at line 246 of file dbus_new_introspect.c.

void wpa_dbus_mark_property_changed ( struct wpas_dbus_priv iface,
const char *  path,
const char *  interface,
const char *  property 
)

Definition at line 805 of file dbus_new_helpers.c.

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 
)

wpa_dbus_register_object_per_iface - Register a new object with dbus : pointer to dbus private data : DBus path to object : interface name : description of object's methods, signals and properties Returns: 0 on success, -1 on error

Registers a new interface with dbus and assigns it a dbus object path.

Definition at line 549 of file dbus_new_helpers.c.

int wpa_dbus_unregister_object_per_iface ( struct wpas_dbus_priv ctrl_iface,
const char *  path 
)

wpa_dbus_unregister_object_per_iface - Unregisters DBus object : Pointer to dbus private data : DBus path to object which will be unregistered Returns: Zero on success and -1 on failure

Unregisters DBus object given by its path

Definition at line 592 of file dbus_new_helpers.c.



wpa_supplicant
Author(s): Package maintained by Blaise Gassend
autogenerated on Thu Apr 24 2014 15:34:37