Slicer  4.10
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
vtkURIHandler.h
Go to the documentation of this file.
1 #ifndef __vtkURIHandler_h
2 #define __vtkURIHandler_h
3 
4 // MRML includes
5 #include "vtkMRML.h"
7 
8 // VTK includes
9 #include <vtkObject.h>
10 
11 class VTK_MRML_EXPORT vtkURIHandler : public vtkObject
12 {
13 public:
15  //static vtkURIHandler *New() { return NULL; };
16  static vtkURIHandler *New();
17  vtkTypeMacro(vtkURIHandler, vtkObject);
18  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
19 
20  vtkGetStringMacro (HostName);
21  vtkSetStringMacro (HostName);
22 
26  virtual void StageFileRead ( const char *source, const char * destination );
27  virtual void StageFileWrite ( const char *source, const char * destination );
28 
31  virtual void StageFileRead(const char * source,
32  const char * destination,
33  const char *username,
34  const char *password,
35  const char *hostname);
36 
37  virtual void StageFileWrite(const char *source,
38  const char *username,
39  const char *password,
40  const char *hostname,
41  const char *sessionID );
42 
44 
48  virtual int CanHandleURI ( const char * vtkNotUsed(uri) ) { return 0; };
49 
52  size_t BufferedWrite ( char *buffer, size_t size, size_t nitems );
53 
56  //virtual void SetLocalFile ( std::ofstream * localFile );
57  virtual void SetLocalFile (FILE *localFile);
58 
61  int ProgressCallback(FILE* outputFile, double dltotal, double dlnow, double ultotal, double ulnow);
62 
63  vtkGetMacro ( RequiresPermission, int );
64  vtkSetMacro ( RequiresPermission, int );
65  vtkGetObjectMacro ( PermissionPrompter, vtkPermissionPrompter );
66  virtual void SetPermissionPrompter(vtkPermissionPrompter* prompter);
67  vtkGetStringMacro ( Prefix );
68  vtkSetStringMacro ( Prefix );
69  vtkGetStringMacro ( Name );
70  vtkSetStringMacro ( Name );
71 
72  private:
73 
74  //--- Methods to configure and close transfer
76  virtual void InitTransfer ( );
77  virtual int CloseTransfer ( )
78  {
79  return 0;
80  }
81 
82  int RequiresPermission;
83  vtkPermissionPrompter *PermissionPrompter;
84 
85 
86  protected:
87  vtkURIHandler();
88  virtual ~vtkURIHandler();
90  void operator=(const vtkURIHandler&);
91 
94  //std::ofstream* LocalFile;
95  FILE *LocalFile;
96  char *Prefix;
97  char *Name;
98  char *HostName;
99 
100 };
101 
102 #endif
virtual int CanHandleURI(const char *vtkNotUsed(uri))
need something that goes the other way too...
Definition: vtkURIHandler.h:48
FILE * LocalFile
local file, it gets passed to C functions in libcurl
Definition: vtkURIHandler.h:95