/*!
  @header FTFileStoreTEST
  @abstract Module of FT
 
  @availability OS X, GNUstep
  @copyright 2004, 2005 Free Software Foundation, Inc.
  
  Author: Oliver Langer

  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 2 of the License, or
  (at your option) any later version.

  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this program; if not, write to the Free Software
  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

  <pre>
  -------------------------------------------------------------------------
  Modification history

  13.11.05 ola     initial version
  -------------------------------------------------------------------------
  </pre>
*/

#if !defined(__FTFileStoreTEST_H)
#define __FTFileStoreTEST_H

#include <Foundation/Foundation.h>
#include <FT/FT.h>
#include "FTBaseTEST.h"


@protocol FTDirectoryStructureEvents
- addDirectory: (NSString *) directory ofParentDirectory: (NSString *) parent;
- addFile: (NSString *) aFile ofParentDirectory: (NSString *) parent;
@end 



/*!
 * @class FTFileStoreTEST
 * @abstract What's about it
 * @discussion details...
 */
@interface FTFileStoreTEST : FTBaseTEST

- (NSString *) createPathOfFilename: (NSString *) aFilename;
- (NSString *) popPathStack: (NSMutableArray *) aPathStack 
  untilFoundPath: (NSString *) aPath;
  
- iterateBeginingAtPath: (NSString *) aPath 
  excludeSubDirectories: (NSSet *) excludes
  sendingEventsTo: (id <FTDirectoryStructureEvents>) eventHandle;

- (NSDictionary *) readGraph: (id <FTGraph>) graph 
  withObjectToIdMapper: (id <FTObjectToIdMapper>) objectToIdMapper;
  
- setObject: (id <NSCoding>) anObject forKey: (id <NSCoding>) aKey
  forNode: (id <FTNode>) aNode;
- objectForKey: (id <NSCoding>) aKey forNode: (id <FTNode>) aNode;

- testFileStore; 
@end


@interface FTStoreDirectoryStructure : FTObject <FTDirectoryStructureEvents> {
  @private
    id <FTGraph> graph;
    id <FTObjectToIdMapper> objectToIdMapper;
    
    NSMutableDictionary *directoryToNode;
}

- initWithGraph: (id <FTGraph>) aGraph 
  withObjectIdMapper: (id <FTObjectToIdMapper>) anObjectToIdMapper;
  
- (void) dealloc;

- addDirectory: (NSString *) directory ofParentDirectory: (NSString *) parent;
- addFile: (NSString *) aFile ofParentDirectory: (NSString *) parent;
@end



@interface FTCompareDirectoryStructure : FTObject <FTDirectoryStructureEvents> {
  @private
    NSMutableDictionary *namesToContent;
}

- initWithNamesToContentMapping: (NSDictionary*) someNamesToContent;
  
- (void) dealloc;

- addDirectory: (NSString *) directory ofParentDirectory: (NSString *) parent;
- addFile: (NSString *) aFile ofParentDirectory: (NSString *) parent;
@end
#endif
