Files
sysadm/src/server/library/sysadm-update.h
Ken Moore c5bf944017 [API CHANGE] Add a new API call for sysadm/update: action="applyupdate".
This takes no other inputs, and returns the following:
{
"applyupdate" : {
  "result" : "rebooting to apply updates"
  }
}
2017-11-17 15:58:37 -05:00

41 lines
1.1 KiB
C++

//===========================================
// PC-BSD source code
// Copyright (c) 2015, PC-BSD Software/iXsystems
// Available under the 3-clause BSD license
// See the LICENSE file for full details
//===========================================
#ifndef __PCBSD_LIB_UTILS_UPDATER_H
#define __PCBSD_LIB_UTILS_UPDATER_H
#include <QJsonObject>
#include "sysadm-global.h"
namespace sysadm{
class Update{
public:
//Time stamps
static QDateTime lastFullCheck();
static QDateTime rebootRequiredSince();
//Listing routines
static QJsonObject checkUpdates(bool fast = false);
static void saveCheckUpdateLog(QString); //Internal for Dispatcher process usage - do not expose to public API
static QJsonObject listBranches();
//Start/stop update routine
static QJsonObject startUpdate(QJsonObject);
static QJsonObject stopUpdate();
static QJsonObject applyUpdates();
//Read/write update settings
static QJsonObject readSettings();
static QJsonObject writeSettings(QJsonObject);
//List/Read update logs
static QJsonObject listLogs();
static QJsonObject readLog(QJsonObject);
};
}
#endif