• Home
  • Raw
  • Download

Lines Matching refs:WlResp

236 fn encode_resp(writer: &mut Writer, resp: WlResp) -> WlResult<()> {  in encode_resp()
238 WlResp::VfdNew { in encode_resp()
246 WlResp::VfdNewDmabuf { in encode_resp()
253 WlResp::VfdRecv { id, data, vfds } => encode_vfd_recv(writer, id, data, vfds), in encode_resp()
254 WlResp::VfdHup { id } => encode_vfd_hup(writer, id), in encode_resp()
500 enum WlResp<'a> { enum
535 impl<'a> WlResp<'a> { implementation
538 WlResp::Ok => VIRTIO_WL_RESP_OK, in get_code()
539 WlResp::VfdNew { resp, .. } => { in get_code()
547 WlResp::VfdNewDmabuf { .. } => VIRTIO_WL_RESP_VFD_NEW_DMABUF, in get_code()
548 WlResp::VfdRecv { .. } => VIRTIO_WL_CMD_VFD_RECV, in get_code()
549 WlResp::VfdHup { .. } => VIRTIO_WL_CMD_VFD_HUP, in get_code()
550 WlResp::Err(_) => VIRTIO_WL_RESP_ERR, in get_code()
551 WlResp::OutOfMemory => VIRTIO_WL_RESP_OUT_OF_MEMORY, in get_code()
552 WlResp::InvalidId => VIRTIO_WL_RESP_INVALID_ID, in get_code()
553 WlResp::InvalidType => VIRTIO_WL_RESP_INVALID_TYPE, in get_code()
554 WlResp::InvalidFlags => VIRTIO_WL_RESP_INVALID_FLAGS, in get_code()
555 WlResp::InvalidCommand => VIRTIO_WL_RESP_INVALID_CMD, in get_code()
777 fn send(&mut self, rds: &[RawDescriptor], data: &mut Reader) -> WlResult<WlResp> { in send() argument
784 Ok(WlResp::Ok) in send()
788 return Ok(WlResp::InvalidType); in send()
792 Ok(WlResp::Ok) in send()
794 Ok(WlResp::InvalidType) in send()
911 fn new_pipe(&mut self, id: u32, flags: u32) -> WlResult<WlResp> { in new_pipe() argument
913 return Ok(WlResp::InvalidId); in new_pipe()
917 return Ok(WlResp::InvalidFlags); in new_pipe()
921 return Ok(WlResp::InvalidFlags); in new_pipe()
931 return Ok(WlResp::InvalidFlags); in new_pipe()
936 let resp = WlResp::VfdNew { in new_pipe()
946 Entry::Occupied(_) => Ok(WlResp::InvalidId), in new_pipe()
950 fn new_alloc(&mut self, id: u32, flags: u32, size: u32) -> WlResult<WlResp> { in new_alloc() argument
952 return Ok(WlResp::InvalidId); in new_alloc()
957 return Ok(WlResp::InvalidFlags); in new_alloc()
960 return Ok(WlResp::Err(Box::from("invalid flags"))); in new_alloc()
966 let resp = WlResp::VfdNew { in new_alloc()
976 Entry::Occupied(_) => Ok(WlResp::InvalidId), in new_alloc()
981 fn new_dmabuf(&mut self, id: u32, width: u32, height: u32, format: u32) -> WlResult<WlResp> { in new_dmabuf() argument
983 return Ok(WlResp::InvalidId); in new_dmabuf()
989 let resp = WlResp::VfdNewDmabuf { in new_dmabuf()
999 Entry::Occupied(_) => Ok(WlResp::InvalidId), in new_dmabuf()
1004 fn dmabuf_sync(&mut self, vfd_id: u32, flags: u32) -> WlResult<WlResp> { in dmabuf_sync() argument
1006 return Ok(WlResp::InvalidFlags); in dmabuf_sync()
1012 Ok(WlResp::Ok) in dmabuf_sync()
1014 None => Ok(WlResp::InvalidId), in dmabuf_sync()
1018 fn new_context(&mut self, id: u32, name: &str) -> WlResult<WlResp> { in new_context() argument
1020 return Ok(WlResp::InvalidId); in new_context()
1040 Ok(WlResp::VfdNew { in new_context()
1048 Entry::Occupied(_) => Ok(WlResp::InvalidId), in new_context()
1082 fn close(&mut self, vfd_id: u32) -> WlResult<WlResp> { in close() argument
1099 Ok(WlResp::Ok) in close()
1101 None => Ok(WlResp::InvalidId), in close()
1131 ) -> WlResult<WlResp> { in send() argument
1168 None => return Ok(WlResp::InvalidType), in send()
1175 return Ok(WlResp::InvalidId); in send()
1188 None => return Ok(WlResp::InvalidId), in send()
1200 None => return Ok(WlResp::InvalidId), in send()
1218 None => return Ok(WlResp::InvalidId), in send()
1228 Err(_) => return Ok(WlResp::InvalidId), in send()
1239 return Ok(WlResp::InvalidId); in send()
1247 WlResp::Ok => {} in send()
1248 _ => return Ok(WlResp::InvalidType), in send()
1250 None => return Ok(WlResp::InvalidId), in send()
1261 Ok(WlResp::Ok) in send()
1294 fn execute(&mut self, reader: &mut Reader) -> WlResult<WlResp> { in execute() argument
1379 Ok(WlResp::InvalidCommand) in execute()
1384 fn next_recv(&self) -> Option<WlResp> { in next_recv() argument
1390 Some(vfd) => Some(WlResp::VfdNew { in next_recv()
1397 _ => Some(WlResp::VfdNew { in next_recv()
1406 Some(WlResp::VfdRecv { in next_recv()
1415 Some(WlResp::VfdRecv { in next_recv()
1421 Some(WlResp::VfdRecv { in next_recv()
1428 (vfd_id, WlRecv::Hup) => Some(WlResp::VfdHup { id: vfd_id }), in next_recv()
1585 Err(e) => WlResp::Err(Box::new(e)), in run()