/system/core/adb/ |
H A D | usb_windows.c | 70 /// Checks if there is opened usb handle in handle_list for this device. 73 /// Checks if there is opened usb handle in handle_list for this device. 77 /// Registers opened usb handle (adds it to handle_list). 78 int register_new_device(usb_handle* handle); 81 int recognized_device(usb_handle* handle); 100 /// Writes data to the opened usb handle 101 int usb_write(usb_handle* handle, const void* data, int len); 103 /// Reads data using the opened usb handle 104 int usb_read(usb_handle *handle, void* data, int len); 106 /// Cleans up opened usb handle 147 register_new_device(usb_handle* handle) argument 259 usb_write(usb_handle* handle, const void* data, int len) argument 304 usb_read(usb_handle *handle, void* data, int len) argument 345 usb_cleanup_handle(usb_handle* handle) argument 363 usb_kick(usb_handle* handle) argument 376 usb_close(usb_handle* handle) argument 400 usb_name(usb_handle* handle) argument 410 recognized_device(usb_handle* handle) argument 453 usb_handle* handle = NULL; local [all...] |
H A D | usb_osx.c | 258 usb_handle* handle = CheckInterface((IOUSBInterfaceInterface**)iface, local 260 if (handle == NULL) { 267 register_usb_transport(handle, (serial[0] ? serial : NULL), devpath, 1); 276 handle, 277 &handle->usbNotification); 288 usb_handle *handle = (usb_handle *)refCon; local 291 if (!handle) { 292 DBG("ERR: NULL handle\n"); 296 IOObjectRelease(handle->usbNotification); 297 usb_kick(handle); 306 usb_handle* handle = NULL; local 452 usb_write(usb_handle *handle, const void *buf, int len) argument 492 usb_read(usb_handle *handle, void *buf, int len) argument 532 usb_close(usb_handle *handle) argument 537 usb_kick(usb_handle *handle) argument [all...] |
/system/core/libutils/ |
H A D | NativeHandle.cpp | 23 native_handle_t* handle, bool ownsHandle) { 24 return handle ? new NativeHandle(handle, ownsHandle) : NULL; 27 NativeHandle::NativeHandle(native_handle_t* handle, bool ownsHandle) argument 28 : mHandle(handle), mOwnsHandle(ownsHandle) 22 create( native_handle_t* handle, bool ownsHandle) argument
|
/system/core/fastbootd/ |
H A D | protocol.h | 47 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);
|
H A D | transport_socket.c | 57 struct transport_handle handle; member in struct:socket_handle 64 struct socket_handle * handle = container_of(thandle, struct socket_handle, handle); local 65 close(handle->fd); 70 struct socket_handle *handle = calloc(sizeof(struct socket_handle), 1); local 75 handle->fd = accept(socket_transport->fd, &addr, &alen); 77 if (handle->fd < 0) { 83 return &handle->handle; 89 struct socket_handle *handle local 104 struct socket_handle *handle = container_of(thandle, struct socket_handle, handle); local [all...] |
H A D | transport.h | 38 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/media/audio_utils/ |
H A D | tinysndfile.c | 70 SNDFILE *handle = (SNDFILE *) malloc(sizeof(SNDFILE)); local 71 handle->mode = SFM_READ; 72 handle->temp = NULL; 73 handle->stream = stream; 74 handle->info.format = SF_FORMAT_WAV; 172 handle->bytesPerFrame = bytesPerFrame; 173 handle->info.samplerate = samplerate; 174 handle->info.channels = channels; 177 handle->info.format |= SF_FORMAT_PCM_U8; 180 handle 303 SNDFILE *handle = (SNDFILE *) malloc(sizeof(SNDFILE)); local 330 sf_close(SNDFILE *handle) argument 351 sf_readf_short(SNDFILE *handle, short *ptr, sf_count_t desiredFrames) argument 396 sf_readf_float(SNDFILE *handle, float *ptr, sf_count_t desiredFrames) argument 443 sf_readf_int(SNDFILE *handle, int *ptr, sf_count_t desiredFrames) argument 490 sf_writef_short(SNDFILE *handle, const short *ptr, sf_count_t desiredFrames) argument 527 sf_writef_float(SNDFILE *handle, const float *ptr, sf_count_t desiredFrames) argument [all...] |
/system/core/fastboot/ |
H A D | usb_windows.c | 71 int recognized_device(usb_handle* handle, ifc_match_func callback); 76 /// Writes data to the opened usb handle 77 int usb_write(usb_handle* handle, const void* data, int len); 79 /// Reads data using the opened usb handle 80 int usb_read(usb_handle *handle, void* data, int len); 82 /// Cleans up opened usb handle 83 void usb_cleanup_handle(usb_handle* handle); 85 /// Cleans up (but don't close) opened usb handle 86 void usb_kick(usb_handle* handle); 88 /// Closes opened usb handle 155 usb_write(usb_handle* handle, const void* data, int len) argument 197 usb_read(usb_handle *handle, void* data, int len) argument 234 usb_cleanup_handle(usb_handle* handle) argument 252 usb_kick(usb_handle* handle) argument 261 usb_close(usb_handle* handle) argument 278 recognized_device(usb_handle* handle, ifc_match_func callback) argument 330 usb_handle* handle = NULL; local [all...] |
H A D | usb_osx.c | 67 static int try_interfaces(IOUSBDeviceInterface182 **dev, usb_handle *handle) { argument 171 if ((*interface)->GetInterfaceClass(interface, &handle->info.ifc_class) != 0 || 172 (*interface)->GetInterfaceSubClass(interface, &handle->info.ifc_subclass) != 0 || 173 (*interface)->GetInterfaceProtocol(interface, &handle->info.ifc_protocol) != 0) 179 handle->info.has_bulk_in = 0; 180 handle->info.has_bulk_out = 0; 201 handle->info.has_bulk_in = 1; 202 handle->bulkIn = endpoint; 204 handle->info.has_bulk_out = 1; 205 handle 260 try_device(io_service_t device, usb_handle *handle) argument 381 init_usb(ifc_match_func callback, usb_handle **handle) argument 455 usb_handle *handle = NULL; local [all...] |
/system/media/audio_utils/include/audio_utils/ |
H A D | sndfile.h | 61 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/ |
H A D | ion.c | 61 unsigned int flags, ion_user_handle_t *handle) 71 if (handle == NULL) 77 *handle = data.handle; 81 int ion_free(int fd, ion_user_handle_t handle) argument 84 .handle = handle, 89 int ion_map(int fd, ion_user_handle_t handle, size_t length, int prot, argument 94 .handle = handle, 60 ion_alloc(int fd, size_t len, size_t align, unsigned int heap_mask, unsigned int flags, ion_user_handle_t *handle) argument 118 ion_share(int fd, ion_user_handle_t handle, int *share_fd) argument 142 ion_user_handle_t handle; local 153 ion_import(int fd, int share_fd, ion_user_handle_t *handle) argument [all...] |
H A D | ion_test.c | 41 int _ion_alloc_test(int *fd, ion_user_handle_t *handle) argument 49 ret = ion_alloc(*fd, len, align, heap_mask, alloc_flags, handle); 59 ion_user_handle_t handle; local 61 if(_ion_alloc_test(&fd, &handle)) 64 ret = ion_free(fd, handle); 66 printf("%s failed: %s %d\n", __func__, strerror(ret), handle); 77 ion_user_handle_t handle; local 80 if(_ion_alloc_test(&fd, &handle)) 83 ret = ion_map(fd, handle, len, prot, map_flags, 0, &ptr, &map_fd); 95 ret = ion_free(fd, handle); 118 ion_user_handle_t handle; local [all...] |
/system/core/include/ziparchive/ |
H A D | zip_archive.h | 79 * Open a Zip archive, and sets handle to the value of the opaque 80 * handle for the file. This handle must be released by calling 81 * CloseArchive with this handle. 85 int32_t OpenArchive(const char* fileName, ZipArchiveHandle* handle); 92 * Sets handle to the value of the opaque handle for this file descriptor. 93 * This handle must be released by calling CloseArchive with this handle. 103 ZipArchiveHandle *handle); [all...] |
/system/core/libion/include/ion/ |
H A D | ion.h | 34 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/libion/tests/ |
H A D | allocate_test.cpp | 34 ion_user_handle_t handle = 0; local 35 ASSERT_EQ(0, ion_alloc(m_ionFd, size, 0, heapMask, 0, &handle)); 36 ASSERT_TRUE(handle != 0); 37 ASSERT_EQ(0, ion_free(m_ionFd, handle)); 49 ion_user_handle_t handle = 0; local 50 ASSERT_EQ(0, ion_alloc(m_ionFd, size, 0, heapMask, ION_FLAG_CACHED, &handle)); 51 ASSERT_TRUE(handle != 0); 52 ASSERT_EQ(0, ion_free(m_ionFd, handle)); 64 ion_user_handle_t handle = 0; local 65 ASSERT_EQ(0, ion_alloc(m_ionFd, size, 0, heapMask, ION_FLAG_CACHED_NEEDS_SYNC, &handle)); 79 ion_user_handle_t handle = 0; local 142 ion_user_handle_t handle = 0; local [all...] |
H A D | ion_test_fixture.cpp | 48 ion_user_handle_t handle = 0; local 50 ret = ion_alloc(fd, 4096, 0, i, 0, &handle); 51 if (ret == 0 && handle != 0) { 52 ion_free(fd, handle);
|
H A D | invalid_values_test.cpp | 58 ion_user_handle_t handle; local 60 int ret = ion_alloc(0, 4096, 0, m_firstHeap, 0, &handle); 63 EXPECT_EQ(-EBADF, ion_alloc(-1, 4096, 0, m_firstHeap, 0, &handle)); 65 EXPECT_EQ(-ENODEV, ion_alloc(m_ionFd, 4096, 0, 0, 0, &handle)); 69 EXPECT_EQ(-EINVAL, ion_alloc(m_ionFd, 0, 0, heapMask, 0, &handle)); 71 EXPECT_EQ(-EINVAL, ion_alloc(m_ionFd, -1, 0, heapMask, 0, &handle)); 73 EXPECT_EQ(-EINVAL, ion_alloc(m_ionFd, 4096, -1, heapMask, 0, &handle)); 74 /* NULL handle */ 97 /* NULL handle */ 109 /* zero handle */ 160 ion_user_handle_t handle; local [all...] |
H A D | map_test.cpp | 35 ion_user_handle_t handle = 0; local 37 ASSERT_EQ(0, ion_alloc(m_ionFd, size, 0, heapMask, 0, &handle)); 38 ASSERT_TRUE(handle != 0); 42 ASSERT_EQ(0, ion_map(m_ionFd, handle, size, PROT_READ | PROT_WRITE, MAP_SHARED, 0, &ptr, &map_fd)); 48 ASSERT_EQ(0, ion_free(m_ionFd, handle));
|
/system/core/include/utils/ |
H A D | NativeHandle.h | 30 // whether the wrapper owns the handle (so that it should clean up the 31 // handle upon destruction) or not. 32 // If handle is NULL, no NativeHandle will be created. 33 static sp<NativeHandle> create(native_handle_t* handle, bool ownsHandle); 35 const native_handle_t* handle() const { function in class:android::NativeHandle 43 NativeHandle(native_handle_t* handle, bool ownsHandle);
|
/system/core/libziparchive/ |
H A D | zip_archive_test.cc | 44 ZipArchiveHandle* handle) { 46 return OpenArchive(abs_path.c_str(), handle); 56 ZipArchiveHandle handle; local 57 ASSERT_EQ(0, OpenArchiveWrapper(kValidZip, &handle)); 59 CloseArchive(handle); 63 ZipArchiveHandle handle; local 64 ASSERT_NE(0, OpenArchiveWrapper(kMissingZip, &handle)); 67 ASSERT_EQ(-1, GetFileDescriptor(handle)); 71 ZipArchiveHandle handle; local 72 ASSERT_EQ(0, OpenArchiveWrapper(kValidZip, &handle)); 43 OpenArchiveWrapper(const std::string& name, ZipArchiveHandle* handle) argument 107 ZipArchiveHandle handle; local 127 ZipArchiveHandle handle; local 183 ZipArchiveHandle handle; local 217 ZipArchiveHandle handle; local 230 ZipArchiveHandle handle; local [all...] |
/system/core/fastbootd/commands/ |
H A D | virtual_partitions.h | 43 int try_handle_virtual_partition(struct protocol_handle *handle, const char *arg);
|
H A D | virtual_partitions.c | 37 int try_handle_virtual_partition(struct protocol_handle *handle, const char *arg) argument 43 current->handler(handle, arg);
|
/system/core/libion/kernel-headers/linux/ |
H A D | ion.h | 51 ion_user_handle_t handle; member in struct:ion_allocation_data 55 ion_user_handle_t handle; member in struct:ion_fd_data 60 ion_user_handle_t handle; member in struct:ion_handle_data
|
/system/core/libion/original-kernel-headers/linux/ |
H A D | ion.h | 81 * @handle: pointer that will be populated with a cookie to use to 91 ion_user_handle_t handle; member in struct:ion_allocation_data 95 * struct ion_fd_data - metadata passed to/from userspace for a handle/fd pair 96 * @handle: a handle 97 * @fd: a file descriptor representing that handle 99 * For ION_IOC_SHARE or ION_IOC_MAP userspace populates the handle field with 100 * the handle returned from ion alloc, and the kernel returns the file 102 * provides the file descriptor and the kernel returns the handle. 105 ion_user_handle_t handle; member in struct:ion_fd_data 114 ion_user_handle_t handle; member in struct:ion_handle_data [all...] |
/system/core/include/nativebridge/ |
H A D | native_bridge.h | 61 void* NativeBridgeGetTrampoline(void* handle, const char* name, const char* shorty, uint32_t len); 99 // The opaque handle of the shared library if sucessful, otherwise NULL 106 // handle [IN] the handle returned from loadLibrary 111 void* (*getTrampoline)(void* handle, const char* name, const char* shorty, uint32_t len);
|