]> git.donarmstrong.com Git - bamtools.git/blob - src/api/internal/BamFtp_p.h
d410201c97529017dfc2637423721ce05055aa89
[bamtools.git] / src / api / internal / BamFtp_p.h
1 // ***************************************************************************
2 // BamFtp_p.h (c) 2011 Derek Barnett
3 // Marth Lab, Department of Biology, Boston College
4 // ---------------------------------------------------------------------------
5 // Last modified: 8 September 2011 (DB)
6 // ---------------------------------------------------------------------------
7 // Provides reading/writing of BAM files on FTP server
8 // ***************************************************************************
9
10 #ifndef BAMFTP_P_H
11 #define BAMFTP_P_H
12
13 //  -------------
14 //  W A R N I N G
15 //  -------------
16 //
17 // This file is not part of the BamTools API.  It exists purely as an
18 // implementation detail. This header file may change from version to version
19 // without notice, or even be removed.
20 //
21 // We mean it.
22
23 #include <api/IBamIODevice.h>
24 #include <string>
25
26 namespace BamTools {
27 namespace Internal {
28
29 class BamFtp : public IBamIODevice {
30
31     // ctor & dtor
32     public:
33         BamFtp(const std::string& url);
34         ~BamFtp(void);
35
36     // IBamIODevice implementation
37     public:
38         void Close(void);
39         bool IsRandomAccess(void) const;
40         bool Open(const IBamIODevice::OpenMode mode);
41         size_t Read(char* data, const unsigned int numBytes);
42         bool Seek(const int64_t& position);
43         int64_t Tell(void) const;
44         size_t Write(const char* data, const unsigned int numBytes);
45
46     // internal methods
47     private:
48
49     // data members
50     private:
51 };
52
53 } // namespace Internal
54 } // namespace BamTools
55
56 #endif // BAMFTP_P_H