Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members  

FilePlugin.h

00001 /*
00002    Copyright (C) 2002 the Strongroom project
00003 
00004    This library is free software; you can redistribute it and/or
00005    modify it under the terms of the GNU Lesser General Public
00006    License as published by the Free Software Foundation; either
00007    version 2.1 of the License, or (at your option) any later version.
00008 */
00009 
00010 #ifndef __FILEPLUGIN_H
00011 #define __FILEPLUGIN_H
00012 
00013 #include <unistd.h>
00014 
00015 #include <Common.h>
00016 #include <Plugin.h>
00017 #include <Error.h>
00018 
00019 
00020 using namespace std;
00021 
00027 class FilePlugin : public Plugin
00028 {
00029 public:
00030     FilePlugin( const Config &cfg );
00031     virtual ~FilePlugin() = 0;
00032 
00038     virtual CoreError create( NumID &fileid ) = 0;
00039 
00046     virtual CoreError open( NumID fileid, NumID &of ) = 0;
00047 
00053     virtual CoreError remove( NumID fileid ) = 0;
00054 
00060     virtual int64_t getLength( NumID fileid ) = 0;
00061 
00069     virtual CoreError write( NumID fileid, char *data, int length ) = 0;
00070 
00079     virtual CoreError read( NumID fileid, char *data, int length, int &bRead ) = 0;
00080 
00086     virtual CoreError close( NumID fileid ) = 0;
00087 };
00088 
00089 #endif /* __FILEPLUGIN_H */

Generated on Wed Feb 18 13:45:55 2004 for strongroom by doxygen1.2.18