00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef LSSCSI_H
00024 #define LSSCSI_H
00025
00026 #include <string>
00027 #include <map>
00028 #include <vector>
00029
00030 #include "storage/StorageInterface.h"
00031
00032
00033 namespace storage
00034 {
00035 using std::map;
00036 using std::vector;
00037
00038
00039 class Lsscsi
00040 {
00041 public:
00042
00043 Lsscsi();
00044
00045 struct Entry
00046 {
00047 Entry() : transport(TUNKNOWN) {}
00048
00049 Transport transport;
00050 };
00051
00052 friend std::ostream& operator<<(std::ostream& s, const Entry& entry);
00053
00054 bool getEntry(const string& device, Entry& entry) const;
00055
00056 protected:
00057
00058 void parse(const vector<string>& lines);
00059
00060 typedef map<string, Entry>::const_iterator const_iterator;
00061
00062 map<string, Entry> data;
00063
00064 };
00065
00066 }
00067
00068
00069 #endif