source: src-qt4/life-preserver/LPBackend.h @ 96c5e841

Last change on this file since 96c5e841 was 96c5e841, checked in by Ken Moore <ken@…>, 2 years ago

Add the ability to create an SSH Key file, and copy that key file to a msdosfs/FAT32 formatted USB stick (still needs testing)

  • Property mode set to 100644
File size: 2.0 KB
1#ifndef _LP_BACKEND_H
2#define _LP_BACKEND_H
4#include <QProcess>
5#include <QString>
6#include <QStringList>
7#include <QDebug>
8#include <QDir>
10//Class of static functions for using the "lpreserver" backend
11class LPBackend{
14        //Informational
15        static QStringList listPossibleDatasets(); //list all possible datasets on the system
16        static QStringList listDatasets(); //list all current lifepreserver datasets
17        static QStringList listDatasetSubsets(QString dataset); //list all subsets of the main dataset
18        static QStringList listSnapshots(QString dsmountpoint); //list all snapshots for a particular dataset mountpoint
19        static QStringList listLPSnapshots(QString dataset); //list all snapshots created by life preserver
20        static QStringList listReplicationTargets(); //list all datasets with replication enabled
21        static QStringList listCurrentStatus(); //list the current snapshot/replication status
22        //Dataset Management
23        static bool setupDataset(QString dataset, int time, int numToKeep); //add or configure dataset
24        static bool removeDataset(QString dataset);
25        static bool datasetInfo(QString dataset, int& time, int& numToKeep); //get current settings for a dataset
26        //Snapshop Management
27        static bool newSnapshot(QString dataset);
28        static bool removeSnapshot(QString dataset, QString snapshot);
29        static bool revertSnapshot(QString dataset, QString snapshot); //revert to given snapshot
30        static QString revertSnapshotFile(QString dataset, QString snapshot, QString filepath);
31        //Replication Management
32        static bool setupReplication(QString dataset, QString remotehost, QString user, int port, QString remotedataset, int time);
33        static bool removeReplication(QString dataset);
34        static bool replicationInfo(QString dataset, QString& remotehost, QString& user, int& port, QString& remotedataset, int& time);
35        //SSH Key Management
36        static bool setupSSHKey(QString remoteHost, QString remoteUser, int remotePort);
37        static QStringList findValidUSBDevices();
38        static bool copySSHKey(QString mountPath, QString localHost);
Note: See TracBrowser for help on using the repository browser.