/ohos5.0/foundation/filemanagement/app_file_service/utils/include/b_error/ |
H A D | b_error.h | 51 enum class Codes : ErrCode { enum 142 Codes GetRawCode() const in GetRawCode() 179 return code_ != Codes::OK; 201 explicit BError(Codes code = Codes::OK, DEFINE_SOURCE_LOCATION) : code_(code) 236 {Codes::OK, "No error"}, 244 {Codes::SA_BROKEN_IPC, "SA failed to issue a IPC"}, 245 {Codes::SA_REFUSED_ACT, "SA refuse to act"}, 252 {Codes::SDK_BROKEN_IPC, "SDK failed to do IPC"}, 271 {static_cast<int>(Codes::OK), static_cast<int>(Codes::OK)}, 358 Codes code_ {Codes::OK}; [all …]
|
/ohos5.0/foundation/filemanagement/app_file_service/services/backup_sa/src/module_ipc/ |
H A D | service_stub.cpp | 150 return BError(BError::Codes::OK); in CmdInitRestoreSession() 170 return BError(BError::Codes::OK); in CmdInitBackupSession() 181 return BError(BError::Codes::OK); in CmdStart() 190 return BError(BError::Codes::OK); in CmdGetLocalCapabilities() 205 return BError(BError::Codes::OK); in CmdPublishFile() 230 return BError(BError::Codes::OK); in CmdAppFileReady() 245 return BError(BError::Codes::OK); in CmdAppDone() 269 return BError(BError::Codes::OK); in CmdResultReport() 311 return BError(BError::Codes::OK); in CmdAppendBundlesRestoreSession() 344 return BError(BError::Codes::OK); in CmdAppendBundlesDetailsRestoreSession() [all …]
|
H A D | service_incremental_reverse_proxy.cpp | 39 throw BError(BError::Codes::SA_BROKEN_IPC); in IncrementalBackupOnFileReady() 57 throw BError(BError::Codes::SA_BROKEN_IPC); in IncrementalBackupOnBundleStarted() 75 throw BError(BError::Codes::SA_BROKEN_IPC); in IncrementalBackupOnResultReport() 93 throw BError(BError::Codes::SA_BROKEN_IPC); in IncrementalBackupOnBundleFinished() 111 throw BError(BError::Codes::SA_BROKEN_IPC); in IncrementalBackupOnAllBundlesFinished() 129 throw BError(BError::Codes::SA_BROKEN_IPC); in IncrementalBackupOnProcessInfo() 147 throw BError(BError::Codes::SA_BROKEN_IPC); in IncrementalRestoreOnBundleStarted() 165 throw BError(BError::Codes::SA_BROKEN_IPC); in IncrementalRestoreOnBundleFinished() 183 throw BError(BError::Codes::SA_BROKEN_IPC); in IncrementalRestoreOnAllBundlesFinished() 203 throw BError(BError::Codes::SA_BROKEN_IPC); in IncrementalRestoreOnResultReport() [all …]
|
H A D | service_reverse_proxy.cpp | 32 throw BError(BError::Codes::SA_BROKEN_IPC); in BackupOnFileReady() 49 throw BError(BError::Codes::SA_BROKEN_IPC); in BackupOnBundleStarted() 67 throw BError(BError::Codes::SA_BROKEN_IPC); in BackupOnResultReport() 85 throw BError(BError::Codes::SA_BROKEN_IPC); in BackupOnBundleFinished() 103 throw BError(BError::Codes::SA_BROKEN_IPC); in BackupOnAllBundlesFinished() 120 throw BError(BError::Codes::SA_BROKEN_IPC); in BackupOnProcessInfo() 137 throw BError(BError::Codes::SA_BROKEN_IPC); in RestoreOnBundleStarted() 155 throw BError(BError::Codes::SA_BROKEN_IPC); in RestoreOnBundleFinished() 173 throw BError(BError::Codes::SA_BROKEN_IPC); in RestoreOnAllBundlesFinished() 193 throw BError(BError::Codes::SA_BROKEN_IPC); in RestoreOnFileReady() [all …]
|
H A D | sub_service.cpp | 82 OnAllBundlesFinished(BError(BError::Codes::OK)); in Finish() 83 return BError(BError::Codes::OK); in Finish() 103 return BError(BError::Codes::SA_INVAL_ARG); in PublishFile() 108 return BError(BError::Codes::SA_INVAL_ARG); in PublishFile() 162 OnAllBundlesFinished(BError(BError::Codes::OK)); in AppFileReady() 163 return BError(BError::Codes::OK); in AppFileReady() 181 return BError(BError::Codes::SA_INVAL_ARG); in AppDone() 210 return BError(BError::Codes::OK); in AppDone() 247 return BError(BError::Codes::SA_INVAL_ARG); in LaunchBackupExtension() 251 return BError(BError::Codes::SA_INVAL_ARG); in LaunchBackupExtension() [all …]
|
H A D | svc_session_manager.cpp | 50 throw BError(BError::Codes::SDK_MIXED_SCENARIO); in VerifyCallerAndScenario() 78 return BError(BError::Codes::SA_REFUSED_ACT); in Active() 93 return BError(BError::Codes::OK); in Active() 135 throw BError(BError::Codes::SA_REFUSED_ACT, ss.str()); in VerifyBundleName() 179 throw BError(BError::Codes::SA_REFUSED_ACT, ss.str()); in OnBundleFileReady() 426 throw BError(BError::Codes::SA_REFUSED_ACT, ss.str()); in GetBackupExtNameMap() 847 ErrCode ret = BError(BError::Codes::OK); in ClearSessionData() 860 return BError(BError::Codes::SA_INVAL_ARG); in ClearSessionData() 865 return BError(BError::Codes::EXT_INVAL_ARG); in ClearSessionData() 872 if (ret != BError(BError::Codes::OK)) { in ClearSessionData() [all …]
|
/ohos5.0/foundation/filemanagement/app_file_service/frameworks/native/backup_kit_inner/src/ |
H A D | service_proxy.cpp | 54 return BError(BError::Codes::SDK_INVAL_ARG, str.data()).GetCode(); in InitRestoreSession() 81 return BError(BError::Codes::SDK_INVAL_ARG, str.data()).GetCode(); in InitBackupSession() 101 return BError(BError::Codes::SDK_INVAL_ARG, str.data()).GetCode(); in Start() 462 BError(BError::Codes::SA_INVAL_ARG).GetCode()); in GetInstance() 522 static_cast<int32_t>(BError::Codes::SA_INVAL_ARG)); in OnLoadSystemAbilityFail() 548 return BError(BError::Codes::OK, "success"); in GetBackupInfo() 576 return BError(BError::Codes::OK, "success"); in UpdateTimer() 604 return BError(BError::Codes::OK, "success"); in UpdateSendRate() 631 return BError(BError::Codes::OK, "success"); in ReportAppProcessInfo() 653 return BError(BError::Codes::OK, "success"); in StartExtTimer() [all …]
|
H A D | service_incremental_proxy.cpp | 35 BExcepUltils::BAssert(Remote(), BError::Codes::SDK_INVAL_ARG, "Remote is nullptr"); in Release() 47 return BError(BError::Codes::SDK_INVAL_ARG, str.data()).GetCode(); in Release() 55 BExcepUltils::BAssert(Remote(), BError::Codes::SDK_INVAL_ARG, "Remote is nullptr"); in GetLocalCapabilitiesIncremental() 84 BExcepUltils::BAssert(Remote(), BError::Codes::SDK_INVAL_ARG, "Remote is nullptr"); in GetAppLocalListAndDoIncrementalBackup() 107 BExcepUltils::BAssert(Remote(), BError::Codes::SDK_INVAL_ARG, "remote is nullptr"); in InitIncrementalBackupSession() 119 return BError(BError::Codes::SDK_INVAL_ARG, "Empty reverse stub").GetCode(); in InitIncrementalBackupSession() 216 return BError(BError::Codes::SDK_INVAL_ARG, str.data()).GetCode(); in PublishIncrementalFile() 246 return BError(BError::Codes::SDK_INVAL_ARG, str.data()).GetCode(); in PublishSAIncrementalFile() 282 return BError(BError::Codes::SDK_INVAL_ARG, str.data()).GetCode(); in AppIncrementalFileReady() 306 return BError(BError::Codes::SDK_INVAL_ARG, str.data()).GetCode(); in AppIncrementalDone() [all …]
|
H A D | service_reverse_stub.cpp | 125 return BError(BError::Codes::OK); in CmdBackupOnFileReady() 133 return BError(BError::Codes::OK); in CmdBackupOnResultReport() 141 return BError(BError::Codes::OK); in CmdBackupOnBundleStarted() 149 return BError(BError::Codes::OK); in CmdBackupOnBundleFinished() 156 return BError(BError::Codes::OK); in CmdBackupOnAllBundlesFinished() 164 return BError(BError::Codes::OK); in CmdBackupOnProcessInfo() 172 return BError(BError::Codes::OK); in CmdRestoreOnBundleStarted() 180 return BError(BError::Codes::OK); in CmdRestoreOnBundleFinished() 187 return BError(BError::Codes::OK); in CmdRestoreOnAllBundlesFinished() 201 return BError(BError::Codes::OK); in CmdRestoreOnFileReady() [all …]
|
/ohos5.0/foundation/filemanagement/app_file_service/tests/unittests/backup_api/backup_impl/include/ |
H A D | i_service_mock.h | 43 return BError(BError::Codes::OK); in InvokeSendRequest() 54 return BError(BError::Codes::OK); in InvokeGetLocalSendRequest() 59 return BError(BError::Codes::OK); in InitRestoreSession() 64 return BError(BError::Codes::OK); in InitBackupSession() 69 return BError(BError::Codes::OK); in Start() 79 return BError(BError::Codes::OK); in PublishFile() 84 return BError(BError::Codes::OK); in AppFileReady() 89 return BError(BError::Codes::OK); in AppDone() 95 return BError(BError::Codes::OK); in ServiceResultReport() 100 return BError(BError::Codes::OK); in GetFileHandle() [all …]
|
H A D | ext_extension_mock.h | 41 return BError(BError::Codes::OK); in InvokeSendRequest() 53 return BError(BError::Codes::OK); in InvokeGetFileHandleRequest() 79 return BError(BError::Codes::OK); in HandleClear() 90 return BError(BError::Codes::OK); in HandleBackup() 99 return BError(BError::Codes::OK); in PublishFile() 104 return BError(BError::Codes::OK); in HandleRestore() 109 return BError(BError::Codes::OK); in GetIncrementalFileHandle() 114 return BError(BError::Codes::OK); in PublishIncrementalFile() 119 return BError(BError::Codes::OK); in HandleIncrementalBackup() 124 return BError(BError::Codes::OK); in IncrementalOnBackup() [all …]
|
/ohos5.0/foundation/filemanagement/app_file_service/tests/unittests/backup_sa/session/ |
H A D | service_proxy_mock.cpp | 35 return BError(BError::Codes::OK); in Start() 45 return BError(BError::Codes::OK); in PublishFile() 50 return BError(BError::Codes::OK); in AppFileReady() 55 return BError(BError::Codes::OK); in AppDone() 61 return BError(BError::Codes::OK); in ServiceResultReport() 66 return BError(BError::Codes::OK); in GetFileHandle() 72 return BError(BError::Codes::OK); in AppendBundlesRestoreSession() 80 return BError(BError::Codes::OK); in AppendBundlesRestoreSession() 85 return BError(BError::Codes::OK); in AppendBundlesBackupSession() 91 return BError(BError::Codes::OK); in AppendBundlesDetailsBackupSession() [all …]
|
/ohos5.0/foundation/filemanagement/app_file_service/frameworks/native/backup_ext/src/ |
H A D | ext_extension_stub.cpp | 95 return BError(BError::Codes::OK); in CmdGetFileHandle() 106 return BError(BError::Codes::OK); in CmdHandleClear() 119 return BError(BError::Codes::OK); in CmdHandleBackup() 135 return BError(BError::Codes::OK); in CmdPublishFile() 148 return BError(BError::Codes::OK); in CmdHandleRestore() 162 return BError(BError::Codes::OK); in CmdGetIncrementalFileHandle() 178 return BError(BError::Codes::OK); in CmdPublishIncrementalFile() 191 return BError(BError::Codes::OK); in CmdHandleIncrementalBackup() 204 return BError(BError::Codes::OK); in CmdIncrementalOnBackup() 216 return BError(BError::Codes::OK); in CmdGetIncrementalBackupFileHandle() [all …]
|
/ohos5.0/foundation/filemanagement/app_file_service/tests/mock/backup_kit_inner/ |
H A D | service_proxy_mock.cpp | 52 return BError(BError::Codes::OK); in Start() 65 return BError(BError::Codes::OK); in PublishFile() 70 return BError(BError::Codes::OK); in AppFileReady() 75 return BError(BError::Codes::OK); in AppDone() 81 return BError(BError::Codes::OK); in ServiceResultReport() 86 return BError(BError::Codes::OK); in GetFileHandle() 94 return BError(BError::Codes::OK); in AppendBundlesRestoreSession() 103 return BError(BError::Codes::OK); in AppendBundlesRestoreSession() 108 return BError(BError::Codes::OK); in AppendBundlesBackupSession() 114 return BError(BError::Codes::OK); in AppendBundlesDetailsBackupSession() [all …]
|
/ohos5.0/foundation/filemanagement/app_file_service/tests/mock/module_ipc/ |
H A D | service_mock.cpp | 47 return BError(BError::Codes::OK); in InitRestoreSession() 52 return BError(BError::Codes::OK); in InitBackupSession() 57 return BError(BError::Codes::OK); in Start() 62 return BError(BError::Codes::OK); in PublishFile() 67 return BError(BError::Codes::OK); in AppFileReady() 72 return BError(BError::Codes::OK); in AppDone() 78 return BError(BError::Codes::OK); in ServiceResultReport() 84 return BError(BError::Codes::OK); in AppendBundlesRestoreSession() 92 return BError(BError::Codes::OK); in AppendBundlesRestoreSession() 97 return BError(BError::Codes::OK); in AppendBundlesBackupSession() [all …]
|
H A D | service_stub_mock.cpp | 108 return BError(BError::Codes::OK); in CmdInitRestoreSession() 118 return BError(BError::Codes::OK); in CmdInitBackupSession() 125 return BError(BError::Codes::OK); in CmdStart() 132 return BError(BError::Codes::OK); in CmdGetLocalCapabilities() 140 return BError(BError::Codes::OK); in CmdPublishFile() 150 return BError(BError::Codes::OK); in CmdAppFileReady() 159 return BError(BError::Codes::OK); in CmdAppDone() 173 return BError(BError::Codes::OK); in CmdResultReport() 194 return BError(BError::Codes::OK); in CmdAppendBundlesRestoreSession() 206 return BError(BError::Codes::OK); in CmdAppendBundlesDetailsRestoreSession() [all …]
|
/ohos5.0/foundation/filemanagement/app_file_service/tests/unittests/backup_utils/b_error/ |
H A D | b_error_test.cpp | 43 BError be(BError::Codes::OK); 200 BError be(BError::Codes::OK); 308 BError be(BError::Codes::OK); 309 BError::Codes result = be.GetRawCode(); 310 EXPECT_EQ(result, BError::Codes::OK); 327 BError::Codes result = be.GetRawCode(); 345 BError::Codes result = be.GetRawCode(); 363 BError::Codes result = be.GetRawCode(); 381 BError::Codes result = be.GetRawCode(); 399 BError::Codes result = be.GetRawCode(); [all …]
|
/ohos5.0/foundation/filemanagement/app_file_service/tests/unittests/backup_sa/module_ipc/ |
H A D | service_test.cpp | 88 EXPECT_GE(fd, BError(BError::Codes::OK)); in Init() 90 EXPECT_EQ(ret, BError(BError::Codes::OK)); in Init() 92 EXPECT_EQ(ret, BError(BError::Codes::OK)); in Init() 94 EXPECT_EQ(ret, BError(BError::Codes::OK)); in Init() 97 EXPECT_EQ(ret, BError(BError::Codes::OK)); in Init() 99 EXPECT_EQ(ret, BError(BError::Codes::OK)); in Init() 101 EXPECT_EQ(ret, BError(BError::Codes::OK)); in Init() 121 EXPECT_GT(fd, BError(BError::Codes::OK)); 189 EXPECT_EQ(ret, BError(BError::Codes::OK)); 211 EXPECT_EQ(ret, BError(BError::Codes::OK)); [all …]
|
H A D | service_reverse_proxy_test.cpp | 124 EXPECT_EQ(err.GetRawCode(), BError::Codes::SA_BROKEN_IPC); 134 EXPECT_EQ(err.GetRawCode(), BError::Codes::SA_BROKEN_IPC); 144 EXPECT_EQ(err.GetRawCode(), BError::Codes::SA_BROKEN_IPC); 155 EXPECT_EQ(err.GetRawCode(), BError::Codes::SA_BROKEN_IPC); 186 EXPECT_EQ(err.GetRawCode(), BError::Codes::SA_BROKEN_IPC); 198 EXPECT_EQ(err.GetRawCode(), BError::Codes::SA_BROKEN_IPC); 211 EXPECT_EQ(err.GetRawCode(), BError::Codes::SA_BROKEN_IPC); 244 EXPECT_EQ(err.GetRawCode(), BError::Codes::SA_BROKEN_IPC); 301 EXPECT_EQ(err.GetRawCode(), BError::Codes::SA_BROKEN_IPC); 311 EXPECT_EQ(err.GetRawCode(), BError::Codes::SA_BROKEN_IPC); [all …]
|
H A D | service_stub_test.cpp | 194 EXPECT_EQ(ret, BError(BError::Codes::OK)); 239 EXPECT_EQ(ret, BError(BError::Codes::OK)); 271 EXPECT_EQ(ret, BError(BError::Codes::OK)); 303 EXPECT_EQ(ret, BError(BError::Codes::OK)); 345 EXPECT_EQ(ret, BError(BError::Codes::OK)); 424 EXPECT_EQ(ret, BError(BError::Codes::OK)); 462 EXPECT_EQ(ret, BError(BError::Codes::OK)); 497 EXPECT_EQ(ret, BError(BError::Codes::OK)); 600 EXPECT_EQ(ret, BError(BError::Codes::OK)); 638 EXPECT_EQ(ret, BError(BError::Codes::OK)); [all …]
|
H A D | service_throw_test.cpp | 71 throw BError(BError::Codes::EXT_THROW_EXCEPTION); in __anonfb54d9320102() 112 throw BError(BError::Codes::EXT_THROW_EXCEPTION); in __anonfb54d9320402() 154 throw BError(BError::Codes::EXT_THROW_EXCEPTION); in __anonfb54d9320702() 181 throw BError(BError::Codes::EXT_THROW_EXCEPTION); in __anonfb54d9320802() 215 throw BError(BError::Codes::EXT_THROW_EXCEPTION); in __anonfb54d9320a02() 249 throw BError(BError::Codes::EXT_THROW_EXCEPTION); in __anonfb54d9320c02() 290 throw BError(BError::Codes::EXT_THROW_EXCEPTION); in __anonfb54d9320f02() 332 throw BError(BError::Codes::EXT_THROW_EXCEPTION); in __anonfb54d9321202() 371 throw BError(BError::Codes::EXT_THROW_EXCEPTION); in __anonfb54d9321502() 409 throw BError(BError::Codes::EXT_THROW_EXCEPTION); in __anonfb54d9321802() [all …]
|
/ohos5.0/foundation/filemanagement/app_file_service/tests/unittests/backup_api/backup_impl/ |
H A D | service_proxy_test.cpp | 85 EXPECT_EQ(result, BError(BError::Codes::OK)); 88 EXPECT_NE(result, BError(BError::Codes::OK)); 113 EXPECT_EQ(result, BError(BError::Codes::OK)); 116 EXPECT_NE(result, BError(BError::Codes::OK)); 141 EXPECT_EQ(result, BError(BError::Codes::OK)); 144 EXPECT_NE(result, BError(BError::Codes::OK)); 169 EXPECT_GT(fd, BError(BError::Codes::OK)); 171 EXPECT_LT(fdErr, BError(BError::Codes::OK)); 539 EXPECT_GT(fd, BError(BError::Codes::OK)); 696 EXPECT_EQ(ret, BError(BError::Codes::OK)); [all …]
|
H A D | service_reverse_test.cpp | 74 EXPECT_EQ(err, BError(BError::Codes::OK)); in OnAllBundlesFinishedTest() 434 service_->BackupOnAllBundlesFinished(BError(BError::Codes::OK)); 435 service_->RestoreOnAllBundlesFinished(BError(BError::Codes::OK)); 462 service_->BackupOnAllBundlesFinished(BError(BError::Codes::OK)); 489 service_->BackupOnAllBundlesFinished(BError(BError::Codes::OK)); 762 service_->RestoreOnAllBundlesFinished(BError(BError::Codes::OK)); 763 service_->BackupOnAllBundlesFinished(BError(BError::Codes::OK)); 790 service_->RestoreOnAllBundlesFinished(BError(BError::Codes::OK)); 817 service_->RestoreOnAllBundlesFinished(BError(BError::Codes::OK)); 907 service_->BackupOnAllBundlesFinished(BError(BError::Codes::OK)); [all …]
|
/ohos5.0/foundation/filemanagement/app_file_service/tests/unittests/backup_ext/ |
H A D | ext_extension_stub_test.cpp | 136 EXPECT_EQ(err, BError(BError::Codes::OK)); 150 EXPECT_EQ(err, BError(BError::Codes::OK)); 182 EXPECT_EQ(err, BError(BError::Codes::OK)); 214 EXPECT_EQ(err, BError(BError::Codes::OK)); 252 EXPECT_EQ(err, BError(BError::Codes::OK)); 284 EXPECT_EQ(err, BError(BError::Codes::OK)); 323 EXPECT_EQ(err, BError(BError::Codes::OK)); 362 EXPECT_EQ(err, BError(BError::Codes::OK)); 397 EXPECT_EQ(err, BError(BError::Codes::OK)); 430 EXPECT_EQ(err, BError(BError::Codes::OK)); [all …]
|
/ohos5.0/foundation/filemanagement/app_file_service/tests/moduletests/backup_kit_inner/ |
H A D | b_session_restore_async_test.cpp | 162 EXPECT_NE(ret, ErrCode(BError::Codes::OK)); 166 EXPECT_EQ(ret, ErrCode(BError::Codes::OK)); 196 EXPECT_NE(ret, ErrCode(BError::Codes::OK)); 200 EXPECT_EQ(ret, ErrCode(BError::Codes::OK)); 229 EXPECT_EQ(ret, ErrCode(BError::Codes::OK)); 231 EXPECT_EQ(ret, ErrCode(BError::Codes::OK)); 234 EXPECT_NE(ret, ErrCode(BError::Codes::OK)); 265 EXPECT_EQ(ret, ErrCode(BError::Codes::OK)); 267 EXPECT_EQ(ret, ErrCode(BError::Codes::OK)); 270 EXPECT_NE(ret, ErrCode(BError::Codes::OK)); [all …]
|