summaryrefslogtreecommitdiff
path: root/inc
diff options
context:
space:
mode:
authorLudovic Pouzenc <ludovic@pouzenc.fr>2011-03-06 20:46:29 +0000
committerLudovic Pouzenc <ludovic@pouzenc.fr>2011-03-06 20:46:29 +0000
commit6c701b58a24d96e37c323412f3d2aa334cd2ded1 (patch)
treea959865f001c94ce70bd94b5cd0f09c725f28fc4 /inc
parent8d663918601896f6f5759a0f0b86a0131201dcfb (diff)
download2011-ddhardrescue-6c701b58a24d96e37c323412f3d2aa334cd2ded1.tar.gz
2011-ddhardrescue-6c701b58a24d96e37c323412f3d2aa334cd2ded1.tar.bz2
2011-ddhardrescue-6c701b58a24d96e37c323412f3d2aa334cd2ded1.zip
La gestion minimaliste des évènements de modification des slices est faite.
Un dump à chaque event a été codé dans le main pour tester cet aspect. C'est ok. Go go go ncurses :D git-svn-id: file:///var/svn/2011-ddhardrescue/trunk@11 d3078510-dda0-49f1-841c-895ef4b7ec81
Diffstat (limited to 'inc')
-rwxr-xr-xinc/recover.h4
-rw-r--r--inc/slices_evt.h17
2 files changed, 19 insertions, 2 deletions
diff --git a/inc/recover.h b/inc/recover.h
index 2af7f3f..eee8141 100755
--- a/inc/recover.h
+++ b/inc/recover.h
@@ -1,11 +1,11 @@
#ifndef RECOVER_H
#define RECOVER_H
-#include "slices.h"
+#include "slices_evt.h"
extern int end;
-void recover(slices_t *slices, char *src, char *dst, char*ddOpts);
+void recover(slices_evt_t *slicesEvt, char *src, char *dst, char*ddOpts);
int tryRecoverUntilError(slice_t *sliceToRead, address_t *firstError, char *src, char *dst, char *ddOpts);
#endif /*RECOVER_H*/
diff --git a/inc/slices_evt.h b/inc/slices_evt.h
new file mode 100644
index 0000000..e7d44fe
--- /dev/null
+++ b/inc/slices_evt.h
@@ -0,0 +1,17 @@
+#ifndef SLICES_EVT_H
+#define SLICES_EVT_H
+
+#include "slices.h"
+
+//typedef enum { EV_BOUNDARY, EV_TYPE } sliceEvtKind_t;
+
+typedef struct _slices_evt_t {
+ slices_t *data;
+ pthread_mutex_t mutex;
+ void (*eventListener)(/*sliceEvtKind_t evtKind,*/ struct _slices_evt_t *slicesEvt, slice_t *slice);
+} slices_evt_t;
+
+int sliceSplitEvt(slices_evt_t *slicesEvt, slice_t *initialSlice, address_t splitAt, sliceStatus_t statusBefore, sliceStatus_t statusAt, sliceStatus_t statusAfter);
+
+#endif /*SLICES_EVT_H */
+