source: src-qt4/life-preserver/LPContainers.h @ 2a5e337

9.2-releasereleng/10.0releng/10.0.1releng/10.0.2
Last change on this file since 2a5e337 was 2a5e337, checked in by Kris Moore <kris@…>, 12 months ago

Replace old life-preserver utility with our new one which uses ZFS snapshots / replication

  • Property mode set to 100644
File size: 692 bytes
Line 
1#ifndef _LP_CONTAINERS_H
2#define _LP_CONTAINERS_H
3
4#include <QHash>
5#include <QStringList>
6#include <QString>
7
8
9class LPDataset{
10public:
11        LPDataset(){}
12        ~LPDataset(){}
13
14        //Information needed on each dataset
15        QString latestReplication;
16        QString latestSnapshot;
17        QString numberOfSnapshots;
18        QHash<QString,QStringList> subsetHash; //<subset, snapshot list> (complete dataset name should be <ds><subset>)
19       
20        //Simplification functions for getting info from the hash
21        QStringList subsets(){ return QStringList(subsetHash.keys()); }
22        QStringList snapshots(QString subset){ 
23          if(subsetHash.contains(subset)){
24            return subsetHash[subset];
25          }else{
26            return QStringList();
27          }
28        }
29};
30
31#endif
Note: See TracBrowser for help on using the repository browser.