00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef SA_DATA_STORAGE
00022 #warning You should not include this file directly from your program.
00023 #endif
00024
00029 #ifndef SA_COMMON_DATA_STORAGE_H_
00030 #define SA_COMMON_DATA_STORAGE_H_
00031
00035 SA_EXPORT struct sa_data_storage {
00036 #ifdef SA_DATA_STORAGE_NAME
00037 char name[SA_DATA_STORAGE_NAME];
00038 #endif
00039 #ifdef SA_DATA_STORAGE_READS
00040 uint64_t reads;
00041 #endif
00042 #ifdef SA_DATA_STORAGE_READS_MERGED
00043 uint64_t reads_merged;
00044 #endif
00045 #ifdef SA_DATA_STORAGE_SECTORS_READ
00046 uint64_t sectors_read;
00047 #endif
00048 #ifdef SA_DATA_STORAGE_TIME_SPENT_READING
00049 uint64_t time_spent_reading;
00050 #endif
00051 #ifdef SA_DATA_STORAGE_WRITES
00052 uint64_t writes;
00053 #endif
00054 #ifdef SA_DATA_STORAGE_SECTORS_WRITTEN
00055 uint64_t sectors_written;
00056 #endif
00057 #ifdef SA_DATA_STORAGE_TIME_SPENT_WRITING
00058 uint64_t time_spent_writing;
00059 #endif
00060 #ifdef SA_DATA_STORAGE_BYTES_READ
00061 uint64_t bytes_read;
00062 #endif
00063 #ifdef SA_DATA_STORAGE_BYTES_WRITTEN
00064 uint64_t bytes_written;
00065 #endif
00066 };
00067
00068 #ifdef SA_OPEN_DATA_STORAGE
00069
00074 SA_EXPORT int sa_open_data_storage(void);
00075 #endif
00076
00077 #ifdef SA_CLOSE_DATA_STORAGE
00078
00083 SA_EXPORT int sa_close_data_storage(void);
00084 #endif
00085
00091 SA_EXPORT int sa_count_data_storages(uint16_t* number);
00092
00099 SA_EXPORT int sa_get_data_storage(char* name, struct sa_data_storage* dst);
00100
00108 SA_EXPORT int sa_get_data_storages(struct sa_data_storage* dst, uint16_t dst_size, uint16_t* written);
00109
00111 #endif