hal/libhal libhal.c,1.18,1.19 libhal.h,1.13,1.14

David Zeuthen david at pdx.freedesktop.org
Tue May 4 10:52:41 PDT 2004


Update of /cvs/hal/hal/libhal
In directory pdx:/tmp/cvs-serv32532/libhal

Modified Files:
	libhal.c libhal.h 
Log Message:
2004-05-04  David Zeuthen  <david at fubar.dk>

	* libhal/libhal.c (hal_ctx_set_user_data): new function
	(hal_ctx_get_user_data): new function



Index: libhal.c
===================================================================
RCS file: /cvs/hal/hal/libhal/libhal.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- a/libhal.c	10 Apr 2004 16:51:56 -0000	1.18
+++ b/libhal.c	4 May 2004 17:52:39 -0000	1.19
@@ -104,8 +104,21 @@
 	dbus_bool_t is_initialized;           /**< Are we initialised */
 	dbus_bool_t cache_enabled;            /**< Is the cache enabled */
 	const LibHalFunctions *functions;     /**< Callback functions */
+	void *user_data;                      /**< User data */
 };
 
+void 
+hal_ctx_set_user_data(LibHalContext *ctx, void *user_data)
+{
+	ctx->user_data = user_data;
+}
+
+void*
+hal_ctx_get_user_data(LibHalContext *ctx)
+{
+	return ctx->user_data;
+}
+
 
 /** Retrieve all the properties on a device. 
  *

Index: libhal.h
===================================================================
RCS file: /cvs/hal/hal/libhal/libhal.h,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- a/libhal.h	1 May 2004 21:22:48 -0000	1.13
+++ b/libhal.h	4 May 2004 17:52:39 -0000	1.14
@@ -145,6 +145,10 @@
 
 int hal_shutdown (LibHalContext *ctx);
 
+void hal_ctx_set_user_data(LibHalContext *ctx, void *user_data);
+
+void* hal_ctx_get_user_data(LibHalContext *ctx);
+
 char **hal_get_all_devices (LibHalContext *ctx, int *num_devices);
 dbus_bool_t hal_device_exists (LibHalContext *ctx, const char *udi);
 





More information about the hal-commit mailing list