librime: user_db_recovery_task.h Source File

| librime 1.2 Rime Input Method Engine, the core library

user_db_recovery_task.h
Go to the documentation of this file.
1//
2// Copyright RIME Developers
3// Distributed under the BSD License
4//
5// 2013-04-22 GONG Chen <chen.sst@gmail.com>
6//
7#ifndef RIME_USER_DB_RECOVERY_TASK_H_
8#define RIME_USER_DB_RECOVERY_TASK_H_
9
10#include <rime/common.h>
11#include <rime/deployer.h>
12
13namespace rime {
14
15class Db;
16
17 class UserDbRecoveryTask : public DeploymentTask {
18 public:
19 explicit UserDbRecoveryTask(an<Db> db);
20 bool Run(Deployer* deployer);
21
22 protected:
23 void RestoreUserDataFromSnapshot(Deployer* deployer);
24
25 an<Db> db_;
26};
27
28 class UserDbRecoveryTaskComponent : public UserDbRecoveryTask::Component {
29 public:
30 UserDbRecoveryTask* Create(TaskInitializer arg);
31};
32
33} // namespace rime
34
35#endif // RIME_USER_DB_RECOVERY_TASK_H_
common.h
deployer.h
rime
Definition algebra.cc:12
rime::an
std::shared_ptr< T > an
Definition common.h:60
rime::TaskInitializer
std::any TaskInitializer
Definition deployer.h:22
rime::DeploymentTask::DeploymentTask
DeploymentTask()=default
rime::Deployer
Definition deployer.h:32
rime::Db
Definition db.h:33
rime::UserDbRecoveryTask
Definition user_db_recovery_task.h:17
rime::UserDbRecoveryTask::db_
an< Db > db_
Definition user_db_recovery_task.h:25
rime::UserDbRecoveryTask::UserDbRecoveryTask
UserDbRecoveryTask(an< Db > db)
Definition user_db_recovery_task.cc:17
rime::UserDbRecoveryTask::Run
bool Run(Deployer *deployer)
Definition user_db_recovery_task.cc:23
rime::UserDbRecoveryTask::RestoreUserDataFromSnapshot
void RestoreUserDataFromSnapshot(Deployer *deployer)
Definition user_db_recovery_task.cc:60
rime::UserDbRecoveryTaskComponent
Definition user_db_recovery_task.h:28
rime::UserDbRecoveryTaskComponent::Create
UserDbRecoveryTask * Create(TaskInitializer arg)
Definition user_db_recovery_task.cc:85