#ifndef __FORENSICS_NTFSMFTENTRY_HH__
#define __FORENSICS_NTFSMFTENTRY_HH__

#include "forensics.hh"
#include "ntfsseglist.hh"

struct resident {
  std::string filename;
  int64_t length;
  int64_t offsetDATAattr;
  int64_t entryLocation;              // offset within image file
  int64_t offsetInEntry;              // offset within MFT entry
};

struct nonresident {
  std::string filename;
  int64_t length;
  int64_t initializedSize;
  int64_t offsetDATAattr;
  std::vector<int64_t> clusters;
  seglist segs;
  int64_t parentMFTentry;
  char name_type;
  int alloc;
  int inUse;
  int compressed;
  int nlink;
  int ownerID;
  int64_t sequenceValue;
  uint64_t ctime;
  uint64_t atime;
  uint64_t crtime;
  uint64_t mtime;
  uint64_t fixupSignature;
  int64_t offsetFileNameAttr;
  int64_t runlistOffset;
};

class NTFSMFTEntry {
  nonresident NonResident;
  resident Resident;
  int Res;
public:
  NTFSMFTEntry ();
  ~NTFSMFTEntry();
    
  void set_resVnonres ( int );
  int get_resVnonres () { 
    return Res; 
  };

  void set_filename ( std::string );
  std::string get_filename ();
    
  void set_length ( int64_t );
  int64_t get_length ();    

  void set_initializedSize (int64_t );
  int64_t get_initializedSize ();
  
  void set_entryLocation ( int64_t );
  int64_t get_entryLocation ();

  void set_offsetInEntry ( int64_t );
  int64_t get_offsetInEntry ();
	
  void set_offsetDATAattr ( int64_t );
  int64_t get_offsetDATAattr ();

  void set_clusters ( std::vector<int64_t> );
  void push_back ( int64_t );
  std::vector<int64_t> get_clusters () { return NonResident.clusters; };
  void printClusters ();

  void set_seglist ( seglist );
  seglist get_seglist () { return NonResident.segs; }

  void set_parentMFTentry ( int64_t );
  int64_t get_parentMFTentry ();

  void set_name_type ( char );
  char get_name_type ();

  void set_alloc ( int );
  int get_alloc ();

  void set_inUse ( int );
  int get_inUse ();

  void set_compressed ( int );
  int get_compressed ();

  void set_nlink ( int );
  int get_nlink ();

  void set_ownerID ( int );
  int get_ownerID ();

  void set_sequenceValue ( int64_t );
  int64_t get_sequenceValue ();

  void set_ctime ( uint64_t );
  uint64_t get_ctime ();

  void set_atime ( uint64_t );
  uint64_t get_atime ();

  void set_crtime ( uint64_t );
  uint64_t get_crtime ();

  void set_mtime ( uint64_t );
  uint64_t get_mtime ();

  void set_fixupSignature ( uint64_t );
  uint64_t get_fixupSignature ();

  void set_offsetFileNameAttr (int64_t);
  int64_t get_offsetFileNameAttr ();

  void set_runlistOffset ( int64_t );
  int64_t get_runlistOffset ();

};

#endif
