X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/56b8ebe99bfcd666e373069b2072291ab5e04ee8..bc5903068a99bfc50a9f7a479cc3305326f774e9:/src/surf/storage_interface.hpp diff --git a/src/surf/storage_interface.hpp b/src/surf/storage_interface.hpp index c606e11524..d8d4e185f4 100644 --- a/src/surf/storage_interface.hpp +++ b/src/surf/storage_interface.hpp @@ -30,6 +30,34 @@ typedef StorageAction *StorageActionPtr; class StorageAction; typedef StorageAction *StorageActionPtr; +/************* + * Callbacks * + *************/ + +/** @ingroup SURF_callbacks + * @brief Callbacks handler which emit the callbacks after Storage creation * + * @detail Callback functions have the following signature: `void(StoragePtr)` + */ +extern surf_callback(void, StoragePtr) storageCreatedCallbacks; + +/** @ingroup SURF_callbacks + * @brief Callbacks handler which emit the callbacks after Storage destruction * + * @detail Callback functions have the following signature: `void(StoragePtr)` + */ +extern surf_callback(void, StoragePtr) storageDestructedCallbacks; + +/** @ingroup SURF_callbacks + * @brief Callbacks handler which emit the callbacks after Storage State changed * + * @detail Callback functions have the following signature: `void(StorageActionPtr)` + */ +extern surf_callback(void, StoragePtr) storageStateChangedCallbacks; + +/** @ingroup SURF_callbacks + * @brief Callbacks handler which emit the callbacks after StorageAction State changed * + * @detail Callback functions have the following signature: `void(StorageActionPtr)` + */ +extern surf_callback(void, StorageActionPtr) storageActionStateChangedCallbacks; + /********* * Model * *********/ @@ -133,6 +161,8 @@ public: */ void updateState(tmgr_trace_event_t event_type, double value, double date); + void setState(e_surf_resource_state_t state); + xbt_dict_t p_content; char* p_contentType; sg_size_t m_size; @@ -265,6 +295,8 @@ public: StorageAction(ModelPtr model, double cost, bool failed, lmm_variable_t var, StoragePtr storage, e_surf_action_storage_type_t type); + void setState(e_surf_action_state_t state); + e_surf_action_storage_type_t m_type; StoragePtr p_storage; surf_file_t p_file;