Merge lp:geis/2.x into lp:geis

Proposed by Stephen M. Webb on 2010-12-02
Status: Merged
Merged at revision: 92
Proposed branch: lp:geis/2.x
Merge into: lp:geis
Diff against target: 1288 lines (+956/-39)
22 files modified
ChangeLog (+49/-0)
doc/Doxyfile (+1/-1)
include/geis/geis.h (+61/-6)
libutouch-geis/Makefile.am (+9/-5)
libutouch-geis/geis.c (+79/-11)
libutouch-geis/geis_backend.c (+65/-0)
libutouch-geis/geis_backend.h (+56/-0)
libutouch-geis/geis_backend_multiplexor.c (+203/-0)
libutouch-geis/geis_backend_multiplexor.h (+129/-0)
libutouch-geis/geis_backend_protected.h (+61/-0)
libutouch-geis/geis_backend_test_fixture.c (+63/-0)
libutouch-geis/geis_backend_test_fixture.h (+35/-0)
libutouch-geis/geis_error.c (+4/-4)
libutouch-geis/geis_private.h (+4/-7)
testsuite/geis2/check_config.c (+2/-2)
testsuite/geis2/check_error_codes.c (+2/-0)
testsuite/geis2/check_geis_new.c (+1/-1)
testsuite/geis2/check_subscription.c (+1/-1)
testsuite/libutouch-geis/Makefile.am (+1/-0)
testsuite/libutouch-geis/check_backend_multiplexor.c (+127/-0)
testsuite/libutouch-geis/check_geis2_internals.c (+2/-0)
testsuite/libutouch-geis/check_subscription.c (+1/-1)
To merge this branch: bzr merge lp:geis/2.x
Reviewer Review Type Date Requested Status
Mohamed IKBEL Boulabiar (community) Approve on 2010-12-06
Henrik Rydberg (community) 2010-12-02 Approve on 2010-12-02
Review via email: mp+42536@code.launchpad.net

Description of the change

This change is some basic infrastructure required for configurable back ends (eg. DBus client, local grail, maverick-style XCB).

To post a comment you must log in.
Henrik Rydberg (rydberg) wrote :

Looks ok. Things are getting closer. :-)

Henrik Rydberg (rydberg) wrote :

> Looks ok. Things are getting closer. :-)

review: Approve
Chase Douglas (chasedouglas) wrote :

Do we want to be able to specify a timeout value for geis_backend_multiplexor_pump?

Otherwise, looks good to me.

Mohamed IKBEL Boulabiar (boulabiar) wrote :

Looks Good !

("teh", "isn;t" in the comments detected :P)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'ChangeLog'
2--- ChangeLog 2010-11-29 14:32:34 +0000
3+++ ChangeLog 2010-12-02 19:24:57 +0000
4@@ -1,3 +1,52 @@
5+2010-12-02 Stephen M. Webb <stephen.webb@canonical.com>
6+
7+ Added a back end base and test fixture.
8+
9+ * libutouch-geis/geis_backend.c: new file
10+ * libutouch-geis/geis_backend.h: new file
11+ * libutouch-geis/geis_backend_protected.h: new file
12+ * libutouch-geis/geis_backend_test_fixture.c: new file
13+ * libutouch-geis/geis_backend_test_fixture.h: new file
14+ * include/geis/geis.h (GEIS_INIT_SERVICE_PROVIDER): changed constant value
15+ (GEIS_INIT_UTOUCH_MOCK_ENGINE): added new constant
16+ * libutouch-geis/Makefile.am: added new files
17+ * libutouch-geis/geis.c (struct _Geis): replaced is_test_fixture with backend
18+ (geis_set_valist): created new test fixture backend
19+ (geis_delete): destroyed backend
20+ * testsuite/geis2/check_config.c: used new name for test fixture back end
21+ * testsuite/geis2/check_geis_new.c: same
22+ * testsuite/geis2/check_subscription.c: idem
23+ * testsuite/libutouch-geis/check_subscription.c: ditto
24+
25+2010-12-02 Stephen M. Webb <stephen.webb@canonical.com>
26+
27+ Added a back end multiplexor.
28+
29+ * libutouch-geis/geis_backend_multiplexor.c: new file
30+ * libutouch-geis/geis_backend_multiplexor.h: new file
31+ * testsuite/libutouch-geis/check_backend_multiplexor.c: new testsuite
32+ * include/geis/geis.h (GeisStatus): added new status codes
33+ GEIS_STATUS_CONTINUE and GEIS_STATUS_EMPTY
34+ (GEIS_CONFIG_UTOUCH_MAX_EVENTS): new configuration item
35+ * libutouch-geis/Makefile.am: added new files
36+ * libutouch-geis/geis.c (struct _Geis): added backend_multiplexor field
37+ (geis_new_empty): initialized it
38+ (geis_delete): destroyed it
39+ (geis_get_configuration): retrieved its file descriptor and config value
40+ (geis_set_configuration): set its configuration value
41+ * testsuite/geis2/check_error_codes.c: checked new status codes
42+ * testsuite/libutouch-geis/Makefile.am
43+ * testsuite/libutouch-geis/check_geis2_internals.c
44+
45+2010-11-29 Stephen M. Webb <stephen.webb@canonical.com>
46+
47+ Refactored geis_private.h to provide improved data encapsulation.
48+
49+ * libutouch-geis/geis_private.h (struct _Geis): moved to geis.c
50+ (geis_error_stack): new function
51+ * libutouch-geis/geis.c: implemented new function
52+ * libutouch-geis/geis_error.c: used new function
53+
54 2010-11-29 Stephen M. Webb <stephen.webb@canonical.com>
55
56 Fixed a typo in the Doxygen comments in geis.h.
57
58=== modified file 'doc/Doxyfile'
59--- doc/Doxyfile 2010-08-06 21:16:55 +0000
60+++ doc/Doxyfile 2010-12-02 19:24:57 +0000
61@@ -590,7 +590,7 @@
62 # directories like "/usr/src/myproject". Separate the files or directories
63 # with spaces.
64
65-INPUT = ../geis
66+INPUT = ../include/geis
67
68 # This tag can be used to specify the character encoding of the source files
69 # that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
70
71=== modified file 'include/geis/geis.h'
72--- include/geis/geis.h 2010-11-29 14:32:34 +0000
73+++ include/geis/geis.h 2010-12-02 19:24:57 +0000
74@@ -120,6 +120,10 @@
75 typedef enum GeisStatus
76 {
77 GEIS_STATUS_SUCCESS = 0, /**< normal successful completion */
78+ GEIS_STATUS_CONTINUE = 20, /**< normal successful completion
79+ with data still remaining */
80+ GEIS_STATUS_EMPTY = 21, /**< normal successful completion
81+ with no data retrieved */
82 GEIS_STATUS_NOT_SUPPORTED = 10, /**< a requested feature is not supported */
83 GEIS_BAD_ARGUMENT = 1000, /**< a bad argument value was passed */
84 GEIS_UNKNOWN_ERROR = 9999, /**< any other error condition */
85@@ -190,12 +194,40 @@
86 /* @} */
87
88 /**
89- * @defgroup geis_2_geis The Geis API Object
90- *
91- * @{
92- */
93-
94-#define GEIS_INIT_SERVICE_PROVIDER "geis-init-server"
95+ * @defgroup geis_2_geis The Geis API Object (GEIS v2.0)
96+ *
97+ * @{
98+ */
99+
100+/**
101+ * @defgroup geis_2_geis_init_args Specified Initialization Arguments
102+ *
103+ * These initialization arguments are defined by the GEIS specification.
104+ *
105+ * @{
106+ */
107+
108+/**
109+ * Enables GEIS to provide a networked service.
110+ *
111+ * This initialization argument takes no parameters.
112+ */
113+#define GEIS_INIT_SERVICE_PROVIDER "org.libgeis.init.server"
114+
115+/* @} */
116+
117+/**
118+ * @defgroup geis_2_geis_init_vendor Vendor-defined Initialization Arguments
119+ *
120+ * These initialization arguments are not a part of te GEIS specification and
121+ * may change.
122+ *
123+ * @{
124+ */
125+
126+#define GEIS_INIT_UTOUCH_MOCK_ENGINE "com.canonical.utouch.mock.engine"
127+
128+/* @} */
129
130
131 typedef struct _Geis *Geis;
132@@ -332,8 +364,31 @@
133 * @{
134 */
135
136+/**
137+ * @defgroup geis2_config_spec Required Configuration Items
138+ *
139+ * These configuration items are defined by the GEIS specification.
140+ *
141+ * @{
142+ */
143+
144 #define GEIS_CONFIGURATION_FD "org.libgeis.configuration.fd"
145
146+/* @} */
147+
148+/**
149+ * @defgroup geis2_config_vendor Vendor-defined Configuration Items
150+ *
151+ * These configuration items are not a part of the GEIS specification and may
152+ * change.
153+ *
154+ * @{
155+ */
156+
157+#define GEIS_CONFIG_UTOUCH_MAX_EVENTS "com.canonical.utouch.max_events"
158+
159+/* @} */
160+
161 /**
162 * Gets a feature configuration value.
163 *
164
165=== modified file 'libutouch-geis/Makefile.am'
166--- libutouch-geis/Makefile.am 2010-11-29 02:16:02 +0000
167+++ libutouch-geis/Makefile.am 2010-12-02 19:24:57 +0000
168@@ -23,11 +23,15 @@
169 lib_LTLIBRARIES = libutouch-geis.la
170
171 libutouch_geis_la_SOURCES = \
172- geis_attr.h geis_attr.c \
173- geis_error.h geis_error.c \
174- geis_logging.h geis_logging.c \
175- geis_subscription.h geis_subscription.c \
176- geis_private.h geis.c
177+ geis_attr.h geis_attr.c \
178+ geis_backend.h geis_backend.c \
179+ geis_backend_protected.h \
180+ geis_backend_test_fixture.h geis_backend_test_fixture.c \
181+ geis_backend_multiplexor.h geis_backend_multiplexor.c \
182+ geis_error.h geis_error.c \
183+ geis_logging.h geis_logging.c \
184+ geis_subscription.h geis_subscription.c \
185+ geis_private.h geis.c
186
187 libutouch_geis_la_CPPFLAGS = \
188 -Wall -Wextra \
189
190=== modified file 'libutouch-geis/geis.c'
191--- libutouch-geis/geis.c 2010-11-29 02:16:02 +0000
192+++ libutouch-geis/geis.c 2010-12-02 19:24:57 +0000
193@@ -21,12 +21,23 @@
194 #include "geis_config.h"
195 #include "geis_private.h"
196
197+#include "geis_backend.h"
198+#include "geis_backend_test_fixture.h"
199+#include "geis_backend_multiplexor.h"
200 #include "geis_error.h"
201 #include "geis_logging.h"
202 #include <stdarg.h>
203 #include <string.h>
204
205
206+struct _Geis
207+{
208+ GeisErrorStack error_stack;
209+ GeisSubBag subscription_bag;
210+ GeisBackendMultiplexor backend_multiplexor;
211+ GeisBackend backend;
212+};
213+
214
215 /**
216 * Creates a new empty Geis API instance.
217@@ -40,7 +51,7 @@
218 {
219 geis_error_push(NULL, GEIS_STATUS_UNKNOWN_ERROR);
220 geis_error("calloc failed");
221- goto error_exit;
222+ goto final_exit;
223 }
224
225 geis->subscription_bag = geis_subscription_bag_new(1);
226@@ -50,10 +61,26 @@
227 geis_error("creation of subscroption bag failed");
228 free(geis);
229 geis = NULL;
230- goto error_exit;
231- }
232-
233-error_exit:
234+ goto unwind_geis;
235+ }
236+
237+ geis->backend_multiplexor = geis_backend_multiplexor_new();
238+ if (!geis->backend_multiplexor)
239+ {
240+ geis_error_push(NULL, GEIS_STATUS_UNKNOWN_ERROR);
241+ geis_error("creation of back end multiplexor failed");
242+ goto unwind_subscription_bag;
243+ }
244+ goto final_exit;
245+
246+unwind_subscription_bag:
247+ geis_subscription_bag_delete(geis->subscription_bag);
248+
249+unwind_geis:
250+ free(geis);
251+ geis = NULL;
252+
253+final_exit:
254 return geis;
255 }
256
257@@ -70,14 +97,27 @@
258 {
259 geis_debug("initializing GEIS server");
260 }
261- else if (0 == strcmp(init_arg_name, "geis-test-fixture"))
262+ else if (0 == strcmp(init_arg_name, GEIS_INIT_UTOUCH_MOCK_ENGINE))
263 {
264- geis_debug("initializing GEIS test fixture");
265- geis->is_test_fixture = GEIS_TRUE;
266+ if (NULL != geis->backend)
267+ {
268+ geis_error("multiple back ends requested, only using %s",\
269+ geis_backend_name(geis->backend));
270+ }
271+ else
272+ {
273+ geis_debug("initializing GEIS test fixture");
274+ geis->backend = geis_backend_new_test_fixture(geis);
275+ }
276 }
277
278 init_arg_name = va_arg(varargs, GeisString);
279 }
280+
281+ if (NULL == geis->backend)
282+ {
283+ geis_debug("initializing default GEIS back end");
284+ }
285 }
286
287
288@@ -110,6 +150,11 @@
289 {
290 return GEIS_STATUS_BAD_ARGUMENT;
291 }
292+
293+ if (geis->backend)
294+ geis_backend_delete(geis->backend);
295+ geis_backend_multiplexor_delete(geis->backend_multiplexor);
296+ geis_subscription_bag_delete(geis->subscription_bag);
297 free(geis);
298 return GEIS_STATUS_SUCCESS;
299 }
300@@ -127,8 +172,16 @@
301
302 if (0 == strcmp(configuration_item_name, GEIS_CONFIGURATION_FD))
303 {
304- /* status = GEIS_STATUS_SUCCESS; */
305- };
306+ *(int*)configuration_item_value
307+ = geis_backend_multiplexor_fd(geis->backend_multiplexor);
308+ status = GEIS_STATUS_SUCCESS;
309+ }
310+ else if (0 == strcmp(configuration_item_name, GEIS_CONFIG_UTOUCH_MAX_EVENTS))
311+ {
312+ *(int*)configuration_item_value
313+ = geis_backend_multiplexor_max_events_per_pump(geis->backend_multiplexor);
314+ status = GEIS_STATUS_SUCCESS;
315+ }
316
317 return status;
318 }
319@@ -142,7 +195,22 @@
320 GeisString configuration_item_name,
321 void *configuration_item_value)
322 {
323- return GEIS_STATUS_UNKNOWN_ERROR;
324+ GeisStatus status = GEIS_STATUS_NOT_SUPPORTED;
325+
326+ if (0 == strcmp(configuration_item_name, GEIS_CONFIG_UTOUCH_MAX_EVENTS))
327+ {
328+ int max_events = *(int *)configuration_item_value;
329+ geis_backend_multiplexor_set_max_events_per_pump(geis->backend_multiplexor,
330+ max_events);
331+ status = GEIS_STATUS_SUCCESS;
332+ }
333+ return status;
334+}
335+
336+
337+GeisErrorStack *geis_error_stack(Geis geis)
338+{
339+ return &geis->error_stack;
340 }
341
342
343
344=== added file 'libutouch-geis/geis_backend.c'
345--- libutouch-geis/geis_backend.c 1970-01-01 00:00:00 +0000
346+++ libutouch-geis/geis_backend.c 2010-12-02 19:24:57 +0000
347@@ -0,0 +1,65 @@
348+/**
349+ * @file geis_backend.c
350+ * @brief internal GEIS back end base class implementation
351+ *
352+ * Copyright 2010 Canonical Ltd.
353+ *
354+ * This library is free software; you can redistribute it and/or modify it under
355+ * the terms of the GNU Lesser General Public License as published by the Free
356+ * Software Foundation; either version 3 of the License, or (at your option) any
357+ * later version.
358+ *
359+ * This library is distributed in the hope that it will be useful, but WITHOUT
360+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
361+ * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
362+ * details.
363+ *
364+ * You should have received a copy of the GNU Lesser General Public License
365+ * along with this program; if not, write to the Free Software Foundation, Inc.,
366+ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
367+ */
368+#include "geis_backend.h"
369+#include "geis_backend_protected.h"
370+
371+#include "geis_logging.h"
372+#include <stdlib.h>
373+#include <string.h>
374+
375+
376+/*
377+ * Initializes the base portion of the back end.
378+ */
379+void
380+geis_backend_init_base(GeisBackend be_base,
381+ GeisBackendVtable be_vtbl,
382+ GeisString be_name)
383+{
384+ be_base->be_name = strdup(be_name);
385+ be_base->be_vtbl = be_vtbl;
386+}
387+
388+
389+/*
390+ * Destroys the back end.
391+ */
392+void
393+geis_backend_delete(GeisBackend be)
394+{
395+ if (be)
396+ {
397+ free((char *)be->be_name);
398+ be->be_vtbl->finalize(be);
399+ }
400+ geis_debug("%s back end destroyed", geis_backend_name(be));
401+}
402+
403+
404+/*
405+ * Gets the name of the back end (RTTI).
406+ */
407+GeisString
408+geis_backend_name(GeisBackend be)
409+{
410+ return be->be_name;
411+}
412+
413
414=== added file 'libutouch-geis/geis_backend.h'
415--- libutouch-geis/geis_backend.h 1970-01-01 00:00:00 +0000
416+++ libutouch-geis/geis_backend.h 2010-12-02 19:24:57 +0000
417@@ -0,0 +1,56 @@
418+/**
419+ * @file geis_backend.h
420+ * @brief internal GEIS back end base class public interface
421+ *
422+ * Copyright 2010 Canonical Ltd.
423+ *
424+ * This library is free software; you can redistribute it and/or modify it under
425+ * the terms of the GNU Lesser General Public License as published by the Free
426+ * Software Foundation; either version 3 of the License, or (at your option) any
427+ * later version.
428+ *
429+ * This library is distributed in the hope that it will be useful, but WITHOUT
430+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
431+ * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
432+ * details.
433+ *
434+ * You should have received a copy of the GNU Lesser General Public License
435+ * along with this program; if not, write to the Free Software Foundation, Inc.,
436+ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
437+ */
438+#ifndef GEIS_BACKEND_H_
439+#define GEIS_BACKEND_H_
440+
441+#include "geis/geis.h"
442+
443+/**
444+ * Provides a virtual "base class" for various GEIS back ends.
445+ *
446+ * The GEIS is an API that implements the facade pattern over some number of
447+ * actual "back end" implementations. Most internal operations of teh API are
448+ * performed through this "virtual base class" interface rather than through the
449+ * concrete back ends (isn;t object-oriented programming great?).
450+ */
451+typedef struct _GeisBackend *GeisBackend;
452+
453+
454+/**
455+ * Destroys the back end.
456+ *
457+ * @parameter[in] be The back end.
458+ *
459+ * This function behaves like a virtual destructor and chains through to the
460+ * concrete destructor call.
461+ */
462+void geis_backend_delete(GeisBackend be);
463+
464+/**
465+ * Gets the name of the back end.
466+ *
467+ * @parameter[in] be The back end.
468+ *
469+ * This accessor is useful for diagnostics.
470+ */
471+GeisString geis_backend_name(GeisBackend be);
472+
473+#endif /* GEIS_BACKEND_H_ */
474
475=== added file 'libutouch-geis/geis_backend_multiplexor.c'
476--- libutouch-geis/geis_backend_multiplexor.c 1970-01-01 00:00:00 +0000
477+++ libutouch-geis/geis_backend_multiplexor.c 2010-12-02 19:24:57 +0000
478@@ -0,0 +1,203 @@
479+/**
480+ * @file geis_backend_multiplexor.c
481+ * @brief internal GEIS backend multiplexor implementation
482+ *
483+ * Copyright 2010 Canonical Ltd.
484+ *
485+ * This library is free software; you can redistribute it and/or modify it under
486+ * the terms of the GNU Lesser General Public License as published by the Free
487+ * Software Foundation; either version 3 of the License, or (at your option) any
488+ * later version.
489+ *
490+ * This library is distributed in the hope that it will be useful, but WITHOUT
491+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
492+ * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
493+ * details.
494+ *
495+ * You should have received a copy of the GNU Lesser General Public License
496+ * along with this program; if not, write to the Free Software Foundation, Inc.,
497+ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
498+ */
499+#include "geis_config.h"
500+#include "geis_backend_multiplexor.h"
501+
502+#include <errno.h>
503+#include "geis_logging.h"
504+#include <stdlib.h>
505+#include <string.h>
506+#include <sys/epoll.h>
507+
508+
509+struct _GeisBackendMultiplexor
510+{
511+ int mx_fd;
512+ int mx_max_events_per_pump;
513+};
514+
515+typedef struct _CallbackInfo
516+{
517+ int fd;
518+ GeisBackendFdEventCallback callback;
519+ void *context;
520+} *CallbackInfo;
521+
522+
523+/**
524+ * Creates a new backend multiplexor.
525+ */
526+GeisBackendMultiplexor
527+geis_backend_multiplexor_new()
528+{
529+ GeisBackendMultiplexor mx = calloc(1, sizeof(struct _GeisBackendMultiplexor));
530+ if (!mx)
531+ {
532+ geis_error("failed to allocate backend multiplexor");
533+ }
534+ else
535+ {
536+ mx->mx_fd = epoll_create1(EPOLL_CLOEXEC);
537+ if (mx->mx_fd < 0)
538+ {
539+ geis_error("error %d creating backend multiplexor: %s",
540+ errno, strerror(errno));
541+ free(mx);
542+ }
543+ mx->mx_max_events_per_pump = GEIS_BE_MX_DEFAULT_EVENTS_PER_PUMP;
544+ }
545+
546+ return mx;
547+}
548+
549+
550+/**
551+ * Destroys an backend multiplexor.
552+ */
553+void
554+geis_backend_multiplexor_delete(GeisBackendMultiplexor mx)
555+{
556+ free(mx);
557+}
558+
559+
560+/**
561+ * Adds a file descriptor to an backend multiplexor.
562+ */
563+void
564+geis_backend_multiplexor_add_fd(GeisBackendMultiplexor mx,
565+ int fd,
566+ GeisBackendFdEventCallback callback,
567+ void *context)
568+{
569+ int status;
570+ struct epoll_event ev;
571+
572+ CallbackInfo callback_info = calloc(1, sizeof(struct _CallbackInfo));
573+ if (!callback_info)
574+ {
575+ geis_error("failed to allocate callback info structure");
576+ return;
577+ }
578+
579+ callback_info->fd = fd;
580+ callback_info->callback = callback;
581+ callback_info->context = context;
582+
583+ ev.events = EPOLLIN;
584+ ev.data.ptr = callback_info;
585+ status = epoll_ctl(mx->mx_fd, EPOLL_CTL_ADD, fd, &ev);
586+ if (status < 0)
587+ {
588+ geis_error("error %d multiplexing fd %d: %s",
589+ errno, fd, strerror(errno));
590+ }
591+}
592+
593+
594+/**
595+ * Removes a file descriptor from a backend multiplexor.
596+ *
597+ * @todo free callback_info
598+ */
599+void
600+geis_backend_multiplexor_remove_fd(GeisBackendMultiplexor mx, int fd)
601+{
602+ int status = epoll_ctl(mx->mx_fd, EPOLL_CTL_DEL, fd, NULL);
603+ if (status < 0)
604+ {
605+ geis_error("error %d multiplexing fd %d: %s",
606+ errno, fd, strerror(errno));
607+ }
608+}
609+
610+
611+/**
612+ * Gets the single file descriptor of the backend multiplexir itself.
613+ */
614+int
615+geis_backend_multiplexor_fd(GeisBackendMultiplexor mx)
616+{
617+ return mx->mx_fd;
618+}
619+
620+
621+/**
622+ * gets the maximum number of fd events per pump.
623+ */
624+int
625+geis_backend_multiplexor_max_events_per_pump(GeisBackendMultiplexor mx)
626+{
627+ return mx->mx_max_events_per_pump;
628+}
629+
630+
631+/**
632+ * Sets the maximum number of fd events processed per pump.
633+ */
634+void
635+geis_backend_multiplexor_set_max_events_per_pump(GeisBackendMultiplexor mx,
636+ int max_events_per_pump)
637+{
638+ mx->mx_max_events_per_pump = max_events_per_pump;
639+}
640+
641+
642+/**
643+ * Dispatches events on the multiplexed file descriptors.
644+ */
645+GeisStatus
646+geis_backend_multiplexor_pump(GeisBackendMultiplexor mx)
647+{
648+ GeisStatus status = GEIS_STATUS_UNKNOWN_ERROR;
649+ int i;
650+ int processed_event_count = 0;
651+ int available_event_count = 1;
652+ struct epoll_event events[4];
653+
654+ while (available_event_count > 0
655+ && processed_event_count < mx->mx_max_events_per_pump)
656+ {
657+ available_event_count = epoll_wait(mx->mx_fd, events, 4, 0);
658+ if (available_event_count < 0)
659+ {
660+ geis_error("error %d in epoll_wait: %s", errno, strerror(errno));
661+ goto error_exit;
662+ }
663+
664+ for (i = 0; i < available_event_count; ++i)
665+ {
666+ CallbackInfo callback_info = (CallbackInfo)events[i].data.ptr;
667+ callback_info->callback(callback_info->fd,
668+ GEIS_BE_MX_READ_AVAILABLE,
669+ callback_info->context);
670+ ++processed_event_count;
671+ }
672+ }
673+ if (available_event_count)
674+ status = GEIS_STATUS_CONTINUE;
675+ else
676+ status = GEIS_STATUS_SUCCESS;
677+
678+error_exit:
679+ return status;
680+}
681+
682
683=== added file 'libutouch-geis/geis_backend_multiplexor.h'
684--- libutouch-geis/geis_backend_multiplexor.h 1970-01-01 00:00:00 +0000
685+++ libutouch-geis/geis_backend_multiplexor.h 2010-12-02 19:24:57 +0000
686@@ -0,0 +1,129 @@
687+/**
688+ * @file geis_backend_multiplexor.h
689+ * @brief internal GEIS backend multiplexor interface
690+ *
691+ * Copyright 2010 Canonical Ltd.
692+ *
693+ * This library is free software; you can redistribute it and/or modify it under
694+ * the terms of the GNU Lesser General Public License as published by the Free
695+ * Software Foundation; either version 3 of the License, or (at your option) any
696+ * later version.
697+ *
698+ * This library is distributed in the hope that it will be useful, but WITHOUT
699+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
700+ * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
701+ * details.
702+ *
703+ * You should have received a copy of the GNU Lesser General Public License
704+ * along with this program; if not, write to the Free Software Foundation, Inc.,
705+ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
706+ */
707+#ifndef GEIS_BACKEND_MULTIPLEXOR_H_
708+#define GEIS_BACKEND_MULTIPLEXOR_H_
709+
710+#include "geis/geis.h"
711+
712+
713+/**
714+ * Multiplexes back end events into a single notification file descriptor.
715+ *
716+ * The GEIS API presents a single file descriptor to the application to watch
717+ * for activity notification. A back end may be monitoring activity on more
718+ * than one file descriptor. The multiplexor combines these requirements.
719+ */
720+typedef struct _GeisBackendMultiplexor *GeisBackendMultiplexor;
721+
722+/**
723+ * Indicates the type of fd event that occurred on a multiplexed descriptor.
724+ */
725+typedef enum _GeisBackendMultiplexorEvent
726+{
727+ GEIS_BE_MX_READ_AVAILABLE,
728+ GEIS_BE_MX_WRITE_AVAILABLE
729+} GeisBackendMultiplexorEvent;
730+
731+/**
732+ * Handles events occurring on multiplexed file descriptors.
733+ *
734+ * Back ends must provide a callback with this signature to the multiplexor.
735+ */
736+typedef void (*GeisBackendFdEventCallback)(int fd,
737+ GeisBackendMultiplexorEvent event,
738+ void *context);
739+
740+/**
741+ * Constructs a new back end multiplexor.
742+ */
743+GeisBackendMultiplexor geis_backend_multiplexor_new();
744+
745+/**
746+ * A reasonable default value for the max_events_per_pump parameter to
747+ * geis_backend_multiplexor_new().
748+ */
749+#define GEIS_BE_MX_DEFAULT_EVENTS_PER_PUMP 16
750+
751+/**
752+ * Destroys a back end multiplexor.
753+ *
754+ * @param[in] mx The back end multiplexor to destroy.
755+ */
756+void geis_backend_multiplexor_delete(GeisBackendMultiplexor mx);
757+
758+/**
759+ * Adds a file descriptor to a back end multiplexor.
760+ *
761+ * @param[in] mx The back end multiplexor.
762+ * @param[in] fd The file descriptor to add.
763+ */
764+void geis_backend_multiplexor_add_fd(GeisBackendMultiplexor mx,
765+ int fd,
766+ GeisBackendFdEventCallback callback,
767+ void *context);
768+
769+/**
770+ * Removes a file descriptor from a back end multiplexor.
771+ *
772+ * @param[in] mx The back end multiplexor.
773+ * @param[in] fd The file descriptor to remove.
774+ */
775+void geis_backend_multiplexor_remove_fd(GeisBackendMultiplexor mx,
776+ int fd);
777+
778+/**
779+ * Gets the file descriptor of the back end multiplexor.
780+ *
781+ * @param[in] mx The back end multiplexor.
782+ */
783+int geis_backend_multiplexor_fd(GeisBackendMultiplexor mx);
784+
785+/**
786+ * Gets the maximum number of fd events per pump.
787+ *
788+ * @param[in] mx The back end multiplexor.
789+ */
790+int geis_backend_multiplexor_max_events_per_pump(GeisBackendMultiplexor mx);
791+
792+/**
793+ * Sets the maximum fd events per pump of the multiplexor.
794+ *
795+ * @param[in] mx The back end multiplexor.
796+ * @param[in] max_events_per_pump The maximum number of fd events pumped
797+ * per call of geis_backend_multiplexor_pump().
798+ *
799+ * This value is tunable to accommodate different back ends and
800+ * application/toolkit requirements.
801+ */
802+void geis_backend_multiplexor_set_max_events_per_pump(GeisBackendMultiplexor mx,
803+ int max_events_per_pump);
804+
805+/**
806+ * Exercises the back end multiplexor.
807+ *
808+ * @param[in] mx The back end multiplexor.
809+ *
810+ * Dispatches any events on multiplexed file descriptors to their assciated
811+ * handlers.
812+ */
813+GeisStatus geis_backend_multiplexor_pump(GeisBackendMultiplexor mx);
814+
815+#endif /* GEIS_BACKEND_MULTIPLEXOR_H_ */
816
817=== added file 'libutouch-geis/geis_backend_protected.h'
818--- libutouch-geis/geis_backend_protected.h 1970-01-01 00:00:00 +0000
819+++ libutouch-geis/geis_backend_protected.h 2010-12-02 19:24:57 +0000
820@@ -0,0 +1,61 @@
821+/**
822+ * @file geis_backend_protected.h
823+ * @brief internal GEIS back end base class "protected" interface
824+ *
825+ * This file contains the implementation interface for the various GEIS v2 back
826+ * ends.
827+ */
828+
829+/*
830+ * Copyright 2010 Canonical Ltd.
831+ *
832+ * This library is free software; you can redistribute it and/or modify it under
833+ * the terms of the GNU Lesser General Public License as published by the Free
834+ * Software Foundation; either version 3 of the License, or (at your option) any
835+ * later version.
836+ *
837+ * This library is distributed in the hope that it will be useful, but WITHOUT
838+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
839+ * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
840+ * details.
841+ *
842+ * You should have received a copy of the GNU Lesser General Public License
843+ * along with this program; if not, write to the Free Software Foundation, Inc.,
844+ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
845+ */
846+#ifndef GEIS_BACKEND_PROTECTED_H_
847+#define GEIS_BACKEND_PROTECTED_H_
848+
849+#include "geis/geis.h"
850+#include "geis_backend.h"
851+
852+
853+/**
854+ * The custom dispatch table for "derived" GEIS v2 backends.
855+ */
856+typedef struct _GeisBackendVtable
857+{
858+ void (* finalize)(GeisBackend);
859+} *GeisBackendVtable;
860+
861+/**
862+ * The "base" class of all the GEIS v2 backends.
863+ */
864+struct _GeisBackend {
865+ GeisString be_name;
866+ GeisBackendVtable be_vtbl;
867+};
868+
869+
870+/**
871+ * Initializes the base portion of the GEIS v2 backends.
872+ *
873+ * @param[in] be_base The GeisBackend portion of the back end object.
874+ * @param[in] be_vtbl An initialized GeisBackendVtable.
875+ * @param[in] be_name The name of the back end.
876+ */
877+void geis_backend_init_base(GeisBackend be_base,
878+ GeisBackendVtable be_vtbl,
879+ GeisString be_name);
880+
881+#endif /* GEIS_BACKEND_PROTECTED_H_ */
882
883=== added file 'libutouch-geis/geis_backend_test_fixture.c'
884--- libutouch-geis/geis_backend_test_fixture.c 1970-01-01 00:00:00 +0000
885+++ libutouch-geis/geis_backend_test_fixture.c 2010-12-02 19:24:57 +0000
886@@ -0,0 +1,63 @@
887+/**
888+ * @file geis_backend_test_fixture.c
889+ * @brief GEIS mock back end test fixture implementation
890+ *
891+ * Copyright 2010 Canonical Ltd.
892+ *
893+ * This library is free software; you can redistribute it and/or modify it under
894+ * the terms of the GNU Lesser General Public License as published by the Free
895+ * Software Foundation; either version 3 of the License, or (at your option) any
896+ * later version.
897+ *
898+ * This library is distributed in the hope that it will be useful, but WITHOUT
899+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
900+ * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
901+ * details.
902+ *
903+ * You should have received a copy of the GNU Lesser General Public License
904+ * along with this program; if not, write to the Free Software Foundation, Inc.,
905+ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
906+ */
907+#include "geis_backend.h"
908+#include "geis_backend_protected.h"
909+
910+#include "geis_logging.h"
911+#include <stdlib.h>
912+
913+
914+typedef struct _GeisBackendTestFixture
915+{
916+ struct _GeisBackend tf_base;
917+} *GeisBackendTestFixture;
918+
919+
920+static void
921+geis_backend_finalize(GeisBackend be)
922+{
923+ GeisBackendTestFixture tf __attribute__((unused)) = (GeisBackendTestFixture)be;
924+}
925+
926+
927+static struct _GeisBackendVtable tf_vtbl = {
928+ geis_backend_finalize
929+};
930+
931+GeisBackend
932+geis_backend_new_test_fixture(Geis geis __attribute__((unused)))
933+{
934+ GeisBackendTestFixture tf = calloc(1, sizeof(struct _GeisBackendTestFixture));
935+ if (!tf)
936+ {
937+ geis_error("failed to allocate GEIS back end test fixture");
938+ goto nomem;
939+ }
940+
941+ geis_backend_init_base(&tf->tf_base, &tf_vtbl, "GEIS2 test fixture");
942+
943+ geis_debug("%s back end created", geis_backend_name(&tf->tf_base));
944+
945+nomem:
946+ return (GeisBackend)tf;
947+}
948+
949+
950
951=== added file 'libutouch-geis/geis_backend_test_fixture.h'
952--- libutouch-geis/geis_backend_test_fixture.h 1970-01-01 00:00:00 +0000
953+++ libutouch-geis/geis_backend_test_fixture.h 2010-12-02 19:24:57 +0000
954@@ -0,0 +1,35 @@
955+/**
956+ * @file geis_backend_test_fixture.h
957+ * @brief internal GEIS test fixture back end class
958+ *
959+ * Copyright 2010 Canonical Ltd.
960+ *
961+ * This library is free software; you can redistribute it and/or modify it under
962+ * the terms of the GNU Lesser General Public License as published by the Free
963+ * Software Foundation; either version 3 of the License, or (at your option) any
964+ * later version.
965+ *
966+ * This library is distributed in the hope that it will be useful, but WITHOUT
967+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
968+ * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
969+ * details.
970+ *
971+ * You should have received a copy of the GNU Lesser General Public License
972+ * along with this program; if not, write to the Free Software Foundation, Inc.,
973+ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
974+ */
975+#ifndef GEIS_BACKEND_TEST_FIXTURE_H_
976+#define GEIS_BACKEND_TEST_FIXTURE_H_
977+
978+#include "geis/geis.h"
979+
980+/**
981+ * Constructs a new GEIS Test Fuixture back end.
982+ *
983+ * @param[in] geis The API instance the back end will run in.
984+ *
985+ * The Test Fixture back end is used in unit tests.
986+ */
987+GeisBackend geis_backend_new_test_fixture(Geis geis);
988+
989+#endif /* GEIS_BACKEND_TEST_FIXTURE_H_ */
990
991=== modified file 'libutouch-geis/geis_error.c'
992--- libutouch-geis/geis_error.c 2010-11-28 00:41:24 +0000
993+++ libutouch-geis/geis_error.c 2010-12-02 19:24:57 +0000
994@@ -74,7 +74,7 @@
995 {
996 if (geis)
997 {
998- geis_error_stack_clear(&geis->error_stack);
999+ geis_error_stack_clear(geis_error_stack(geis));
1000 }
1001 else
1002 {
1003@@ -88,7 +88,7 @@
1004 {
1005 if (geis)
1006 {
1007- geis_error_stack_push(&geis->error_stack, code);
1008+ geis_error_stack_push(geis_error_stack(geis), code);
1009 }
1010 else
1011 {
1012@@ -102,7 +102,7 @@
1013 {
1014 if (geis)
1015 {
1016- return geis->error_stack.error_count;
1017+ return geis_error_stack(geis)->error_count;
1018 }
1019 else
1020 {
1021@@ -117,7 +117,7 @@
1022 GeisStatus status = GEIS_STATUS_UNKNOWN_ERROR;
1023 if (geis)
1024 {
1025- status = geis_error_stack_get(&geis->error_stack, index);
1026+ status = geis_error_stack_get(geis_error_stack(geis), index);
1027 }
1028 else
1029 {
1030
1031=== modified file 'libutouch-geis/geis_private.h'
1032--- libutouch-geis/geis_private.h 2010-11-29 02:16:02 +0000
1033+++ libutouch-geis/geis_private.h 2010-12-02 19:24:57 +0000
1034@@ -27,13 +27,10 @@
1035 #include "geis_subscription.h"
1036
1037
1038-struct _Geis
1039-{
1040- GeisBoolean is_test_fixture;
1041- GeisErrorStack error_stack;
1042- GeisSubBag subscription_bag;
1043-};
1044-
1045+/**
1046+ * Gets the error stack drom the geis object.
1047+ */
1048+GeisErrorStack *geis_error_stack(Geis geis);
1049
1050 /**
1051 * Gets the subscription container from the geis object.
1052
1053=== modified file 'testsuite/geis2/check_config.c'
1054--- testsuite/geis2/check_config.c 2010-11-25 03:14:17 +0000
1055+++ testsuite/geis2/check_config.c 2010-12-02 19:24:57 +0000
1056@@ -12,7 +12,7 @@
1057 static void
1058 construct_geis()
1059 {
1060- geis = geis_new("geis-test-fixture", NULL);
1061+ geis = geis_new(GEIS_INIT_UTOUCH_MOCK_ENGINE, NULL);
1062 }
1063
1064 /* fixture teardown */
1065@@ -37,7 +37,7 @@
1066 START_TEST(get_fail)
1067 {
1068 int fd = -1;
1069- GeisStatus status = geis_get_configuration(geis, 1234, &fd);
1070+ GeisStatus status = geis_get_configuration(geis, "no such configuration", &fd);
1071 fail_unless(status == GEIS_STATUS_NOT_SUPPORTED,
1072 "unexpected return status from geis_get_configuration()");
1073 }
1074
1075=== modified file 'testsuite/geis2/check_error_codes.c'
1076--- testsuite/geis2/check_error_codes.c 2010-11-21 17:00:48 +0000
1077+++ testsuite/geis2/check_error_codes.c 2010-12-02 19:24:57 +0000
1078@@ -9,6 +9,8 @@
1079 START_TEST(error_codes)
1080 {
1081 GeisStatus error = GEIS_STATUS_SUCCESS ;
1082+ error = GEIS_STATUS_CONTINUE;
1083+ error = GEIS_STATUS_EMPTY;
1084 error = GEIS_STATUS_NOT_SUPPORTED;
1085 error = GEIS_STATUS_BAD_ARGUMENT;
1086 error = GEIS_STATUS_UNKNOWN_ERROR;
1087
1088=== modified file 'testsuite/geis2/check_geis_new.c'
1089--- testsuite/geis2/check_geis_new.c 2010-11-23 03:31:21 +0000
1090+++ testsuite/geis2/check_geis_new.c 2010-12-02 19:24:57 +0000
1091@@ -8,7 +8,7 @@
1092 /* compile-time test to ensure required types are defined */
1093 START_TEST(geis_new_and_delete)
1094 {
1095- Geis geis = geis_new("geis-test-fixture", NULL);
1096+ Geis geis = geis_new(GEIS_INIT_UTOUCH_MOCK_ENGINE, NULL);
1097 fail_unless(geis != NULL, "failed to create GEIS v2.0 API instance");
1098
1099 GeisStatus status = geis_delete(geis);
1100
1101=== modified file 'testsuite/geis2/check_subscription.c'
1102--- testsuite/geis2/check_subscription.c 2010-11-29 02:16:02 +0000
1103+++ testsuite/geis2/check_subscription.c 2010-12-02 19:24:57 +0000
1104@@ -14,7 +14,7 @@
1105 static void
1106 construct_geis()
1107 {
1108- g_geis = geis_new("geis-test-fixture", NULL);
1109+ g_geis = geis_new(GEIS_INIT_UTOUCH_MOCK_ENGINE, NULL);
1110 }
1111
1112 /* fixture teardown */
1113
1114=== modified file 'testsuite/libutouch-geis/Makefile.am'
1115--- testsuite/libutouch-geis/Makefile.am 2010-11-29 02:16:02 +0000
1116+++ testsuite/libutouch-geis/Makefile.am 2010-12-02 19:24:57 +0000
1117@@ -32,6 +32,7 @@
1118
1119 check_geis2_internals_SOURCES = \
1120 check_attr.c \
1121+ check_backend_multiplexor.c \
1122 check_error_reporting.c \
1123 check_subscription.c \
1124 check_geis2_internals.c
1125
1126=== added file 'testsuite/libutouch-geis/check_backend_multiplexor.c'
1127--- testsuite/libutouch-geis/check_backend_multiplexor.c 1970-01-01 00:00:00 +0000
1128+++ testsuite/libutouch-geis/check_backend_multiplexor.c 2010-12-02 19:24:57 +0000
1129@@ -0,0 +1,127 @@
1130+/**
1131+ * internal unit tests for the uTouch GEIS v2.0 backend_multiplexor module
1132+ */
1133+#include <check.h>
1134+
1135+#include "geis/geis.h"
1136+#include "libutouch-geis/geis_backend_multiplexor.h"
1137+#include <stdio.h>
1138+#include <sys/select.h>
1139+#include <unistd.h>
1140+
1141+
1142+/* fixtures */
1143+static GeisBackendMultiplexor g_mx;
1144+
1145+/* fixture setup */
1146+static void
1147+construct_mx()
1148+{
1149+ g_mx = geis_backend_multiplexor_new();
1150+}
1151+
1152+/* fixture teardown */
1153+static void
1154+destroy_mx()
1155+{
1156+ geis_backend_multiplexor_delete(g_mx);
1157+}
1158+
1159+static void
1160+testcase_event_callback(int fd, GeisBackendMultiplexorEvent event, void *context)
1161+{
1162+ char buf[2];
1163+ (void)read(fd, buf, 1);
1164+ *(int *)context += 1;
1165+}
1166+
1167+
1168+/* verify bag construction/destruction */
1169+START_TEST(construction)
1170+{
1171+ construct_mx();
1172+ fail_unless(g_mx != NULL, "failed to create backend_multiplexor");
1173+ fail_unless(geis_backend_multiplexor_fd(g_mx) >= 0, "invalid MX fd");
1174+ fail_unless(geis_backend_multiplexor_max_events_per_pump(g_mx) == GEIS_BE_MX_DEFAULT_EVENTS_PER_PUMP, "unexpected max fd per pump value");
1175+ destroy_mx();
1176+}
1177+END_TEST
1178+
1179+
1180+/* verify multiplexor wait */
1181+START_TEST(mx_wait)
1182+{
1183+ int pfd[2];
1184+ int mx_fd = geis_backend_multiplexor_fd(g_mx);
1185+ int called = 0;
1186+ int status = 0;
1187+ int first_time = 1;
1188+
1189+ (void)pipe(pfd);
1190+ geis_backend_multiplexor_add_fd(g_mx, pfd[0], testcase_event_callback, &called);
1191+
1192+ while (1)
1193+ {
1194+ fd_set fds;
1195+ FD_ZERO(&fds);
1196+ FD_SET(mx_fd, &fds);
1197+
1198+ struct timeval tm;
1199+ tm.tv_sec = 0;
1200+ tm.tv_usec = 5000;
1201+
1202+ status = select(mx_fd+1, &fds, NULL, NULL, &tm);
1203+ fail_if(status < 0, "error in select");
1204+ if (status < 0)
1205+ {
1206+ break;
1207+ }
1208+ else if (0 == status)
1209+ {
1210+ fprintf(stderr, "select timeout\n");
1211+ fail_unless(first_time, "select timed out before read");
1212+ if (!first_time)
1213+ {
1214+ break;
1215+ }
1216+ first_time = 0;
1217+ (void)write(pfd[1], "1", 1);
1218+ }
1219+ else
1220+ {
1221+ geis_backend_multiplexor_pump(g_mx);
1222+ break;
1223+ }
1224+ }
1225+
1226+ fail_if(called == 0, "MX event callback not called");
1227+ fail_if(called > 1, "MX event callback called too many times");
1228+}
1229+END_TEST
1230+
1231+START_TEST(mx_config)
1232+{
1233+ geis_backend_multiplexor_set_max_events_per_pump(g_mx, 24);
1234+ fail_unless(geis_backend_multiplexor_max_events_per_pump(g_mx) == 24,
1235+ "unexpected max fd per pump value");
1236+}
1237+END_TEST
1238+
1239+/* boilerplate */
1240+Suite *
1241+make_backend_multiplexor_suite()
1242+{
1243+ Suite *s = suite_create("utouch-geis2-backend-multiplexor");
1244+
1245+ TCase *create = tcase_create("backend-multiplexor-creation");
1246+ tcase_add_test(create, construction);
1247+ suite_add_tcase(s, create);
1248+
1249+ TCase *usage = tcase_create("backend-multiplexor-usage");
1250+ tcase_add_checked_fixture(usage, construct_mx, destroy_mx);
1251+ tcase_add_test(usage, mx_wait);
1252+ suite_add_tcase(s, usage);
1253+
1254+ return s;
1255+}
1256+
1257
1258=== modified file 'testsuite/libutouch-geis/check_geis2_internals.c'
1259--- testsuite/libutouch-geis/check_geis2_internals.c 2010-11-29 02:16:02 +0000
1260+++ testsuite/libutouch-geis/check_geis2_internals.c 2010-12-02 19:24:57 +0000
1261@@ -6,6 +6,7 @@
1262 extern Suite *make_error_reporting_suite();
1263 extern Suite *make_attr_suite();
1264 extern Suite *make_subscription_suite();
1265+extern Suite *make_backend_multiplexor_suite();
1266
1267
1268 int
1269@@ -19,6 +20,7 @@
1270 srunner_add_suite(sr, make_error_reporting_suite());
1271 srunner_add_suite(sr, make_attr_suite());
1272 srunner_add_suite(sr, make_subscription_suite());
1273+ srunner_add_suite(sr, make_backend_multiplexor_suite());
1274
1275 srunner_set_log(sr, "geis2_internals.log");
1276 srunner_run_all(sr, CK_NORMAL);
1277
1278=== modified file 'testsuite/libutouch-geis/check_subscription.c'
1279--- testsuite/libutouch-geis/check_subscription.c 2010-11-29 02:16:02 +0000
1280+++ testsuite/libutouch-geis/check_subscription.c 2010-12-02 19:24:57 +0000
1281@@ -16,7 +16,7 @@
1282 static void
1283 construct_bag()
1284 {
1285- g_geis = geis_new("geis-test-fixture", NULL);
1286+ g_geis = geis_new(GEIS_INIT_UTOUCH_MOCK_ENGINE, NULL);
1287 g_sub_bag = geis_subscription_bag_new(1);
1288 }
1289

Subscribers

People subscribed via source and target branches

to all changes: