/ohos5.0/base/startup/init/test/moduletest/ |
H A D | service_control_test.cpp | 45 std::string serviceName = "media_service"; variable 46 auto status = GetServiceStatus(serviceName); 63 status = GetServiceStatus(serviceName); 80 std::string serviceName = "media_service"; variable 96 status = GetServiceStatus(serviceName); 114 std::string serviceName = "media_service"; variable 134 newStatus = GetServiceStatus(serviceName); 144 std::string serviceName = "media_service"; variable 164 newStatus = GetServiceStatus(serviceName); 241 status = GetServiceStatus(serviceName); [all …]
|
H A D | service_watcher_moduleTest.cpp | 46 string serviceName = "test.Service"; variable 47 int ret = ServiceWatchForStatus(serviceName.c_str(), ServiceStatusChange); 49 auto status = GetServiceStatus(serviceName); 57 string serviceName = "media_service"; variable 58 auto status = GetServiceStatus(serviceName); 60 int ret = ServiceControl(serviceName.c_str(), STOP); 66 int ret = ServiceWatchForStatus(serviceName.c_str(), ServiceStatusChange); 68 status = GetServiceStatus(serviceName); 76 const std::string serviceName = "deviceinfoservice"; variable 78 int ret = ServiceWatchForStatus(serviceName.c_str(), ServiceStatusChange); [all …]
|
/ohos5.0/base/startup/init/interfaces/innerkits/service_control/ |
H A D | service_control.c | 72 static int StopProcess(const char *serviceName) in StopProcess() argument 75 return SystemSetParameter("ohos.ctl.stop", serviceName); in StopProcess() 82 "%s.%s", STARTUP_SERVICE_CTL, serviceName) == -1) { in GetCurrentServiceStatus() 95 if (GetCurrentServiceStatus(serviceName, &status) != 0) { in RestartProcess() 101 if (StopProcess(serviceName) != 0) { in RestartProcess() 131 ret = StopProcess(serviceName); in ServiceControlWithExtra() 144 int ServiceControl(const char *serviceName, int action) in ServiceControl() argument 154 STARTUP_SERVICE_CTL, serviceName) == -1) { in GetProcessInfo() 176 int ServiceSetReady(const char *serviceName) in ServiceSetReady() argument 191 return ServiceControl(serviceName, START); in StartServiceByTimer() [all …]
|
/ohos5.0/base/security/selinux_adapter/interfaces/policycoreutils/src/ |
H A D | service_checker.cpp | 72 if (callingSid == nullptr || serviceName == nullptr) { in HdfGetServiceCheck() 80 if (callingSid == nullptr || serviceName == nullptr) { in HdfAddServiceCheck() 146 contextBuff.serviceName = name; in DecodeString() 157 static int CheckServiceNameValid(const std::string &serviceName) in CheckServiceNameValid() argument 159 if (serviceName.empty() || serviceName[0] == '.') { in CheckServiceNameValid() 206 if (CheckServiceNameValid(serviceName) != 0) { in GetServiceContext() 219 auto iter = g_serviceMap.find(serviceName); in GetServiceContext() 254 ret = GetServiceContext(serviceName, destContext); in CheckPerm() 265 msg.name = serviceName.c_str(); in CheckPerm() 282 return CheckPerm(callingSid, serviceName, "get"); in GetServiceCheck() [all …]
|
/ohos5.0/base/security/selinux_adapter/interfaces/tools/service_check/ |
H A D | test.cpp | 38 std::string serviceName; member 78 input.serviceName = optarg; in SetOptions() 119 static void TestAddService(bool isHdf, const std::string &serviceName) in TestAddService() argument 125 if (!serviceName.empty()) { in TestAddService() 139 static void TestGetService(bool isHdf, const std::string &serviceName) in TestGetService() argument 145 if (!serviceName.empty()) { in TestGetService() 159 static void TestGetRemoteService(bool isHdf, const std::string &serviceName) in TestGetRemoteService() argument 165 if (!serviceName.empty()) { in TestGetRemoteService() 191 TestAddService(testCmd.isHdf, testCmd.serviceName); in Test() 195 TestGetService(testCmd.isHdf, testCmd.serviceName); in Test() [all …]
|
/ohos5.0/base/startup/init/interfaces/innerkits/fd_holder/ |
H A D | fd_holder.c | 49 if (buffer == NULL || size == 0 || serviceName == 0) { in BuildSendData() 74 static int ServiceSendFds(const char *serviceName, int *fds, int fdCount, bool doPoll) in ServiceSendFds() argument 86 int ret = BuildSendData(sendBuffer, sizeof(sendBuffer), serviceName, true, doPoll); in ServiceSendFds() 125 int ServiceSaveFd(const char *serviceName, int *fds, int fdCount) in ServiceSaveFd() argument 128 if (serviceName == NULL || fds == NULL || in ServiceSaveFd() 133 return ServiceSendFds(serviceName, fds, fdCount, false); in ServiceSaveFd() 136 int ServiceSaveFdWithPoll(const char *serviceName, int *fds, int fdCount) in ServiceSaveFdWithPoll() argument 139 if (serviceName == NULL || fds == NULL || in ServiceSaveFdWithPoll() 144 return ServiceSendFds(serviceName, fds, fdCount, true); in ServiceSaveFdWithPoll() 147 int *ServiceGetFd(const char *serviceName, size_t *outfdCount) in ServiceGetFd() argument [all …]
|
/ohos5.0/foundation/deviceprofile/device_info_manager/services/core/src/utils/ |
H A D | profile_control_utils.cpp | 244 const std::string& serviceName, ServiceProfile& serviceProfile) in GetServiceProfile() argument 256 ProfileUtils::GetAnonyString(deviceId).c_str(), serviceName.c_str()); in GetServiceProfile() 296 if (ProfileUtils::IsNeedAddOhSuffix(serviceName, true)) { in GetCharacteristicProfile() 340 std::string serviceName; in RefreshLocalSwitchProfile() local 342 if (res != DP_SUCCESS || serviceName.empty()) { in RefreshLocalSwitchProfile() 389 charProfile.SetServiceName(serviceName); in GetSwitchCharacteristicProfile() 402 const std::string& serviceName) in DeleteServiceProfile() argument 410 !ProfileUtils::IsKeyValid(serviceName)) { in DeleteServiceProfile() 415 ProfileUtils::GetAnonyString(deviceId).c_str(), serviceName.c_str()); in DeleteServiceProfile() 422 ProfileCache::GetInstance().DeleteServiceProfile(deviceId, serviceName); in DeleteServiceProfile() [all …]
|
/ohos5.0/drivers/hdf_core/framework/sample/platform/uart/dispatch/ |
H A D | uart_if.c | 20 char *serviceName = NULL; in UartOpen() local 28 serviceName = (char *)OsalMemCalloc(sizeof(char) * (MAX_DEV_NAME_SIZE + 1)); in UartOpen() 29 if (serviceName == NULL) { in UartOpen() 34 …ret = snprintf_s(serviceName, MAX_DEV_NAME_SIZE + 1, MAX_DEV_NAME_SIZE, UART_DEV_SERVICE_NAME_PREF… in UartOpen() 38 OsalMemFree(serviceName); in UartOpen() 42 struct HdfIoService *service = HdfIoServiceBind(serviceName); in UartOpen() 44 HDF_LOGE("Failed to get service %s", serviceName); in UartOpen() 46 OsalMemFree(serviceName); in UartOpen() 49 OsalMemFree(serviceName); in UartOpen()
|
/ohos5.0/docs/zh-cn/device-dev/subsystems/ |
H A D | subsys-boot-init-service.md | 10 一般命名为:serviceName.cfg(serviceName 为服务进程名,例如:appspawn.cfg) 74 "name" : "serviceName", 75 "path" : ["/system/bin/serviceName"] 93 "name" : "serviceName", 94 "path" : ["/system/bin/serviceName"] 124 "name" : "serviceName", 125 "path" : ["/system/bin/serviceName"] 145 服务进程代码编写完成后创建serviceName.cfg(serviceName 为服务进程名),并根据服务特性配置文件内容。 326 | int ServiceSetReady(const char *serviceName) | 设置服务准备 | 返回值:成功返回0,失败返回-1 <br> 参数:<br> serviceName… 327 …t StartServiceByTimer(const char *serviceName, uint64_t timeout) | 定时启动服务 | 返回值:成功返回0,失败返回-1 <br> … [all …]
|
/ohos5.0/foundation/systemabilitymgr/samgr_lite/samgr/source/ |
H A D | samgr_lite.c | 43 static IUnknown *GetDefaultFeatureApi(const char *serviceName); 284 ServiceImpl *serviceImpl = GetService(serviceName); in RegisterFeature() 302 ServiceImpl *serviceImpl = GetService(serviceName); in UnregisterFeature() 315 ServiceImpl *serviceImpl = GetService(serviceName); in RegisterFeatureApi() 337 ServiceImpl *serviceImpl = GetService(serviceName); in UnregisterFeatureApi() 353 return RegisterFeatureApi(serviceName, NULL, publicApi); in RegisterDefaultFeatureApi() 358 return UnregisterFeatureApi(serviceName, NULL); in UnregisterDefaultFeatureApi() 361 static IUnknown *GetDefaultFeatureApi(const char *serviceName) in GetDefaultFeatureApi() argument 363 return GetFeatureApi(serviceName, NULL); in GetDefaultFeatureApi() 392 ServiceImpl *serviceImpl = GetService(serviceName); in GetFeatureApi() [all …]
|
/ohos5.0/base/hiviewdfx/hiview/test/moduletest/common/ |
H A D | hiview_plugin_platform_module_test.cpp | 46 int GetServicePid(const std::string& serviceName) in GetServicePid() argument 48 std::string cmd = "pidof " + serviceName; in GetServicePid() 52 printf("the pid of service(%s) is %s \n", serviceName.c_str(), pidStr.c_str()); in GetServicePid() 56 void WaitForServiceReady(const std::string& serviceName) in WaitForServiceReady() argument 58 int pid = GetServicePid(serviceName); in WaitForServiceReady() 60 std::string cmd = "start " + serviceName; in WaitForServiceReady() 64 pid = GetServicePid(serviceName); in WaitForServiceReady()
|
/ohos5.0/drivers/hdf_core/framework/test/unittest/manager/ |
H A D | sample_driver_test.c | 41 static struct SampleTestDevice *GetRegistedDevice(const char *serviceName) in GetRegistedDevice() argument 69 const char *serviceName = NULL; in SampleDriverRegisterDevice() local 83 serviceName = HdfSbufReadString(data); in SampleDriverRegisterDevice() 84 if (serviceName == NULL) { in SampleDriverRegisterDevice() 104 HDF_LOGE("failed to publish service for %s", serviceName); in SampleDriverRegisterDevice() 116 HDF_LOGI("register device %s:%s success", moduleName, serviceName); in SampleDriverRegisterDevice() 123 const char *serviceName = NULL; in SampleDriverUnregisterDevice() local 133 serviceName = HdfSbufReadString(data); in SampleDriverUnregisterDevice() 134 if (serviceName == NULL) { in SampleDriverUnregisterDevice() 137 dev = GetRegistedDevice(serviceName); in SampleDriverUnregisterDevice() [all …]
|
/ohos5.0/base/startup/init/interfaces/innerkits/include/ |
H A D | service_control.h | 49 int ServiceControlWithExtra(const char *serviceName, int action, const char *extArgv[], int extArgc… 50 int ServiceControl(const char *serviceName, int action); 51 int ServiceWaitForStatus(const char *serviceName, ServiceStatus status, int waitTimeout); 52 int ServiceSetReady(const char *serviceName); 53 int StartServiceByTimer(const char *serviceName, uint64_t timeout); 54 int StopServiceTimer(const char *serviceName);
|
/ohos5.0/foundation/communication/ipc/services/dbinder/test/unittest/ |
H A D | dbinder_service_unittest.cpp | 542 std::u16string serviceName; variable 559 std::u16string serviceName; variable 822 std::u16string serviceName; variable 837 std::u16string serviceName; variable 924 std::string serviceName("test1"); variable 1049 std::u16string serviceName; variable 1052 serviceName = u"testServer"; 1068 std::u16string serviceName; variable 1071 serviceName = u"testServer"; 1120 message->serviceName[0] = 't'; [all …]
|
/ohos5.0/foundation/communication/ipc/services/dbinder/c/src/ |
H A D | dbinder_service.c | 40 char *serviceName; member 115 return node->serviceName; in GetRegisterService() 171 if (serviceName == NULL || deviceID == NULL) { in FindOrNewDBinderStub() 478 char *serviceName = GetRegisterService(binderObject); in FindOrNewProxy() local 692 if (strcpy_s(session->serviceName, SERVICENAME_LENGTH + 1, replyMessage->serviceName) != EOK) { in MakeSessionByReplyMessage() 767 const char *serviceName = (const char *)name; in RegisterRemoteProxy() local 784 binderObject->serviceName = (char *)malloc(len + 1); in RegisterRemoteProxy() 785 if (binderObject->serviceName == NULL) { in RegisterRemoteProxy() 791 if (strcpy_s(binderObject->serviceName, len + 1, serviceName) != EOK) { in RegisterRemoteProxy() 793 free(binderObject->serviceName); in RegisterRemoteProxy() [all …]
|
/ohos5.0/drivers/hdf_core/framework/model/storage/src/mmc/ |
H A D | mmc_if.c | 27 char *serviceName = NULL; in MmcCntlrObjGetByNumber() local 32 serviceName = OsalMemCalloc(MMC_SVC_NAME_LEN + 1); in MmcCntlrObjGetByNumber() 33 if (serviceName == NULL) { in MmcCntlrObjGetByNumber() 37 if (snprintf_s(serviceName, MMC_SVC_NAME_LEN + 1, MMC_SVC_NAME_LEN, in MmcCntlrObjGetByNumber() 40 OsalMemFree(serviceName); in MmcCntlrObjGetByNumber() 45 object = (void *)HdfIoServiceBind(serviceName); in MmcCntlrObjGetByNumber() 55 OsalMemFree(serviceName); in MmcCntlrObjGetByNumber()
|
/ohos5.0/base/startup/init/services/begetctl/ |
H A D | sandbox.cpp | 169 static void RunCmd(const std::string &serviceName, const std::string &namespaceName, const std::str… in RunCmd() argument 172 …bool isNamespaceOnly = !namespaceName.empty() && processName.empty() && serviceName.empty() && pid… in RunCmd() 174 …bool isProcessOnly = namespaceName.empty() && !processName.empty() && serviceName.empty() && pid.e… in RunCmd() 175 …bool isServiceOnly = namespaceName.empty() && processName.empty() && !serviceName.empty() && pid.e… in RunCmd() 176 …bool isPidOnly = namespaceName.empty() && processName.empty() && serviceName.empty() && !pid.empty… in RunCmd() 188 std::cout << "enter sandbox service name " << serviceName << std::endl; in RunCmd() 189 CmdClientInit(INIT_CONTROL_FD_SOCKET_PATH, ACTION_SANDBOX, serviceName.c_str(), nullptr); in RunCmd() 201 std::string serviceName {}; in main_cmd() local 210 serviceName = optarg; in main_cmd() 223 serviceName = optarg; in main_cmd() [all …]
|
/ohos5.0/drivers/hdf_core/adapter/uhdf2/hdi/src/ |
H A D | hdi_support.cpp | 70 static std::string ParseLibName(const std::string &interfaceName, const std::string &serviceName, in ParseLibName() argument 74 …libName << "lib" << interfaceName << "_" << serviceName << "_" << versionMajor << "." << versionMi… in ParseLibName() 98 const std::string &desc, std::string &interface, std::string &libName, const char *serviceName) in ParseInterface() argument 118 libName = ParseLibName(TransFileName(interface), serviceName, versionMajor, versionMinor); in ParseInterface() 131 void *LoadHdiImpl(const char *desc, const char *serviceName) in LoadHdiImpl() argument 133 … if (desc == nullptr || serviceName == nullptr || strlen(desc) == 0 || strlen(serviceName) == 0) { in LoadHdiImpl() 140 if (ParseInterface(desc, interfaceName, libName, serviceName) != HDF_SUCCESS) { in LoadHdiImpl() 181 void UnloadHdiImpl(const char *desc, const char *serviceName, void *impl) in UnloadHdiImpl() argument 189 if (ParseInterface(desc, interfaceName, libName, serviceName) != HDF_SUCCESS) { in UnloadHdiImpl()
|
H A D | devmgr_client.c | 157 static int32_t DevmgrProcessLoad(struct HDIDeviceManager *iDevMgr, const char *serviceName, int32_t… in DevmgrProcessLoad() argument 170 if (!HdfSbufWriteString(data, serviceName)) { in DevmgrProcessLoad() 176 … HDF_LOGE("failed to process load/unload device %{public}s code:%{public}d", serviceName, id); in DevmgrProcessLoad() 184 int32_t DevmgrLoadDevice(struct HDIDeviceManager *iDevMgr, const char *serviceName) in DevmgrLoadDevice() argument 186 if (iDevMgr == NULL || serviceName == NULL) { in DevmgrLoadDevice() 190 HDF_LOGI("load device: %{public}s", serviceName); in DevmgrLoadDevice() 192 return DevmgrProcessLoad(iDevMgr, serviceName, DEVMGR_SERVICE_LOAD_DEVICE); in DevmgrLoadDevice() 195 int32_t DevmgrUnloadDevice(struct HDIDeviceManager *iDevMgr, const char *serviceName) in DevmgrUnloadDevice() argument 197 if (iDevMgr == NULL || serviceName == NULL) { in DevmgrUnloadDevice() 201 HDF_LOGI("unload device: %{public}s", serviceName); in DevmgrUnloadDevice() [all …]
|
/ohos5.0/foundation/multimedia/av_session/services/session/server/ |
H A D | avsession_service_ext.cpp | 21 void AVSessionService::SuperLauncher(std::string deviceId, std::string serviceName, in SuperLauncher() argument 25 serviceName.c_str(), state.c_str()); in SuperLauncher() 27 if (state == "IDLE" && serviceName == "SuperLauncher") { in SuperLauncher() 28 MigrateAVSessionManager::GetInstance().ReleaseLocalSessionStub(serviceName); in SuperLauncher() 32 } else if (state == "CONNECTING" && serviceName == "SuperLauncher") { in SuperLauncher() 37 … MigrateAVSessionManager::GetInstance().CreateLocalSessionStub(serviceName, migrateAVSession_); in SuperLauncher() 41 if ((serviceName == "HuaweiCast" || serviceName == "HuaweiCast-Dual") && in SuperLauncher() 43 castServiceNameMapState_[serviceName] = state; in SuperLauncher()
|
/ohos5.0/drivers/hdf_core/framework/support/platform/src/watchdog/ |
H A D | watchdog_if.c | 24 char *serviceName = NULL; in WatchdogGetById() local 31 serviceName = OsalMemCalloc(WATCHDOG_NAME_LEN + 1); in WatchdogGetById() 32 if (serviceName == NULL) { in WatchdogGetById() 36 if (snprintf_s(serviceName, WATCHDOG_NAME_LEN + 1, WATCHDOG_NAME_LEN, in WatchdogGetById() 39 OsalMemFree(serviceName); in WatchdogGetById() 42 obj = (struct WatchdogCntlr *)DevSvcManagerClntGetService(serviceName); in WatchdogGetById() 46 OsalMemFree(serviceName); in WatchdogGetById()
|
/ohos5.0/drivers/peripheral/display/hdi_service/gralloc/client/ |
H A D | allocator_proxy.cpp | 31 sptr<IDisplayAllocator> IDisplayAllocator::Get(const char *serviceName) in Get() argument 54 sptr<IRemoteObject> remote = servMgr->GetService(serviceName); in Get() 57 …HDF_LOGE("%{public}s: wait service:%{public}s timeout cnt:%{public}u", __func__, serviceName, cnt); in Get() 61 remote = servMgr->GetService(serviceName); in Get() 63 … HDF_LOGI("%{public}s: get service:%{public}s cnt:%{public}u", __func__, serviceName, cnt); in Get() 66 … HDF_LOGI("%{public}s: get service:%{public}s success cnt:%{public}u", __func__, serviceName, cnt); in Get() 73 HDF_LOGE("%{public}s: GetService %{public}s ok", __func__, serviceName); in Get()
|
/ohos5.0/foundation/communication/ipc/ipc/native/test/unittest/common/ |
H A D | dbinder_session_object_unittest.cpp | 64 std::string serviceName = "testserviceName"; variable 66 DBinderSessionObject object(serviceName, serverDeviceId, STUB_INDEX, nullptr, TOKEN_ID); 80 std::string serviceName = "testserviceName"; variable 82 DBinderSessionObject object(serviceName, serverDeviceId, STUB_INDEX, nullptr, TOKEN_ID); 96 std::string serviceName = "testserviceName"; variable 99 DBinderSessionObject object(serviceName, serverDeviceId, STUB_INDEX, nullptr, TOKEN_ID); 112 std::string serviceName = "testserviceName"; variable 114 DBinderSessionObject object(serviceName, serverDeviceId, STUB_INDEX, nullptr, TOKEN_ID);
|
/ohos5.0/base/startup/init/services/modules/init_hook/ |
H A D | init_hook.c | 43 ServiceExtData *AddServiceExtData(const char *serviceName, uint32_t id, void *data, uint32_t dataLe… in AddServiceExtData() argument 45 Service *service = GetServiceByName(serviceName); in AddServiceExtData() 46 PLUGIN_CHECK(service != NULL, return NULL, "Can not find service for %s", serviceName); in AddServiceExtData() 69 void DelServiceExtData(const char *serviceName, uint32_t id) in DelServiceExtData() argument 71 Service *service = GetServiceByName(serviceName); in DelServiceExtData() 72 PLUGIN_CHECK(service != NULL, return, "Can not find service for %s", serviceName); in DelServiceExtData() 81 ServiceExtData *GetServiceExtData(const char *serviceName, uint32_t id) in GetServiceExtData() argument 83 Service *service = GetServiceByName(serviceName); in GetServiceExtData() 84 PLUGIN_CHECK (service != NULL, return NULL, "Can not find service for %s", serviceName); in GetServiceExtData()
|
/ohos5.0/foundation/deviceprofile/device_info_manager/services/core/test/unittest/ |
H A D | device_profile_manager_test.cpp | 812 string serviceName = "serviceName5"; variable 832 string serviceName = "serviceName"; variable 838 serviceName = ""; 895 string serviceName = "serviceName5"; variable 918 string serviceName = "serviceName"; variable 926 serviceName = "serviceName"; 989 string serviceName = "serviceName6"; variable 1003 string serviceName = "serviceName"; variable 1008 serviceName = ""; 1081 string serviceName = "serviceName"; variable [all …]
|