summaryrefslogtreecommitdiffstats
path: root/event.h
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@dside.dyndns.org>2011-12-08 03:47:23 +0100
committerSuren A. Chilingaryan <csa@dside.dyndns.org>2011-12-08 03:47:23 +0100
commit869ed99dbc3a645fee6de36e97e1e12127068f10 (patch)
treefa4a4e7ef977a3d3621ff5e96fb664e6fbc9e6fe /event.h
parentddc77c1e819eee03a13efff4a9aa3161485f3f1f (diff)
downloadipecamera-869ed99dbc3a645fee6de36e97e1e12127068f10.tar.gz
ipecamera-869ed99dbc3a645fee6de36e97e1e12127068f10.tar.bz2
ipecamera-869ed99dbc3a645fee6de36e97e1e12127068f10.tar.xz
ipecamera-869ed99dbc3a645fee6de36e97e1e12127068f10.zip
new event architecture, first trial
Diffstat (limited to 'event.h')
-rw-r--r--event.h34
1 files changed, 29 insertions, 5 deletions
diff --git a/event.h b/event.h
index 7c1f1cd..7a1810a 100644
--- a/event.h
+++ b/event.h
@@ -9,17 +9,41 @@ struct pcilib_event_api_description_s {
int (*reset)(pcilib_context_t *ctx);
- int (*start)(pcilib_context_t *ctx, pcilib_event_t event_mask, pcilib_event_callback_t callback, void *user);
- int (*stop)(pcilib_context_t *ctx);
+ int (*start)(pcilib_context_t *ctx, pcilib_event_t event_mask, pcilib_event_flags_t flags);
+ int (*stop)(pcilib_context_t *ctx, pcilib_event_flags_t flags);
int (*trigger)(pcilib_context_t *ctx, pcilib_event_t event, size_t trigger_size, void *trigger_data);
- pcilib_event_id_t (*next_event)(pcilib_context_t *ctx, pcilib_event_t event_mask, pcilib_timeout_t timeout);
- void* (*get_data)(pcilib_context_t *ctx, pcilib_event_id_t event_id, pcilib_event_data_type_t data_type, size_t arg_size, void *arg, size_t *size);
- int (*return_data)(pcilib_context_t *ctx, pcilib_event_id_t event_id);
+ int (*stream)(pcilib_context_t *ctx, pcilib_event_callback_t callback, void *user);
+ pcilib_event_id_t (*next_event)(pcilib_context_t *ctx, pcilib_timeout_t timeout, pcilib_event_id_t *evid, pcilib_event_info_t **info);
+
+ void* (*get_data)(pcilib_context_t *ctx, pcilib_event_id_t event_id, pcilib_event_data_type_t data_type, size_t arg_size, void *arg, size_t *size, void *data);
+ int (*return_data)(pcilib_context_t *ctx, pcilib_event_id_t event_id, void *data);
pcilib_dma_context_t *(*init_dma)(pcilib_context_t *ctx);
+};
+
+
+typedef struct {
+ size_t max_events;
+ pcilib_timeout_t duration;
+} pcilib_autostop_parameters_t;
+typedef struct {
+ pcilib_event_rawdata_callback_t callback;
+ void *user;
+} pcilib_rawdata_parameters_t;
+
+typedef struct {
+ pcilib_autostop_parameters_t autostop;
+ pcilib_rawdata_parameters_t rawdata;
+} pcilib_event_parameters_t;
+
+struct pcilib_event_context_s {
+ pcilib_event_parameters_t params;
+ pcilib_t *pcilib;
};
+int pcilib_init_event_engine(pcilib_t *ctx);
+
#endif /* _PCILIB_EVENT_H */