Home
last modified time | relevance | path

Searched refs:capsCnt (Results 1 – 12 of 12) sorted by relevance

/base/startup/init/services/init/
Dinit_capability.c94 int capsCnt = 0; in InitServiceCaps() local
95 cJSON *filedJ = GetArrayItem(curArrItem, &capsCnt, "caps"); in InitServiceCaps()
99 INIT_ERROR_CHECK(capsCnt <= MAX_CAPS_CNT_FOR_ONE_SERVICE, return SERVICE_FAILURE, in InitServiceCaps()
100 "service=%s, too many caps[cnt %d] for one service", service->name, capsCnt); in InitServiceCaps()
101 service->servPerm.capsCnt = 0; in InitServiceCaps()
106 service->servPerm.caps = (unsigned int *)calloc(1, sizeof(unsigned int) * capsCnt); in InitServiceCaps()
110 for (int i = 0; i < capsCnt; ++i) { // number form in InitServiceCaps()
129 service->servPerm.caps[service->servPerm.capsCnt] = (unsigned int)caps; in InitServiceCaps()
130 service->servPerm.capsCnt++; in InitServiceCaps()
Dinit_common_service.c179 for (unsigned int i = 0; i < service->servPerm.capsCnt; ++i) { in SetPerms()
195 for (unsigned int i = 0; i < service->servPerm.capsCnt; ++i) { in SetPerms()
Dinit_service_manager.c147 service->servPerm.capsCnt = 0; in ReleaseService()
/base/startup/appspawn/lite/
Dappspawn_message.c59 targetSt->capsCnt = 0; in FreeMessageSt()
106 msgSt->capsCnt = 0; in GetCaps()
115 int capsCnt = cJSON_GetArraySize(capItem); in GetCaps() local
116 if (capsCnt <= 0) { in GetCaps()
120 if (capsCnt > MAX_CAPABILITY_COUNT) { in GetCaps()
122 capsCnt, MAX_CAPABILITY_COUNT); in GetCaps()
126 msgSt->caps = (unsigned int *)malloc(sizeof(unsigned int) * capsCnt); in GetCaps()
128 APPSPAWN_LOGE("[appspawn] GetCaps, malloc failed! capsCnt[cnt %d].", capsCnt); in GetCaps()
132 for (int i = 0; i < capsCnt; ++i) { in GetCaps()
150 msgSt->capsCnt = capsCnt; in GetCaps()
Dappspawn_process.c56 static int SetCapability(unsigned int capsCnt, const unsigned int *caps) in SetCapability() argument
64 for (unsigned int i = 0; i < capsCnt; ++i) { in SetCapability()
74 for (unsigned int i = 0; i < capsCnt; ++i) { in SetCapability()
134 APPSPAWN_LOGE("SetCapabilities appProperty->message.capsCnt %d", appProperty->message.capsCnt); in SetCapabilities()
155 if (SetCapability(appProperty->message.capsCnt, appProperty->message.caps) != 0) { in SetCapabilities()
160 APPSPAWN_LOGE("SetCapabilities appProperty->message.capsCnt %d", appProperty->message.capsCnt); in SetCapabilities()
Dappspawn_message.h35 unsigned int capsCnt; member
Dappspawn_service.c142 client.message.uID, client.message.gID, client.message.capsCnt); in Invoke()
/base/startup/appspawn/test/unittest/app_spawn_lite_test/
Dapp_spawn_lite_test.cpp215 EXPECT_EQ(msgSt.capsCnt, 0);
229 msgSt.capsCnt = MALLOC_TEST_LENGTH;
231 EXPECT_EQ(msgSt.capsCnt, 0);
264 msgSt.capsCnt = MALLOC_TEST_LENGTH;
272 EXPECT_EQ(msgSt.capsCnt, 0);
370 EXPECT_EQ(caps.size(), msgSt.capsCnt);
/base/startup/init/services/init/standard/
Dinit_control_fd_service.c111 printf("\tservice perms capability %u \n", service->servPerm.capsCnt); in DumpOneService()
112 for (int i = 0; i < (int)service->servPerm.capsCnt; i++) { in DumpOneService()
/base/startup/init/services/init/include/
Dinit_service.h113 unsigned int capsCnt; member
/base/startup/init/test/unittest/lite/
Dcmd_func_test.cpp646 int capsCnt = cJSON_GetArraySize(filedJ); in CheckService() local
647 EXPECT_TRUE(capsCnt <= MAX_CAPS_CNT_FOR_ONE_SERVICE); in CheckService()
648 for (int i = 0; i < capsCnt; ++i) { in CheckService()
/base/startup/init/test/unittest/init/
Dservice_unittest.cpp373 service->servPerm.capsCnt = 1;