1 /* Copyright (c) 2013-2015. The SimGrid Team.
2 * All rights reserved. */
4 /* This program is free software; you can redistribute it and/or modify it
5 * under the terms of the license (GNU LGPL) which comes with this package. */
9 #include "storage_interface.hpp"
11 #ifndef STORAGE_N11_HPP_
12 #define STORAGE_N11_HPP_
21 class XBT_PRIVATE StorageN11Model;
22 class XBT_PRIVATE StorageN11;
23 class XBT_PRIVATE StorageN11Action;
29 class StorageN11Model : public StorageModel {
31 Storage* createStorage(const char* id, const char* type_id, const char* content_name, const char* content_type,
32 const char* attach) override;
33 double nextOccuringEvent(double now) override;
34 void updateActionsState(double now, double delta) override;
41 class StorageN11 : public Storage {
43 StorageN11(StorageModel* model, const char* name, lmm_system_t maxminSystem, double bread, double bwrite,
44 double bconnection, const char* type_id, char* content_name, const char* content_type, sg_size_t size,
47 StorageAction *open(const char* mount, const char* path);
48 StorageAction *close(surf_file_t fd);
49 StorageAction *ls(const char *path);
50 StorageAction* read(surf_file_t fd, sg_size_t size);
51 StorageAction* write(surf_file_t fd, sg_size_t size);
52 void rename(const char *src, const char *dest);
59 class StorageN11Action : public StorageAction {
61 StorageN11Action(Model *model, double cost, bool failed, Storage *storage, e_surf_action_storage_type_t type);
67 void setMaxDuration(double duration);
68 void setPriority(double priority);
75 #endif /* STORAGE_N11_HPP_ */