| /base/notification/distributed_notification_service/test/fuzztest/settemplate_fuzzer/ |
| D | settemplate_fuzzer.cpp | 32 Notification::NotificationRequest request(notificationId); in DoSomethingInterestingWithMyAPI() local 34 request.SetTapDismissed(enabled); in DoSomethingInterestingWithMyAPI() 38 request.SetVisibleness(VisiblenessType); in DoSomethingInterestingWithMyAPI() 39 request.GetVisibleness(); in DoSomethingInterestingWithMyAPI() 40 request.GetBadgeIconStyle(); in DoSomethingInterestingWithMyAPI() 41 request.SetShortcutId(stringData); in DoSomethingInterestingWithMyAPI() 42 request.GetShortcutId(); in DoSomethingInterestingWithMyAPI() 43 request.SetFloatingIcon(enabled); in DoSomethingInterestingWithMyAPI() 44 request.IsFloatingIcon(); in DoSomethingInterestingWithMyAPI() 45 request.SetProgressBar(notificationId, notificationId, enabled); in DoSomethingInterestingWithMyAPI() [all …]
|
| /base/startup/appspawn/test/moduletest/ |
| D | appspawn_client_test.cpp | 40 AppParameter request = {}; variable 41 memset_s((void *)(&request), sizeof(request), 0, sizeof(request)); 42 ClientFillMsg(&request, "ohos.samples.clock", "ls -l > aaa.txt"); 43 request.code = SPAWN_NATIVE_PROCESS; 44 ret = ClientSendMsg(reinterpret_cast<const uint8_t *>(&request), sizeof(request)); 61 AppParameter request = {}; variable 62 memset_s((void *)(&request), sizeof(request), 0, sizeof(request)); 63 ClientFillMsg(&request, "ohos.samples.clock", "ls -l > aaa.txt"); 66 request.gidCount = APP_MAX_GIDS + 1; 67 ret = ClientSendMsg(reinterpret_cast<const uint8_t *>(&request), sizeof(request)); [all …]
|
| D | appspawn_test_client.h | 96 … void ClientFillMsg(AppParameter *request, const std::string &processName, const std::string &cmd) in ClientFillMsg() argument 98 request->code = DEFAULT; in ClientFillMsg() 99 request->flags = 0; in ClientFillMsg() 100 request->uid = 20010033; // 20010033 test uid in ClientFillMsg() 101 request->gid = 20010033; // 20010033 test gid in ClientFillMsg() 102 request->gidCount = 0; in ClientFillMsg() 103 request->accessTokenId = 0x200a509d; // 0x200a509d test token id in ClientFillMsg() 104 request->accessTokenIdEx = 0x4832514205; // 0x4832514205 test token id in ClientFillMsg() 105 request->allowInternet = 1; in ClientFillMsg() 106 request->extraInfo.totalLength = 0; in ClientFillMsg() [all …]
|
| /base/hiviewdfx/faultloggerd/interfaces/innerkits/faultloggerd_client/ |
| D | faultloggerd_client.cpp | 51 struct FaultLoggerdRequest request; in RequestFileDescriptor() local 52 (void)memset_s(&request, sizeof(request), 0, sizeof(request)); in RequestFileDescriptor() 53 request.type = type; in RequestFileDescriptor() 54 request.pid = getpid(); in RequestFileDescriptor() 55 request.tid = gettid(); in RequestFileDescriptor() 56 request.uid = getuid(); in RequestFileDescriptor() 57 request.time = OHOS::HiviewDFX::GetTimeMilliSeconds(); in RequestFileDescriptor() 58 return RequestFileDescriptorEx(&request); in RequestFileDescriptor() 61 int32_t RequestLogFileDescriptor(struct FaultLoggerdRequest *request) in RequestLogFileDescriptor() argument 63 request->clientType = (int32_t)FaultLoggerClientType::LOG_FILE_DES_CLIENT; in RequestLogFileDescriptor() [all …]
|
| /base/notification/distributed_notification_service/test/fuzztest/setprogressbar_fuzzer/ |
| D | setprogressbar_fuzzer.cpp | 28 Notification::NotificationRequest request(notificationId); in DoSomethingInterestingWithMyAPI() local 30 request.SetIsAgentNotification(enabled); in DoSomethingInterestingWithMyAPI() 32 request.AddMessageUser(messageUser); in DoSomethingInterestingWithMyAPI() 33 request.IsAlertOneTime(); in DoSomethingInterestingWithMyAPI() 35 request.SetAutoDeletedTime(deletedTime); in DoSomethingInterestingWithMyAPI() 36 request.GetAutoDeletedTime(); in DoSomethingInterestingWithMyAPI() 38 request.SetLittleIcon(icon); in DoSomethingInterestingWithMyAPI() 39 request.SetBigIcon(icon); in DoSomethingInterestingWithMyAPI() 40 request.GetClassification(); in DoSomethingInterestingWithMyAPI() 41 request.GetColor(); in DoSomethingInterestingWithMyAPI() [all …]
|
| /base/location/test/fuzztest/locator/requestmanager_fuzzer/ |
| D | requestmanager_fuzzer.cpp | 34 std::shared_ptr<Request> request = std::make_shared<Request>(); in RequestManagerFuzzerTest() local 46 requestManager->UpdateRequestRecord(request, true); in RequestManagerFuzzerTest() 47 requestManager->UpdateRequestRecord(request, false); in RequestManagerFuzzerTest() 49 requestManager->UpdateUsingPermission(request); in RequestManagerFuzzerTest() 57 std::shared_ptr<Request> request = std::make_shared<Request>(); in RequestFuzzerTest() local 58 request->SetUid(data[index++]); in RequestFuzzerTest() 59 request->SetPid(data[index++]); in RequestFuzzerTest() 61 request->SetPackageName(packageName); in RequestFuzzerTest() 63 request->SetRequestConfig(*requestConfig); in RequestFuzzerTest() 64 request->SetLocatorCallBack(nullptr); in RequestFuzzerTest() [all …]
|
| /base/notification/distributed_notification_service/test/fuzztest/notificationrequest_fuzzer/ |
| D | notificationrequest_fuzzer.cpp | 33 Notification::NotificationRequest request(notificationId); in DoSomethingInterestingWithMyAPI() local 34 request.IsInProgress(); in DoSomethingInterestingWithMyAPI() 36 request.SetInProgress(enabled); in DoSomethingInterestingWithMyAPI() 37 request.IsUnremovable(); in DoSomethingInterestingWithMyAPI() 38 request.SetUnremovable(enabled); in DoSomethingInterestingWithMyAPI() 39 request.GetBadgeNumber(); in DoSomethingInterestingWithMyAPI() 40 request.GetNotificationId(); in DoSomethingInterestingWithMyAPI() 42 request.SetWantAgent(wantAgent); in DoSomethingInterestingWithMyAPI() 43 request.GetWantAgent(); in DoSomethingInterestingWithMyAPI() 44 request.SetRemovalWantAgent(wantAgent); in DoSomethingInterestingWithMyAPI() [all …]
|
| /base/global/resource_management_lite/frameworks/resmgr_lite/test/unittest/lite/common/ |
| D | res_config_impl_test.cpp | 503 ResConfigImpl *request = CreateResConfigImpl(nullptr, nullptr, nullptr); variable 506 EXPECT_TRUE(current->IsMoreSuitable(other, request)); 507 EXPECT_TRUE(other->IsMoreSuitable(current, request)); 508 delete request; 520 ResConfigImpl *request = CreateResConfigImpl("fr", nullptr, "CA"); variable 523 EXPECT_TRUE(current->IsMoreSuitable(other, request)); 524 EXPECT_TRUE(other->IsMoreSuitable(current, request)); 525 delete request; 537 ResConfigImpl *request = CreateResConfigImpl("fr", nullptr, "CA"); variable 540 EXPECT_TRUE(current->IsMoreSuitable(other, request)); [all …]
|
| /base/hiviewdfx/faultloggerd/tools/process_dump/ |
| D | process_dumper.cpp | 86 std::shared_ptr<ProcessDumpRequest> request = std::make_shared<ProcessDumpRequest>(); in Dump() local 87 resDump_ = DumpProcess(request); in Dump() 104 DfxStackInfoFormatter formatter(process_, request); in Dump() 114 …DFXLOG_INFO("Finish dump stacktrace for %s(%d:%d).", request->processName, request->pid, request->… in Dump() 124 int ProcessDumper::DumpProcess(std::shared_ptr<ProcessDumpRequest> request) in DumpProcess() argument 128 ssize_t readCount = read(STDIN_FILENO, request.get(), sizeof(ProcessDumpRequest)); in DumpProcess() 135 isCrash_ = request->siginfo.si_signo != SIGDUMP; in DumpProcess() 136 bool isLeakDump = request->siginfo.si_signo == SIGLEAK_STACK; in DumpProcess() 141 if (((!isCrash_) && (syscall(SYS_getppid) != request->nsPid)) || in DumpProcess() 142 ((isCrash_ || isLeakDump) && (syscall(SYS_getppid) != request->vmNsPid))) { in DumpProcess() [all …]
|
| /base/account/os_account/services/accountmgr/src/appaccount/ |
| D | app_account_manager_service.cpp | 63 AuthenticatorSessionRequest request; in AddAccountImplicitly() local 64 request.callerPid = IPCSkeleton::GetCallingPid(); in AddAccountImplicitly() 65 ErrCode result = GetCallingInfo(request.callerUid, request.callerBundleName, request.appIndex); in AddAccountImplicitly() 69 request.owner = owner; in AddAccountImplicitly() 70 request.authType = authType; in AddAccountImplicitly() 71 request.options = options; in AddAccountImplicitly() 72 request.callerAbilityName = options.GetStringParam(Constants::KEY_CALLER_ABILITY_NAME); in AddAccountImplicitly() 73 request.callback = callback; in AddAccountImplicitly() 74 request.options.RemoveParam(Constants::KEY_CALLER_ABILITY_NAME); in AddAccountImplicitly() 75 request.options.SetParam(Constants::KEY_CALLER_PID, request.callerPid); in AddAccountImplicitly() [all …]
|
| /base/global/resource_management/frameworks/resmgr/test/unittest/common/ |
| D | res_config_impl_test.cpp | 659 ResConfigImpl *request = CreateResConfigImpl(nullptr, nullptr, nullptr); variable 662 EXPECT_TRUE(current->IsMoreSuitable(other, request)); 663 EXPECT_TRUE(other->IsMoreSuitable(current, request)); 664 delete request; 676 ResConfigImpl *request = CreateResConfigImpl("fr", nullptr, "CA"); variable 679 EXPECT_TRUE(current->IsMoreSuitable(other, request)); 680 EXPECT_TRUE(other->IsMoreSuitable(current, request)); 684 request->SetPreferredLocaleInfo(locale); 685 EXPECT_TRUE(current->IsMoreSuitable(other, request)); 686 EXPECT_TRUE(other->IsMoreSuitable(current, request)); [all …]
|
| /base/notification/distributed_notification_service/frameworks/ans/test/unittest/ |
| D | notification_test.cpp | 46 sptr<NotificationRequest> request = nullptr; variable 47 auto rrc = std::make_shared<Notification>(request); 71 sptr<NotificationRequest> request = nullptr; variable 72 auto rrc = std::make_shared<Notification>(deviceId, request); 86 sptr<NotificationRequest> request = nullptr; variable 87 auto rrc = std::make_shared<Notification>(request); 100 sptr<NotificationRequest> request = nullptr; variable 101 auto rrc = std::make_shared<Notification>(request); 114 sptr<NotificationRequest> request = new NotificationRequest(1); variable 115 auto rrc = std::make_shared<Notification>(request); [all …]
|
| /base/location/services/location_locator/locator/source/ |
| D | report_manager.cpp | 74 auto request = *iter; in OnReportLocation() local 75 WriteNetWorkReportEvent(abilityName, request, location); in OnReportLocation() 77 if (IsRequestFuse(request)) { in OnReportLocation() 78 ret = ProcessRequestForReport(request, deadRequests, fuseLocation); in OnReportLocation() 80 ret = ProcessRequestForReport(request, deadRequests, location); in OnReportLocation() 87 auto request = *iter; in OnReportLocation() local 88 if (request == nullptr) { in OnReportLocation() 93 requestManger->UpdateRequestRecord(request, false); in OnReportLocation() 115 bool ReportManager::ProcessRequestForReport(std::shared_ptr<Request>& request, in ProcessRequestForReport() argument 118 if (request == nullptr || request->GetRequestConfig() == nullptr || in ProcessRequestForReport() [all …]
|
| D | request_manager.cpp | 62 void RequestManager::UpdateUsingPermission(std::shared_ptr<Request> request) in UpdateUsingPermission() argument 66 if (request == nullptr) { in UpdateUsingPermission() 72 request->GetTokenId(), request->GetFirstTokenId()); in UpdateUsingPermission() 73 UpdateUsingApproximatelyPermission(request); in UpdateUsingPermission() 77 void RequestManager::UpdateUsingApproximatelyPermission(std::shared_ptr<Request> request) in UpdateUsingApproximatelyPermission() argument 79 uint32_t callingTokenId = request->GetTokenId(); in UpdateUsingApproximatelyPermission() 80 uint32_t callingFirstTokenid = request->GetFirstTokenId(); in UpdateUsingApproximatelyPermission() 81 int32_t uid = request->GetUid(); in UpdateUsingApproximatelyPermission() 84 if (!request->GetApproximatelyPermState()) { in UpdateUsingApproximatelyPermission() 86 request->SetApproximatelyPermState(true); in UpdateUsingApproximatelyPermission() [all …]
|
| /base/notification/distributed_notification_service/test/fuzztest/publishnotification_fuzzer/ |
| D | publishnotification_fuzzer.cpp | 29 Notification::NotificationRequest request; in DoSomethingInterestingWithMyAPI() local 30 request.SetAlertOneTime(*data % ENABLE); in DoSomethingInterestingWithMyAPI() 35 request.SetBadgeIconStyle(badgeStyle); in DoSomethingInterestingWithMyAPI() 36 request.SetBadgeNumber(style); in DoSomethingInterestingWithMyAPI() 37 request.SetClassification(stringData); in DoSomethingInterestingWithMyAPI() 40 request.SetColor(color); in DoSomethingInterestingWithMyAPI() 41 request.SetColorEnabled(*data % ENABLE); in DoSomethingInterestingWithMyAPI() 50 request.SetContent(content); in DoSomethingInterestingWithMyAPI() 51 request.SetCountdownTimer(*data % ENABLE); in DoSomethingInterestingWithMyAPI() 52 request.SetCreatorBundleName(stringData); in DoSomethingInterestingWithMyAPI() [all …]
|
| /base/location/test/location_fence/source/ |
| D | location_fence_test.cpp | 43 std::unique_ptr<GeofenceRequest> request = std::make_unique<GeofenceRequest>(); variable 44 request->scenario = 0x301; // scenario 45 request->geofence.latitude = 34.12; // latitude 46 request->geofence.longitude = 124.11; // longitude 47 request->geofence.radius = 100.0; // radius 48 request->geofence.expiration = 10000.0; // expiration 52 EXPECT_TRUE(fenceImpl_->AddFenceExt(request, wantAgent) == ERRCODE_NOT_SUPPORTED); 54 EXPECT_TRUE(fenceImpl_->AddFenceExt(request, wantAgent) == ERRCODE_SUCCESS); 63 std::unique_ptr<GeofenceRequest> request = std::make_unique<GeofenceRequest>(); variable 64 request->scenario = 0x301; // scenario [all …]
|
| /base/security/access_token/frameworks/privacy/src/ |
| D | permission_used_request_parcel.cpp | 24 RETURN_IF_FALSE(out.WriteUint32(this->request.tokenId)); in Marshalling() 25 RETURN_IF_FALSE(out.WriteBool(this->request.isRemote)); in Marshalling() 26 RETURN_IF_FALSE(out.WriteString(this->request.deviceId)); in Marshalling() 27 RETURN_IF_FALSE(out.WriteString(this->request.bundleName)); in Marshalling() 29 RETURN_IF_FALSE(out.WriteUint32(this->request.permissionList.size())); in Marshalling() 30 for (const auto& perm : this->request.permissionList) { in Marshalling() 33 RETURN_IF_FALSE(out.WriteInt64(this->request.beginTimeMillis)); in Marshalling() 34 RETURN_IF_FALSE(out.WriteInt64(this->request.endTimeMillis)); in Marshalling() 35 RETURN_IF_FALSE(out.WriteInt32(this->request.flag)); in Marshalling() 46 RELEASE_IF_FALSE(in.ReadUint32(requestParcel->request.tokenId), requestParcel); in Unmarshalling() [all …]
|
| /base/notification/distributed_notification_service/services/ans/src/ |
| D | advanced_notification_live_view_service.cpp | 41 ANS_LOGD("Recover request: %{public}s.", requestObj.request->Dump().c_str()); in RecoverLiveViewFromDb() 42 if (!IsLiveViewCanRecover(requestObj.request)) { in RecoverLiveViewFromDb() 43 if (DeleteNotificationRequestFromDb(requestObj.request->GetKey()) != ERR_OK) { in RecoverLiveViewFromDb() 66 StartFinishTimer(record, requestObj.request->GetFinishDeadLine()); in RecoverLiveViewFromDb() 67 StartUpdateTimer(record, requestObj.request->GetUpdateDeadLine()); in RecoverLiveViewFromDb() 82 if (!record->request->IsCommonLiveView()) { in UpdateNotificationTimerInfo() 86 auto content = record->request->GetContent()->GetNotificationContent(); in UpdateNotificationTimerInfo() 119 if ((record->request == nullptr) || !(record->request->IsCommonLiveView())) { in ProcForDeleteLiveView() 123 if (DeleteNotificationRequestFromDb(record->request->GetKey()) != ERR_OK) { in ProcForDeleteLiveView() 158 bool AdvancedNotificationService::IsLiveViewCanRecover(const sptr<NotificationRequest> request) in IsLiveViewCanRecover() argument [all …]
|
| /base/location/test/fuzztest/locator/locatorbackgroundproxy_fuzzer/ |
| D | locatorbackgroundproxy_fuzzer.cpp | 35 std::shared_ptr<Request> request = in LocatorBackgroundProxyFuzzerTest() local 38 request->SetUid(data[index++]); in LocatorBackgroundProxyFuzzerTest() 39 request->SetPid(data[index++]); in LocatorBackgroundProxyFuzzerTest() 40 request->SetPackageName(bundleName); in LocatorBackgroundProxyFuzzerTest() 50 request->SetRequestConfig(*requestConfig); in LocatorBackgroundProxyFuzzerTest() 51 request->SetRequesting(true); in LocatorBackgroundProxyFuzzerTest() 52 request->SetTokenId(data[index++]); in LocatorBackgroundProxyFuzzerTest() 53 request->SetFirstTokenId(data[index++]); in LocatorBackgroundProxyFuzzerTest() 54 request->SetLocationPermState(false); in LocatorBackgroundProxyFuzzerTest() 55 request->SetBackgroundPermState(false); in LocatorBackgroundProxyFuzzerTest() [all …]
|
| /base/notification/distributed_notification_service/services/distributed/test/unittest/ |
| D | distributed_notification_manager_test.cpp | 34 …const std::string &deviceId, const std::string &bundleName, sptr<NotificationRequest> &request) {}; in OnPublish() argument 36 …const std::string &deviceId, const std::string &bundleName, sptr<NotificationRequest> &request) {}; in OnUpdate() argument 63 sptr<NotificationRequest> request = new NotificationRequest(1000); variable 64 request->SetLabel("<label>"); 67 std::string label = request->GetLabel(); 68 int32_t id = request->GetNotificationId(); 70 …EXPECT_EQ(distributedManager_->Publish(bundleName, label, id, request), ERR_ANS_DISTRIBUTED_OPERAT… 80 sptr<NotificationRequest> request = new NotificationRequest(1000); variable 81 request->SetLabel("<label>"); 84 std::string label = request->GetLabel(); [all …]
|
| /base/notification/distributed_notification_service/test/fuzztest/publishcontinuoustasknotification_fuzzer/ |
| D | publishcontinuoustasknotification_fuzzer.cpp | 29 Notification::NotificationRequest request; in DoSomethingInterestingWithMyAPI() local 30 request.SetAlertOneTime(*data % ENABLE); in DoSomethingInterestingWithMyAPI() 35 request.SetBadgeIconStyle(badgeStyle); in DoSomethingInterestingWithMyAPI() 36 request.SetBadgeNumber(style); in DoSomethingInterestingWithMyAPI() 37 request.SetClassification(stringData); in DoSomethingInterestingWithMyAPI() 40 request.SetColor(color); in DoSomethingInterestingWithMyAPI() 41 request.SetColorEnabled(*data % ENABLE); in DoSomethingInterestingWithMyAPI() 50 request.SetContent(content); in DoSomethingInterestingWithMyAPI() 51 request.SetCountdownTimer(*data % ENABLE); in DoSomethingInterestingWithMyAPI() 52 request.SetCreatorBundleName(stringData); in DoSomethingInterestingWithMyAPI() [all …]
|
| /base/hiviewdfx/faultloggerd/services/ |
| D | fault_logger_daemon.cpp | 166 auto request = reinterpret_cast<FaultLoggerdRequest *>(buf); in HandleRequest() local 167 if (!CheckRequestCredential(connectionFd, request)) { in HandleRequest() 171 DFXLOG_DEBUG("%s :: clientType(%d).\n", FAULTLOGGERD_TAG.c_str(), request->clientType); in HandleRequest() 172 switch (request->clientType) { in HandleRequest() 174 HandleDefaultClientRequest(connectionFd, request); in HandleRequest() 177 HandleLogFileDesClientRequest(connectionFd, request); in HandleRequest() 180 HandlePrintTHilogClientRequest(connectionFd, request); in HandleRequest() 183 HandlePermissionRequest(connectionFd, request); in HandleRequest() 186 HandleSdkDumpRequest(connectionFd, request); in HandleRequest() 189 HandlePipeFdClientRequest(connectionFd, request); in HandleRequest() [all …]
|
| /base/notification/distributed_notification_service/services/ans/test/unittest/ |
| D | advanced_notification_live_view_service_test.cpp | 80 sptr<NotificationRequest> request = new (std::nothrow) NotificationRequest(); variable 81 request->SetSlotType(slotType); 82 request->SetNotificationId(1); 85 request->SetContent(content); 88 auto record = advancedNotificationService_->MakeNotificationRecord(request, bundle); 90 { .request = record->request, .bundleOption = bundle}; 113 sptr<NotificationRequest> request = new (std::nothrow) NotificationRequest(); variable 114 request->SetSlotType(slotType); 115 request->SetNotificationId(1); 116 request->SetAutoDeletedTime(NotificationConstant::NO_DELAY_DELETE_TIME); [all …]
|
| /base/request/request/test/unittest/common/napi/requestTest/ |
| D | RequestUploadTest.js | 17 import request from '@ohos.request'; 143 … console.info("SUB_REQUEST_UPLOAD_API_0001 request.NETWORK_MOBILE: " + request.NETWORK_MOBILE); 144 expect(request.NETWORK_MOBILE).assertEqual(1); 145 console.info("SUB_REQUEST_UPLOAD_API_0001 request.NETWORK_WIFI: " + request.NETWORK_WIFI); 146 expect(request.NETWORK_WIFI).assertEqual(65536); 147 …console.info("SUB_REQUEST_UPLOAD_API_0001 request.ERROR_CANNOT_RESUME: " + request.ERROR_CANNOT_RE… 148 expect(request.ERROR_CANNOT_RESUME).assertEqual(0); 149 …console.info("SUB_REQUEST_UPLOAD_API_0001 request.ERROR_DEVICE_NOT_FOUND: " + request.ERROR_DEVICE… 150 expect(request.ERROR_DEVICE_NOT_FOUND).assertEqual(1); 170 …console.info("SUB_REQUEST_UPLOAD_API_0002 request.ERROR_FILE_ALREADY_EXISTS: " + request.ERROR_FIL… [all …]
|
| /base/location/test/location_locator/source/ |
| D | request_manager_test.cpp | 86 void RequestManagerTest::FillRequestField(std::shared_ptr<Request>& request) in FillRequestField() argument 88 request->SetUid(SYSTEM_UID); in FillRequestField() 89 request->SetPid(0); in FillRequestField() 90 request->SetTokenId(0); in FillRequestField() 91 request->SetFirstTokenId(0); in FillRequestField() 92 request->SetPackageName("pkg.name"); in FillRequestField() 95 request->SetRequestConfig(*requestConfig); in FillRequestField() 99 request->SetLocatorCallBack(callback); in FillRequestField() 100 request->SetRequesting(false); in FillRequestField() 102 request->SetLastLocation(location); in FillRequestField() [all …]
|