49 std::string _file_name;
88 const std::string &
file_name()
const {
return _file_name;}
128 _buffer_size(buffer_size),
131 _more = (_buffer_size == _received);
168 bool more()
const {
return _more;}
virtual void data_error(const LoadEvent &event)
Informs loader that an error occurred during application to application data transfer.
Definition: loader.h:244
int received() const
Number of bytes received.
Definition: loader.h:163
const std::string & file_name() const
File name of file.
Definition: loader.h:88
bool from_filer() const
Check if the load is from the filer.
Definition: loader.h:93
This is the base class for all Gadgets.
Definition: gadget.h:48
int file_type() const
File type of file.
Definition: loader.h:79
const LoadEvent & load_event() const
Return o LoadEvent that started the transfer.
Definition: loader.h:137
int buffer_size() const
Return the buffer size of the current buffer.
Definition: loader.h:152
Object destination_object()
Object the load is going to occur on.
Definition: loader.h:59
virtual bool accept_file(LoadEvent &event)
Override to see if the loader can accept a file.
Definition: loader.h:199
virtual void * data_buffer(const LoadEvent &event, int &buffer_size)
Set up buffer for application to application data transfer.
Definition: loader.h:214
Class with details of buffer transferred from another application.
Definition: loader.h:112
LoadEvent(Object obj, Gadget gadget, int x, int y, int est, int type, const char *file_name, bool from_filer)
Constructor.
Definition: loader.cc:32
DataReceivedEvent(LoadEvent *event, void *buffer, int buffer_size, int received)
Construct with details of received buffer.
Definition: loader.h:125
const Point & destination_point() const
Location for load (screen coordinates)
Definition: loader.h:69
void * buffer() const
Return the buffer the transmitted data has been copied too.
Definition: loader.h:142
Class to represent a position in two dimensional space.
Definition: point.h:36
Class to handle file/data loading from the filer or an external application.
Definition: loader.h:179
int estimated_size() const
Estimated size of file.
Definition: loader.h:74
bool null() const
Check if object has been initialised.
Definition: object.h:87
void buffer(void *buf)
Set the buffer address for the next bytes received.
Definition: loader.h:147
bool more() const
Return true if more data is to come.
Definition: loader.h:168
Gadget destination_gadget()
Gadget for load (can be a null gadget if no gadget is involved).
Definition: loader.h:64
bool opener() const
Returns true if this event is from an opener added to the main application.
Definition: loader.h:99
virtual bool data_received(DataReceivedEvent &event)
Override to receive the file by in memory transfer from another application.
Definition: loader.h:236
Class with details of a file load operation.
Definition: loader.h:41
void update_file_details(const char *file_name, int size)
Update file details for load.
Definition: loader.h:106
void buffer_size(int size)
Set the buffer size for the next transmission from the other application.
Definition: loader.h:158
Class to manipulate a toolbox object.
Definition: object.h:50
virtual bool load_file(LoadEvent &event)=0
Override to do the actual file load.