1 /*
2  * The Sleuth Kit
3  *
4  * Contact: Brian Carrier [carrier <at> sleuthkit [dot] org]
5  * Copyright (c) 2010-2012 Basis Technology Corporation. All Rights
6  * reserved.
7  *
8  * This software is distributed under the Common Public License 1.0
9  */
10 
11 /**
12  * \file CarvePrep.h
13  * Contains the interface of the abstract CarvePrep class.
14  */
15 #ifndef _TSK_CARVE_PREP_H
16 #define _TSK_CARVE_PREP_H
17 
18 #include "tsk/framework/services/TskImgDB.h"
19 
20 /**
21  * Interface for class that prepares for later carving.
22  * CarvePrep is responsible for making unallocated sectors image files for
23  * later carving.  The implementation can choose to create 1 or dozens
24  * of such files.  Refer to \ref fw_extract_carve for details,
25  * but this class should get unallocated image IDs from TskImgDB,
26  * populate the unalloc_alloc map in the database, and schedule
27  * each unallocated image for later carving.
28  */
29 class TSK_FRAMEWORK_API CarvePrep
30 {
31 public:
32     /**
33      * Virtual destructor to ensure derived class constructors are called
34      * polymorphically.
35      */
~CarvePrep(void)36     virtual ~CarvePrep(void) {}
37 
38     /**
39      * Make one or more unallocated sectors image files to carve.
40      *
41      * @returns 0 on success, 1 on error.
42      */
43     virtual int processSectors() = 0;
44 };
45 
46 #endif
47