libftc
src/ftc_abi_safe.h
Vá para a documentação deste arquivo.
00001 #ifndef TEC_FTC_ABI_SAFE
00002 #define TEC_FTC_ABI_SAFE
00003 
00004 #include "ftc_decl.h"
00005 #include <stdio.h>
00006 
00011 class ftc_abi_safe
00012 {
00013 public:
00023 #if !defined(FTC_DOXYGEN)
00024     TEC_FTC_DECL
00025 #endif
00026     ftc_abi_safe(const char* id, bool writable, const char* host
00027                  , unsigned short port, const char* accessKey);
00031 #if !defined(FTC_DOXYGEN)
00032     TEC_FTC_DECL
00033 #endif
00034     ~ftc_abi_safe();
00035 
00041 #if !defined(FTC_DOXYGEN)
00042     TEC_FTC_DECL
00043 #endif
00044     void open( bool readonly ) ;
00045 
00046 
00052 #if !defined(FTC_DOXYGEN)
00053     TEC_FTC_DECL
00054 #endif
00055     bool isOpen() ;
00056 
00060 #if !defined(FTC_DOXYGEN)
00061     TEC_FTC_DECL
00062 #endif
00063     void close() ;
00064 
00070 #if !defined(FTC_DOXYGEN)
00071     TEC_FTC_DECL
00072 #endif
00073     void setPosition( unsigned long long position ) ;
00074 
00080 #if !defined(FTC_DOXYGEN)
00081     TEC_FTC_DECL
00082 #endif
00083     unsigned long long getPosition() const;
00084 
00091 #if !defined(FTC_DOXYGEN)
00092     TEC_FTC_DECL
00093 #endif
00094     void setSize( unsigned long long size );
00095 
00101 #if !defined(FTC_DOXYGEN)
00102     TEC_FTC_DECL
00103 #endif
00104     unsigned long long getSize() const;
00105 
00115 #if !defined(FTC_DOXYGEN)
00116     TEC_FTC_DECL
00117 #endif
00118     unsigned long long read(char* data, unsigned long long nbytes, unsigned long long position);
00119 
00129 #if !defined(FTC_DOXYGEN)
00130     TEC_FTC_DECL
00131 #endif
00132     unsigned long long write(const char* data, unsigned long long nbytes, unsigned long long position);
00133 
00145 #if !defined(FTC_DOXYGEN)
00146     TEC_FTC_DECL
00147 #endif
00148     unsigned long long transferTo(unsigned long long position, unsigned long long nbytes, FILE* fd, char* buffer);
00149 
00150     struct implementation;
00151 private:
00152     ftc_abi_safe (ftc_abi_safe const&);
00153     ftc_abi_safe& operator=(ftc_abi_safe const&);
00154 
00155     implementation* impl;
00156 };
00157 
00158 #endif
00159