* @brief Callbacks handler which emit the callbacks after Workstation creation *
* @details Callback functions have the following signature: `void(WorkstationPtr)`
*/
-extern surf_callback(void, WorkstationPtr) workstationCreatedCallbacks;
+XBT_PUBLIC_DATA(surf_callback(void, WorkstationPtr)) workstationCreatedCallbacks;
/** @ingroup SURF_callbacks
* @brief Callbacks handler which emit the callbacks after Workstation destruction *
* @details Callback functions have the following signature: `void(WorkstationPtr)`
*/
-extern surf_callback(void, WorkstationPtr) workstationDestructedCallbacks;
+XBT_PUBLIC_DATA(surf_callback(void, WorkstationPtr)) workstationDestructedCallbacks;
/** @ingroup SURF_callbacks
* @brief Callbacks handler which emit the callbacks after Workstation State changed *
* @details Callback functions have the following signature: `void(WorkstationActionPtr action, e_surf_resource_state_t old, e_surf_resource_state_t current)`
*/
-extern surf_callback(void, WorkstationPtr, e_surf_resource_state_t, e_surf_resource_state_t) workstationStateChangedCallbacks;
+XBT_PUBLIC_DATA(surf_callback(void, WorkstationPtr, e_surf_resource_state_t, e_surf_resource_state_t)) workstationStateChangedCallbacks;
/** @ingroup SURF_callbacks
* @brief Callbacks handler which emit the callbacks after WorkstationAction State changed *
* @details Callback functions have the following signature: `void(WorkstationActionPtr action, e_surf_resource_state_t old, e_surf_resource_state_t current)`
*/
-extern surf_callback(void, WorkstationActionPtr, e_surf_action_state_t, e_surf_action_state_t) workstationActionStateChangedCallbacks;
+XBT_PUBLIC_DATA(surf_callback(void, WorkstationActionPtr, e_surf_action_state_t, e_surf_action_state_t)) workstationActionStateChangedCallbacks;
/*********
* Tools *
*********/
-extern WorkstationModelPtr surf_workstation_model;
+XBT_PUBLIC_DATA(WorkstationModelPtr) surf_workstation_model;
+XBT_PUBLIC(void) workstation_parse_init(sg_platf_host_cbarg_t host);
+XBT_PUBLIC(void) workstation_add_traces();
/*********
* Model *
*/
~WorkstationModel();
+ virtual WorkstationPtr createWorkstation(const char *name)=0;
+ void addTraces(){DIE_IMPOSSIBLE;}
+
/**
* @brief [brief description]
* @details [long description]
*/
virtual int unlink(surf_file_t fd);
- /**
- * @brief List directory contents of a path
- * @details [long description]
- *
- * @param mount [description]
- * @param path The path to the directory
- * @return The StorageAction corresponding to the ls action
- */
- virtual ActionPtr ls(const char* mount, const char *path);
-
/**
* @brief Get the size in bytes of the file
*
virtual sg_size_t fileTell(surf_file_t fd);
/**
- * @brief Get the available space of the storage at the mount point
- *
- * @param name The mount point
- * @return The amount of availble space in bytes
- */
- virtual sg_size_t getFreeSize(const char* name);
-
- /**
- * @brief Get the used space of the storage at the mount point
- *
- * @param name The mount point
- * @return The amount of used space in bytes
- */
- virtual sg_size_t getUsedSize(const char* name);
-
- /**
- * @brief Set the position indictator assiociated with the file descriptor to a new position
+ * @brief Set the position indicator associated with the file descriptor to a new position
* @details [long description]
*
* @param fd The file descriptor
* - SEEK_END: end of the file
* @return MSG_OK if successful, otherwise MSG_TASK_CANCELED
*/
- virtual int fileSeek(surf_file_t fd, sg_size_t offset, int origin);
+ virtual int fileSeek(surf_file_t fd, sg_offset_t offset, int origin);
/**
* @brief Move a file to another location on the *same mount point*.
*/
virtual int fileMove(surf_file_t fd, const char* fullpath);
- /**
- * @brief Copy a file to another location on a remote host.
- * @details [long description]
- *
- * @param fd The file descriptor
- * @param host_dest The worstation destination
- * @param fullpath The new full path
- * @return MSG_OK if successful, otherwise MSG_TASK_CANCELED
- */
- virtual int fileRcopy(surf_file_t fd, surf_resource_t host_dest, const char* fullpath);
-
xbt_dynar_t p_storage;
RoutingEdgePtr p_netElm;
CpuPtr p_cpu;