Home
last modified time | relevance | path

Searched refs:handle (Results 1 – 25 of 38) sorted by relevance

12

/system/core/adb/
Dusb_windows.c78 int register_new_device(usb_handle* handle);
81 int recognized_device(usb_handle* handle);
101 int usb_write(usb_handle* handle, const void* data, int len);
104 int usb_read(usb_handle *handle, void* data, int len);
107 void usb_cleanup_handle(usb_handle* handle);
110 void usb_kick(usb_handle* handle);
113 int usb_close(usb_handle* handle);
116 const char *usb_name(usb_handle* handle);
147 int register_new_device(usb_handle* handle) { in register_new_device() argument
148 if (NULL == handle) in register_new_device()
[all …]
Dusb_osx.c258 usb_handle* handle = CheckInterface((IOUSBInterfaceInterface**)iface, in AndroidInterfaceAdded() local
260 if (handle == NULL) { in AndroidInterfaceAdded()
267 register_usb_transport(handle, (serial[0] ? serial : NULL), devpath, 1); in AndroidInterfaceAdded()
276 handle, in AndroidInterfaceAdded()
277 &handle->usbNotification); in AndroidInterfaceAdded()
288 usb_handle *handle = (usb_handle *)refCon; in AndroidInterfaceNotify() local
291 if (!handle) { in AndroidInterfaceNotify()
296 IOObjectRelease(handle->usbNotification); in AndroidInterfaceNotify()
297 usb_kick(handle); in AndroidInterfaceNotify()
306 usb_handle* handle = NULL; in CheckInterface() local
[all …]
/system/media/audio_utils/
Dtinysndfile.c70 SNDFILE *handle = (SNDFILE *) malloc(sizeof(SNDFILE)); in sf_open_read() local
71 handle->mode = SFM_READ; in sf_open_read()
72 handle->temp = NULL; in sf_open_read()
73 handle->stream = stream; in sf_open_read()
74 handle->info.format = SF_FORMAT_WAV; in sf_open_read()
172 handle->bytesPerFrame = bytesPerFrame; in sf_open_read()
173 handle->info.samplerate = samplerate; in sf_open_read()
174 handle->info.channels = channels; in sf_open_read()
177 handle->info.format |= SF_FORMAT_PCM_U8; in sf_open_read()
180 handle->info.format |= SF_FORMAT_PCM_16; in sf_open_read()
[all …]
/system/core/fastboot/
Dusb_windows.c71 int recognized_device(usb_handle* handle, ifc_match_func callback);
77 int usb_write(usb_handle* handle, const void* data, int len);
80 int usb_read(usb_handle *handle, void* data, int len);
83 void usb_cleanup_handle(usb_handle* handle);
86 void usb_kick(usb_handle* handle);
89 int usb_close(usb_handle* handle);
155 int usb_write(usb_handle* handle, const void* data, int len) { in usb_write() argument
162 if (NULL != handle) { in usb_write()
166 ret = AdbWriteEndpointSync(handle->adb_write_pipe, in usb_write()
176 usb_kick(handle); in usb_write()
[all …]
Dusb_osx.c67 static int try_interfaces(IOUSBDeviceInterface182 **dev, usb_handle *handle) { in try_interfaces() argument
171 if ((*interface)->GetInterfaceClass(interface, &handle->info.ifc_class) != 0 || in try_interfaces()
172 (*interface)->GetInterfaceSubClass(interface, &handle->info.ifc_subclass) != 0 || in try_interfaces()
173 (*interface)->GetInterfaceProtocol(interface, &handle->info.ifc_protocol) != 0) in try_interfaces()
179 handle->info.has_bulk_in = 0; in try_interfaces()
180 handle->info.has_bulk_out = 0; in try_interfaces()
201 handle->info.has_bulk_in = 1; in try_interfaces()
202 handle->bulkIn = endpoint; in try_interfaces()
204 handle->info.has_bulk_out = 1; in try_interfaces()
205 handle->bulkOut = endpoint; in try_interfaces()
[all …]
/system/core/fastbootd/
Dtransport_socket.c57 struct transport_handle handle; member
64 struct socket_handle * handle = container_of(thandle, struct socket_handle, handle); in socket_close() local
65 close(handle->fd); in socket_close()
70 struct socket_handle *handle = calloc(sizeof(struct socket_handle), 1); in socket_connect() local
75 handle->fd = accept(socket_transport->fd, &addr, &alen); in socket_connect()
77 if (handle->fd < 0) { in socket_connect()
83 return &handle->handle; in socket_connect()
89 struct socket_handle *handle = container_of(thandle, struct socket_handle, handle); in socket_write() local
91 D(DEBUG, "about to write (fd=%d, len=%zu)", handle->fd, len); in socket_write()
92 ret = bulk_write(handle->fd, data, len); in socket_write()
[all …]
Dprotocol.h47 void (*handle)(struct protocol_handle *handle, const char *arg));
53 void protocol_handle_command(struct protocol_handle *handle, char *buffer);
57 void fastboot_fail(struct protocol_handle *handle, const char *reason);
58 void fastboot_okay(struct protocol_handle *handle, const char *reason);
59 void fastboot_data(struct protocol_handle *handle, size_t len);
Dtransport.h38 ssize_t transport_handle_write(struct transport_handle *handle, char *buffer, size_t len);
39 int transport_handle_download(struct transport_handle *handle, size_t len);
/system/core/libion/
Dion.c61 unsigned int flags, ion_user_handle_t *handle) in ion_alloc() argument
71 if (handle == NULL) in ion_alloc()
77 *handle = data.handle; in ion_alloc()
81 int ion_free(int fd, ion_user_handle_t handle) in ion_free() argument
84 .handle = handle, in ion_free()
89 int ion_map(int fd, ion_user_handle_t handle, size_t length, int prot, in ion_map() argument
94 .handle = handle, in ion_map()
118 int ion_share(int fd, ion_user_handle_t handle, int *share_fd) in ion_share() argument
123 .handle = handle, in ion_share()
142 ion_user_handle_t handle; in ion_alloc_fd() local
[all …]
Dion_test.c41 int _ion_alloc_test(int *fd, ion_user_handle_t *handle) in _ion_alloc_test() argument
49 ret = ion_alloc(*fd, len, align, heap_mask, alloc_flags, handle); in _ion_alloc_test()
59 ion_user_handle_t handle; in ion_alloc_test() local
61 if(_ion_alloc_test(&fd, &handle)) in ion_alloc_test()
64 ret = ion_free(fd, handle); in ion_alloc_test()
66 printf("%s failed: %s %d\n", __func__, strerror(ret), handle); in ion_alloc_test()
77 ion_user_handle_t handle; in ion_map_test() local
80 if(_ion_alloc_test(&fd, &handle)) in ion_map_test()
83 ret = ion_map(fd, handle, len, prot, map_flags, 0, &ptr, &map_fd); in ion_map_test()
95 ret = ion_free(fd, handle); in ion_map_test()
[all …]
/system/core/libziparchive/
Dzip_archive_test.cc44 ZipArchiveHandle* handle) { in OpenArchiveWrapper() argument
46 return OpenArchive(abs_path.c_str(), handle); in OpenArchiveWrapper()
56 ZipArchiveHandle handle; in TEST() local
57 ASSERT_EQ(0, OpenArchiveWrapper(kValidZip, &handle)); in TEST()
59 CloseArchive(handle); in TEST()
63 ZipArchiveHandle handle; in TEST() local
64 ASSERT_NE(0, OpenArchiveWrapper(kMissingZip, &handle)); in TEST()
67 ASSERT_EQ(-1, GetFileDescriptor(handle)); in TEST()
71 ZipArchiveHandle handle; in TEST() local
72 ASSERT_EQ(0, OpenArchiveWrapper(kValidZip, &handle)); in TEST()
[all …]
Dzip_archive.cc688 ZipArchiveHandle* handle) { in OpenArchiveFd() argument
690 *handle = archive; in OpenArchiveFd()
694 int32_t OpenArchive(const char* fileName, ZipArchiveHandle* handle) { in OpenArchive() argument
697 *handle = archive; in OpenArchive()
709 void CloseArchive(ZipArchiveHandle handle) { in CloseArchive() argument
710 ZipArchive* archive = (ZipArchive*) handle; in CloseArchive()
898 int32_t StartIteration(ZipArchiveHandle handle, void** cookie_ptr, const char* prefix) { in StartIteration() argument
899 ZipArchive* archive = (ZipArchive *) handle; in StartIteration()
918 int32_t FindEntry(const ZipArchiveHandle handle, const char* entryName, in FindEntry() argument
920 const ZipArchive* archive = (ZipArchive*) handle; in FindEntry()
[all …]
/system/core/libion/tests/
Dallocate_test.cpp34 ion_user_handle_t handle = 0; in TEST_F() local
35 ASSERT_EQ(0, ion_alloc(m_ionFd, size, 0, heapMask, 0, &handle)); in TEST_F()
36 ASSERT_TRUE(handle != 0); in TEST_F()
37 ASSERT_EQ(0, ion_free(m_ionFd, handle)); in TEST_F()
49 ion_user_handle_t handle = 0; in TEST_F() local
50 ASSERT_EQ(0, ion_alloc(m_ionFd, size, 0, heapMask, ION_FLAG_CACHED, &handle)); in TEST_F()
51 ASSERT_TRUE(handle != 0); in TEST_F()
52 ASSERT_EQ(0, ion_free(m_ionFd, handle)); in TEST_F()
64 ion_user_handle_t handle = 0; in TEST_F() local
65 … ASSERT_EQ(0, ion_alloc(m_ionFd, size, 0, heapMask, ION_FLAG_CACHED_NEEDS_SYNC, &handle)); in TEST_F()
[all …]
Dinvalid_values_test.cpp58 ion_user_handle_t handle; in TEST_F() local
60 int ret = ion_alloc(0, 4096, 0, m_firstHeap, 0, &handle); in TEST_F()
63 EXPECT_EQ(-EBADF, ion_alloc(-1, 4096, 0, m_firstHeap, 0, &handle)); in TEST_F()
65 EXPECT_EQ(-ENODEV, ion_alloc(m_ionFd, 4096, 0, 0, 0, &handle)); in TEST_F()
69 EXPECT_EQ(-EINVAL, ion_alloc(m_ionFd, 0, 0, heapMask, 0, &handle)); in TEST_F()
71 EXPECT_EQ(-EINVAL, ion_alloc(m_ionFd, -1, 0, heapMask, 0, &handle)); in TEST_F()
73 EXPECT_EQ(-EINVAL, ion_alloc(m_ionFd, 4096, -1, heapMask, 0, &handle)); in TEST_F()
160 ion_user_handle_t handle; in TEST_F() local
163 int ret = ion_import(0, m_validShareFd, &handle); in TEST_F()
166 EXPECT_EQ(-EBADF, ion_import(-1, m_validShareFd, &handle)); in TEST_F()
[all …]
Dion_test_fixture.cpp48 ion_user_handle_t handle = 0; in SetUp() local
50 ret = ion_alloc(fd, 4096, 0, i, 0, &handle); in SetUp()
51 if (ret == 0 && handle != 0) { in SetUp()
52 ion_free(fd, handle); in SetUp()
Dmap_test.cpp35 ion_user_handle_t handle = 0; in TEST_F() local
37 ASSERT_EQ(0, ion_alloc(m_ionFd, size, 0, heapMask, 0, &handle)); in TEST_F()
38 ASSERT_TRUE(handle != 0); in TEST_F()
42 …ASSERT_EQ(0, ion_map(m_ionFd, handle, size, PROT_READ | PROT_WRITE, MAP_SHARED, 0, &ptr, &map_fd)); in TEST_F()
48 ASSERT_EQ(0, ion_free(m_ionFd, handle)); in TEST_F()
/system/core/include/ziparchive/
Dzip_archive.h85 int32_t OpenArchive(const char* fileName, ZipArchiveHandle* handle);
103 ZipArchiveHandle *handle);
112 void CloseArchive(ZipArchiveHandle handle);
127 int32_t FindEntry(const ZipArchiveHandle handle, const char* entryName,
143 int32_t StartIteration(ZipArchiveHandle handle, void** cookie_ptr,
162 int32_t ExtractEntryToFile(ZipArchiveHandle handle, ZipEntry* entry, int fd);
172 int32_t ExtractToMemory(ZipArchiveHandle handle, ZipEntry* entry,
175 int GetFileDescriptor(const ZipArchiveHandle handle);
/system/core/libutils/
DNativeHandle.cpp23 native_handle_t* handle, bool ownsHandle) { in create() argument
24 return handle ? new NativeHandle(handle, ownsHandle) : NULL; in create()
27 NativeHandle::NativeHandle(native_handle_t* handle, bool ownsHandle) in NativeHandle() argument
28 : mHandle(handle), mOwnsHandle(ownsHandle) in NativeHandle()
/system/media/audio_utils/include/audio_utils/
Dsndfile.h61 void sf_close(SNDFILE *handle);
64 sf_count_t sf_readf_short(SNDFILE *handle, short *ptr, sf_count_t desired);
65 sf_count_t sf_readf_float(SNDFILE *handle, float *ptr, sf_count_t desired);
66 sf_count_t sf_readf_int(SNDFILE *handle, int *ptr, sf_count_t desired);
69 sf_count_t sf_writef_short(SNDFILE *handle, const short *ptr, sf_count_t desired);
70 sf_count_t sf_writef_float(SNDFILE *handle, const float *ptr, sf_count_t desired);
/system/core/libion/include/ion/
Dion.h34 unsigned int flags, ion_user_handle_t *handle);
38 int ion_free(int fd, ion_user_handle_t handle);
39 int ion_map(int fd, ion_user_handle_t handle, size_t length, int prot,
41 int ion_share(int fd, ion_user_handle_t handle, int *share_fd);
42 int ion_import(int fd, int share_fd, ion_user_handle_t *handle);
/system/core/include/utils/
DNativeHandle.h33 static sp<NativeHandle> create(native_handle_t* handle, bool ownsHandle);
35 const native_handle_t* handle() const { in handle() function
43 NativeHandle(native_handle_t* handle, bool ownsHandle);
/system/core/libion/kernel-headers/linux/
Dion.h51 ion_user_handle_t handle; member
55 ion_user_handle_t handle; member
60 ion_user_handle_t handle; member
/system/core/libion/original-kernel-headers/linux/
Dion.h91 ion_user_handle_t handle; member
105 ion_user_handle_t handle; member
114 ion_user_handle_t handle; member
/system/core/libnativebridge/
Dnative_bridge.cc177 void* handle = dlopen(nb_library_filename, RTLD_LAZY); in LoadNativeBridge() local
178 if (handle != nullptr) { in LoadNativeBridge()
179 callbacks = reinterpret_cast<NativeBridgeCallbacks*>(dlsym(handle, in LoadNativeBridge()
184 native_bridge_handle = handle; in LoadNativeBridge()
187 dlclose(handle); in LoadNativeBridge()
191 dlclose(handle); in LoadNativeBridge()
473 void* NativeBridgeGetTrampoline(void* handle, const char* name, const char* shorty, in NativeBridgeGetTrampoline() argument
476 return callbacks->getTrampoline(handle, name, shorty, len); in NativeBridgeGetTrampoline()
/system/core/fastbootd/commands/
Dvirtual_partitions.c37 int try_handle_virtual_partition(struct protocol_handle *handle, const char *arg) in try_handle_virtual_partition() argument
43 current->handler(handle, arg); in try_handle_virtual_partition()

12