Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
8f8aad96b33e0abb2e61176bb982059ff8534e8c
[simgrid.git] / src / surf / storage_private.h
1 /* Copyright (c) 2009, 2013. The SimGrid Team.
2  * All rights reserved.                                                     */
3
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. */
6
7 #ifndef STORAGE_PRIVATE_H_
8 #define STORAGE_PRIVATE_H_
9
10 typedef struct s_storage_type {
11   char *model;
12   char *content;
13   char *content_type;
14   char *type_id;
15   xbt_dict_t properties;
16   size_t size;
17   size_t used_size;
18 } s_storage_type_t, *storage_type_t;
19
20 typedef struct s_mount {
21   void *storage;
22   char *name;
23 } s_mount_t, *mount_t;
24
25 typedef struct s_file_info {
26   size_t size;
27   char* mount_point;
28   char* storageId;
29   char* content_type;
30 } s_file_info_t, *surf_file_info_t;
31
32 typedef struct surf_file {
33   char *name;
34   char *mount;
35   size_t size;
36   surf_file_info_t info;
37 } s_surf_file_t;
38
39 typedef struct surf_storage {
40   s_surf_resource_t generic_resource;   /*< Structure with generic data. Needed at begin to interact with SURF */
41   e_surf_resource_state_t state_current;        /*< STORAGE current state (ON or OFF) */
42   lmm_constraint_t constraint;          /* Constraint for maximum bandwidth from connection */
43   lmm_constraint_t constraint_write;    /* Constraint for maximum write bandwidth*/
44   lmm_constraint_t constraint_read;     /* Constraint for maximum write bandwidth*/
45   xbt_dict_t content; /* char * -> s_surf_file_t */
46   char* content_type;
47   size_t size;
48   size_t used_size;
49   char *type_id;
50   char *content_type;
51   xbt_dynar_t write_actions;
52 } s_storage_t, *storage_t;
53
54 typedef enum {
55   READ=0, WRITE, STAT, OPEN, CLOSE, LS
56 } e_surf_action_storage_type_t;
57
58 typedef struct surf_action_storage {
59   s_surf_action_lmm_t generic_lmm_action;
60   e_surf_action_storage_type_t type;
61   void *storage;
62 } s_surf_action_storage_t, *surf_action_storage_t;
63
64 #endif /* STORAGE_PRIVATE_H_ */