Salome HOME
FileService
[modules/gde.git] / projects / GDE_API_CPP / api / src / FileService.hpp
diff --git a/projects/GDE_API_CPP/api/src/FileService.hpp b/projects/GDE_API_CPP/api/src/FileService.hpp
new file mode 100644 (file)
index 0000000..3b8eb6d
--- /dev/null
@@ -0,0 +1,35 @@
+#ifndef GDE_FILE_SERVICE_HPP
+#define GDE_FILE_SERVICE_HPP
+
+#include "File.hpp"
+#include "GDESession.hpp"
+
+#include <string>
+
+namespace gde {
+
+  class FileService {
+    friend class GDESession;
+
+  public:
+    const File createFile(const std::string& name);
+    bool deleteFile(const File&);
+    const File updateFile(const File&);
+    const File readFile(int fileId);
+    const File findByName(const std::string& name);
+
+  private:
+    FileService(const GDESession& session) : _session(session) {}
+    ~FileService() {}
+    FileService(const FileService&); // non copyable
+    FileService& operator=(const FileService&); // non copyable
+
+  private:
+    static std::string _servletName;
+    const GDESession& _session;
+
+  };
+
+};
+
+#endif