55 #include <doclone/DataTransfer.h>
56 #include <doclone/Logger.h>
57 #include <doclone/observer/AbstractObserver.h>
58 #include <doclone/Operation.h>
59 #include <doclone/exception/Exception.h>
462 class DefaultObserver :
public Doclone::AbstractObserver {
470 void notify(
const std::string &str);
char _address[20]
Ip address entered by the user.
Definition: clone.h:390
void doclone_set_empty(dc_doclone *dc_obj, unsigned short empty)
Sets the empty flag of the given dc_doclone object.
Definition: clone.cc:320
int doclone_chain_link(const dc_doclone *dc_obj)
Receives an image or a device from the network in link mode.
Definition: clone.cc:205
void * _observer
Event subscriber object.
Definition: clone.h:400
int doclone_receive(const dc_doclone *dc_obj)
Receives an image or a device from the network.
Definition: clone.cc:152
char _device[512]
Device path entered by the user.
Definition: clone.h:388
void doclone_set_address(dc_doclone *dc_obj, const char *address)
Sets the IP address of the server for the given dc_doclone object.
Definition: clone.cc:294
void doclone_subscribe_to_notifications(dc_doclone *dc_obj, notificationCallback call)
Through this function the user can set its callback for listen the notifications of the exceptions...
Definition: clone.cc:263
void doclone_set_force(dc_doclone *dc_obj, unsigned short force)
Sets the force flag of the given dc_doclone object.
Definition: clone.cc:328
void doclone_subscribe_to_operation_events(dc_doclone *dc_obj, operationCallback call)
Through this function the user can set its callback for the operation events of the library...
Definition: clone.cc:240
char _image[512]
Image path entered by the user.
Definition: clone.h:386
void(* operationCallback)(dcOperationEvent event, dcOperationType type, const char *target)
The prototype of the function to be called when an operation event has occurred.
Definition: clone.h:362
Reading the data of a partition.
Definition: clone.h:322
Writing a new disklabel.
Definition: clone.h:316
Writing the data of a partition.
Definition: clone.h:323
void doclone_subscribe_to_general_events(dc_doclone *dc_obj, generalCallback call)
Through this function the user can set its callback for the general events of the library...
Definition: clone.cc:251
Writing the label of a filesystem.
Definition: clone.h:320
int doclone_send(const dc_doclone *dc_obj)
Sends an image or a device to the network.
Definition: clone.cc:123
int doclone_chain_origin(const dc_doclone *dc_obj)
Sends an image or a device to the network in link mode.
Definition: clone.cc:179
int libdoclone_is_present()
For compatibility with AC_CHECK_LIB.
Definition: clone.cc:34
void doclone_destroy(dc_doclone *dc_obj)
Destroy the given dc_doclone object.
Definition: clone.cc:57
dcOperationType
C wrapper for Doclone::dcOperationType.
Definition: clone.h:313
dc_doclone * doclone_new()
Creates a new dc_doclone object in the heap and returns its address.
Definition: clone.cc:44
void doclone_subscribe_to_tranfer_events(dc_doclone *dc_obj, transferCallback call)
Through this function the user can set its callback for the transfer events of the library...
Definition: clone.cc:228
char _interface[20]
Ip address of the network interface entered by the user.
Definition: clone.h:392
The program detects a SIGINT.
Definition: clone.h:342
void(* generalCallback)(dcEvent event, const char *target)
The prototype of the function to be called when a general event has occurred.
Definition: clone.h:370
Creating a new partition.
Definition: clone.h:317
Formatting a partition.
Definition: clone.h:318
Sending or receiving data.
Definition: clone.h:325
Main object of the C wrapper API of libdoclone.
Definition: clone.h:384
Installing GRUB.
Definition: clone.h:324
uint8_t _empty
Empty mode enabled/disabled.
Definition: clone.h:396
Reading the partition table.
Definition: clone.h:315
Execution successfully finished.
Definition: clone.h:343
dcEvent
C wrapper for Doclone::dcEvent.
Definition: clone.h:341
void(* notificationCallback)(const char *str)
The prototype of the function to be called when an exception occurs and notifies its message...
Definition: clone.h:378
Waiting for connect to server.
Definition: clone.h:326
int doclone_create(const dc_doclone *dc_obj)
Creates an image of a device.
Definition: clone.cc:70
dcTransferEvent
C wrapper for Doclone::dcTransferEvent.
Definition: clone.h:261
The subject has completed an operation pending.
Definition: clone.h:277
New incoming connection.
Definition: clone.h:344
void(* transferCallback)(dcTransferEvent event, uint64_t numBytes)
The prototype of the function to be called when a transfer event has occurred.
Definition: clone.h:353
The value of the total size to be transferred has changed.
Definition: clone.h:262
void doclone_set_interface(dc_doclone *dc_obj, const char *interface)
Sets the IP address of the interface to be used in the link mode.
Definition: clone.cc:302
No operation.
Definition: clone.h:314
void doclone_set_device(dc_doclone *dc_obj, const char *device)
Sets the device path of the given dc_doclone object.
Definition: clone.cc:286
Waiting for connect to client/s.
Definition: clone.h:327
void doclone_set_image(dc_doclone *dc_obj, const char *image)
Sets the image path of the given dc_doclone object.
Definition: clone.cc:278
dcOperationEvent
C wrapper for Doclone::dcOperationEvent.
Definition: clone.h:275
Writing the flags of a partition.
Definition: clone.h:319
uint8_t _force
Mode force enabled/disabled.
Definition: clone.h:398
void doclone_set_nodes_number(dc_doclone *dc_obj, unsigned int number)
Sets the number of receivers of the given dc_doclone object.
Definition: clone.cc:312
uint32_t _nodesNumber
Number of receivers entered by the user.
Definition: clone.h:394
Writing the uuid of a filesystem.
Definition: clone.h:321
int doclone_restore(const dc_doclone *dc_obj)
Restores an image in a device.
Definition: clone.cc:96
The value of the transferred bytes has changed.
Definition: clone.h:263
The subject has added a new operation pending.
Definition: clone.h:276