zeus/zeus/zeus-File.obj.zeus.idl

82 lines
2.7 KiB
Plaintext

#elem-brief: File Object interface
#elem-version: 1.0
#elem-type:FILE
#elem-author:Heero Yui<yui.heero@gmail.com>
// --------------------------
// -- Factory --
// --------------------------
#brief:Factory to create a local object.
#param:fileName:Name of the local file to instanciate.
[factory] create(string)
#brief:Factory to create a local object.
#param:fileName:Name of the local file to instanciate.
#param:sha512: Sha-512 string if the file
[factory] create(string, string)
#brief:Factory to create a local object.
#param:fileNameReal:Name of the local file to instanciate.
#param:fileNameShow:Name of the file like the remote user will se it.
#param:mineType:Mine-type of the file.
[factory] create(string, string, string)
#brief:Factory to create a local object.
#param:fileNameReal:Name of the local file to instanciate.
#param:fileNameShow:Name of the file like the remote user will se it.
#param:mineType:Mine-type of the file.
#param:sha512: Sha-512 string if the file
[factory] create(string, string, string, string)
#brief:Factory to create a local object with a buffer with data like a file.
#param:buffer:Data bueffer of the data.
#param:virtualName:Virtual name of the file.
#param:mineType:Mine-type of the file.
[factory] create(vector:uint8, string, string)
// --------------------------
// -- Members --
// --------------------------
#brief:Get size of the file.
#return:current size of the file.
uint64 getSize()
#brief:Get the name of the file (can be the name of the local file or a theoric generated filename to be easy to user to store it, not really usefull).
#return:help name of the file.
string getName()
#brief:Get the name of the file.
#return:Full name of the file (sha512).
string getSha512()
#brief:Get the file "mine-type".
#return:string of the mine-type.
string getMineType()
#brief:get a part of the file (size < 64ko).
#param:start:Start position in the file.
#param:stop:Stop position in the file.
#return:Buffer with the data.
raw getPart(uint64, uint64)
// --------------------------
// -- Tools --
// --------------------------
#brief:Store all the data in a specific file.
#param:file:Handle on the file.
#param:filename:Local filename.
#return:the sha512 of the file (calculated with the input stream.
[tool-remote] string storeInFile(obj:zeus-File, string)
#brief:Store all the data in a specific vector of data.
#param:file:Handle on the file.
#return:buffer of data.
[tool-remote] vector:uint8 storeInMemory(obj:zeus-File)
#brief:Store all the data in a specific file.
#param:file:Handle on the file.
#param:filename:Local filename.
#param:notif:Local filename.
#return:the sha512 of the file (calculated with the input stream.
[tool-remote] string storeInFileNotify(obj:zeus-File, string, ActionNotif)