summaryrefslogtreecommitdiff
path: root/slice
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2015-02-17 17:08:54 +0100
committerJose <jose@zeroc.com>2015-02-17 17:08:54 +0100
commit21c1ba295bc813f35a638b3867234c63dac1816e (patch)
treed4e82f25daf0030375094f734cf4c5ad2d55fdf2 /slice
parentICE-6306 added checks to javascript for byte/short/int (diff)
downloadice-21c1ba295bc813f35a638b3867234c63dac1816e.tar.bz2
ice-21c1ba295bc813f35a638b3867234c63dac1816e.tar.xz
ice-21c1ba295bc813f35a638b3867234c63dac1816e.zip
Fixed (ICE-5740) - IcePatch2 has issues with 'large' files.
Diffstat (limited to 'slice')
-rw-r--r--slice/IcePatch2/FileInfo.ice28
-rw-r--r--slice/IcePatch2/FileServer.ice63
2 files changed, 88 insertions, 3 deletions
diff --git a/slice/IcePatch2/FileInfo.ice b/slice/IcePatch2/FileInfo.ice
index 1c2176e4494..b63d3db0bce 100644
--- a/slice/IcePatch2/FileInfo.ice
+++ b/slice/IcePatch2/FileInfo.ice
@@ -45,6 +45,34 @@ struct FileInfo
**/
sequence<FileInfo> FileInfoSeq;
+
+/**
+ *
+ * Basic information about a single file.
+ *
+ **/
+struct LargeFileInfo
+{
+ /** The pathname. **/
+ string path;
+
+ /** The SHA-1 checksum of the file. **/
+ Ice::ByteSeq checksum;
+
+ /** The size of the compressed file in number of bytes. **/
+ long size;
+
+ /** The executable flag. */
+ bool executable;
+};
+
+/**
+ *
+ * A sequence with information about many files.
+ *
+ **/
+sequence<LargeFileInfo> LargeFileInfoSeq;
+
};
diff --git a/slice/IcePatch2/FileServer.ice b/slice/IcePatch2/FileServer.ice
index ff0ffa8b6e0..9bc89bd30bb 100644
--- a/slice/IcePatch2/FileServer.ice
+++ b/slice/IcePatch2/FileServer.ice
@@ -61,6 +61,19 @@ exception FileAccessException
/**
*
+ * This exception is raised if {@link FileServer#getFileCompressed} or
+ * {@link FileServer#getFileInfoSeq} try to operate in files with size
+ * large than 2.1 GB, these operations does not support working with
+ * large files instead {@link FileServer#getLargeFileCompressed} and
+ * {@link FileServer#getLargeFileInfoSeq} must be used.
+ *
+ **/
+exception FileSizeRangeException extends FileAccessException
+{
+};
+
+/**
+ *
* The interface that provides access to files.
*
**/
@@ -70,6 +83,10 @@ interface FileServer
*
* Return the {@link FileInfoSeq} for the specified partition. If the
* partion number is out of range, the operation throws
+ *
+ * <p class="Deprecated"> This operation is deprecated, and only keep for
+ * compativility with old Ice clients (older than version 3.6).
+ *
* {@link PartitionOutOfRangException}.
*
* @param partition The partition number in the range 0-255.
@@ -78,7 +95,23 @@ interface FileServer
* files in the specified partition.
*
**/
- ["nonmutating", "cpp:const"] idempotent FileInfoSeq getFileInfoSeq(int partition)
+ ["deprecate:getFileInfoSeq() is deprecated, use getLargeFileInfoSeq() instead.",
+ "nonmutating", "cpp:const"] idempotent FileInfoSeq getFileInfoSeq(int partition)
+ throws PartitionOutOfRangeException, FileSizeRangeException;
+
+ /**
+ *
+ * Return the {@link FileInfoSeq} for the specified partition. If the
+ * partion number is out of range, the operation throws
+ * {@link PartitionOutOfRangException}.
+ *
+ * @param partition The partition number in the range 0-255.
+ *
+ * @return A sequence containing the {@link FileInfo} structures for
+ * files in the specified partition.
+ *
+ **/
+ ["nonmutating", "cpp:const"] idempotent LargeFileInfoSeq getLargeFileInfoSeq(int partition)
throws PartitionOutOfRangeException;
/**
@@ -111,6 +144,9 @@ interface FileServer
* return fewer bytes than requested in case there was an
* end-of-file condition.
*
+ * <p class="Deprecated"> This operation is deprecated, and only keep for
+ * compativility with old Ice clients (older than version 3.6).
+ *
* @param path The pathname (relative to the data directory) for
* the file to be read.
*
@@ -121,10 +157,31 @@ interface FileServer
* @return A sequence containing the compressed file contents.
*
**/
- ["amd", "nonmutating", "cpp:const", "cpp:array"]
+ ["deprecate:getFileCompressed() is deprecated, use getLargeFileCompressed() instead.",
+ "amd", "nonmutating", "cpp:const", "cpp:array"]
idempotent Ice::ByteSeq getFileCompressed(string path, int pos, int num)
+ throws FileAccessException, FileSizeRangeException;
+
+ /**
+ *
+ * Read the specified file. If the read operation fails, the
+ * operation throws {@link FileAccessException}. This operation may only
+ * return fewer bytes than requested in case there was an
+ * end-of-file condition.
+ *
+ * @param path The pathname (relative to the data directory) for
+ * the file to be read.
+ *
+ * @param pos The file offset at which to begin reading.
+ *
+ * @param num The number of bytes to be read.
+ *
+ * @return A sequence containing the compressed file contents.
+ *
+ **/
+ ["amd", "nonmutating", "cpp:const", "cpp:array"]
+ idempotent Ice::ByteSeq getLargeFileCompressed(string path, long pos, int num)
throws FileAccessException;
};
};
-