PLCnext API Documentation 26.6.0.38
IBackupAndRestoreService.hpp
1
2//
3// Copyright Phoenix Contact GmbH & Co. KG
4//
6#pragma once
8#include "Arp/Base/Rsc/Commons/Rsc.hpp"
9#include "Arp/Base/Rsc/Commons/IRscService.hpp"
10#include "Arp/Base/Rsc/Commons/IRscReadEnumerator.hxx"
11#include "Arp/Base/Rsc/Commons/IRscWriteEnumerator.hxx"
12#include "Arp/Base/Core/delegate.hxx"
13#include "Arp/Base/Rsc/Commons/RscSecureString.hxx"
14#include "Arp/Base/Rsc/Commons/RscString.hxx"
15#include "Arp/Services/BackupAndRestore/Services/Backup.hpp"
16#include "Arp/Services/BackupAndRestore/Services/BackupAndRestoreBehavior.hpp"
17#include "Arp/Services/BackupAndRestore/Services/BackupAndRestoreOption.hpp"
18#include "Arp/Services/BackupAndRestore/Services/BackupAndRestoreStatus.hpp"
19#include "Arp/Services/BackupAndRestore/Services/ItemSelectionRule.hpp"
20#include "Arp/Services/BackupAndRestore/Services/StatusCode.hpp"
21#include "Arp/Services/BackupAndRestore/Services/TransferStatus.hpp"
22
23// DO NOT MODIFY THIS FILE, THIS FILE IS AUTOGENERATED BY IBackupAndRestoreService.cs
24
25namespace Arp::Services::BackupAndRestore::Services
26{
27
28using namespace Arp::Base::Rsc::Commons;
29
168class ARP_EXPORT IBackupAndRestoreService : public IRscService
169{
170public: // usings
171 using Ptr = std::shared_ptr<IBackupAndRestoreService>;
179
180public: // construction/destruction
183
184public: // static policy operation
185 static IRscServiceProxyFactory& GetProxyFactory(void);
186
187public: // abstract operations
193
198 virtual StatusCode Resume() = 0;
199
205 virtual void GetBackupOptions(const RscString<16>& locale, GetBackupOptionsResultDelegate resultDelegate) = 0;
206
212 virtual void GetRestoreOptions(const RscString<16>& locale, GetRestoreOptionsResultDelegate resultDelegate) = 0;
213
219 virtual BackupAndRestoreBehavior GetBackupBehavior(GetBackupBehaviorMatchesAnyOfDelegate matchesAnyOfDelegate) = 0;
220
226 virtual BackupAndRestoreBehavior GetRestoreBehavior(GetRestoreBehaviorMatchesAnyOfDelegate matchesAnyOfDelegate) = 0;
227
239 virtual StatusCode CreateBackup(const RscString<64>& name, const RscSecureString<128>& password, CreateBackupMatchesAnyOfDelegate matchesAnyOfDelegate, RscString<512>& filename) = 0;
240
253 virtual StatusCode RestoreBackup(const RscString<512>& filename, const RscSecureString<128>& password, RestoreBackupMatchesAnyOfDelegate matchesAnyOfDelegate) = 0;
254
259 virtual void GetBackups(GetBackupsResultDelegate resultDelegate) = 0;
260
268 virtual StatusCode AddBackup(const RscString<512>& filename) = 0;
269
275
281 virtual StatusCode DeleteBackup(const RscString<512>& filename) = 0;
282};
283
284} // end of namespace Arp::Services::BackupAndRestore::Services
Prototyping of delegate template.
Definition: delegate.hxx:14
Interface for reading a arrays or enumerations.
Definition: IRscReadEnumerator.hxx:19
This is the base interface of all Rsc services.
Definition: IRscService.hpp:22
std::shared_ptr< IRscService > Ptr
The shared_ptr type of IRscService.
Definition: IRscService.hpp:25
Interface for writing an array enumeration or enumeration of unspefied length.
Definition: IRscWriteEnumerator.hxx:20
Specialized implementation of RscString for secure context.
Definition: RscSecureString.hxx:16
Interface for service proxy factories to create service proxies used by RSC clients.
Definition: IRscServiceProxyFactory.hpp:22
The status of backup and restore.
Definition: BackupAndRestoreStatus.hpp:29
The service allows to create backups of device data as well as to restore data from backups.
Definition: IBackupAndRestoreService.hpp:169
virtual StatusCode Resume()=0
Resets the error state.
virtual BackupAndRestoreStatus GetStatus()=0
Returns the current status.
virtual TransferStatus GetAddBackupStatus()=0
Returns the status of the last AddBackup call.
virtual StatusCode AddBackup(const RscString< 512 > &filename)=0
Starts an async task to add the backup file and performs validation.
virtual void GetBackups(GetBackupsResultDelegate resultDelegate)=0
Returns information about the available backups on the device.
IBackupAndRestoreService(void)=default
Constructs an IBackupAndRestoreService instance.
virtual void GetRestoreOptions(const RscString< 16 > &locale, GetRestoreOptionsResultDelegate resultDelegate)=0
Returns the available restore options.
virtual BackupAndRestoreBehavior GetBackupBehavior(GetBackupBehaviorMatchesAnyOfDelegate matchesAnyOfDelegate)=0
Returns the behavior for a backup with the selected items.
virtual void GetBackupOptions(const RscString< 16 > &locale, GetBackupOptionsResultDelegate resultDelegate)=0
Returns the available backup options.
virtual StatusCode CreateBackup(const RscString< 64 > &name, const RscSecureString< 128 > &password, CreateBackupMatchesAnyOfDelegate matchesAnyOfDelegate, RscString< 512 > &filename)=0
Starts an async task to create an encrypted backup which will contain the selected items.
virtual BackupAndRestoreBehavior GetRestoreBehavior(GetRestoreBehaviorMatchesAnyOfDelegate matchesAnyOfDelegate)=0
Returns the behavior for a restore with the selected items.
virtual StatusCode DeleteBackup(const RscString< 512 > &filename)=0
Deletes a backup from the device.
virtual StatusCode RestoreBackup(const RscString< 512 > &filename, const RscSecureString< 128 > &password, RestoreBackupMatchesAnyOfDelegate matchesAnyOfDelegate)=0
Starts an async task to restore a backup which will restore the selected items.
Contains info about the last or ongoing transfer operation.
Definition: TransferStatus.hpp:28