Lines Matching defs:handle
43 OHExtDataHandle *handle = static_cast<OHExtDataHandle *>(malloc(handleSize));
44 if (handle == nullptr) {
48 auto ret = memset_s(handle, handleSize, 0, handleSize);
53 handle->fd = -1;
54 handle->reserveInts = reserveInts;
56 handle->reserve[i] = -1;
58 return handle;
61 static void FreeOHExtDataHandle(OHExtDataHandle *handle)
63 if (handle == nullptr) {
64 BLOGW("FreeOHExtDataHandle with nullptr handle");
67 if (handle->fd >= 0) {
68 close(handle->fd);
69 handle->fd = -1;
71 free(handle);
1450 OHExtDataHandle *handle = AllocOHExtDataHandle(reserveInts);
1451 ASSERT_EQ(OH_NativeWindow_NativeWindowSetTunnelHandle(nativeWindow, handle), NATIVE_ERROR_OK);
1452 FreeOHExtDataHandle(handle);
1465 OHExtDataHandle *handle = AllocOHExtDataHandle(reserveInts);
1468 ASSERT_EQ(OH_NativeWindow_NativeWindowSetTunnelHandle(nativeWindow, handle), NATIVE_ERROR_OK);
1469 ASSERT_EQ(OH_NativeWindow_NativeWindowSetTunnelHandle(nativeWindow, handle), OHOS::GSERROR_NO_ENTRY);
1470 FreeOHExtDataHandle(handle);