|  | library fidl.test.handles; | 
|  |  | 
|  | using zx; | 
|  |  | 
|  | // This is not a reference to library zx to avoid complexity in the test data. | 
|  | // A local handle is defined here that contains subtypes that this test cares | 
|  | // about. | 
|  | enum obj_type : uint32 { | 
|  | NONE = 0; | 
|  | PROCESS = 1; | 
|  | THREAD = 2; | 
|  | VMO = 3; | 
|  | CHANNEL = 4; | 
|  | EVENT = 5; | 
|  | PORT = 6; | 
|  | INTERRUPT = 9; | 
|  | PCI_DEVICE = 11; | 
|  | LOG = 12; | 
|  | SOCKET = 14; | 
|  | RESOURCE = 15; | 
|  | EVENTPAIR = 16; | 
|  | JOB = 17; | 
|  | VMAR = 18; | 
|  | FIFO = 19; | 
|  | GUEST = 20; | 
|  | VCPU = 21; | 
|  | TIMER = 22; | 
|  | IOMMU = 23; | 
|  | BTI = 24; | 
|  | PROFILE = 25; | 
|  | PMT = 26; | 
|  | SUSPEND_TOKEN = 27; | 
|  | PAGER = 28; | 
|  | EXCEPTION = 29; | 
|  | CLOCK = 30; | 
|  | STREAM = 31; | 
|  | MSI_ALLOCATION = 32; | 
|  | MSI_INTERRUPT = 33; | 
|  | }; | 
|  |  | 
|  | resource_definition handle : uint32 { | 
|  | properties { | 
|  | obj_type subtype; | 
|  | zx.rights rights; | 
|  | }; | 
|  | }; | 
|  |  | 
|  | protocol SomeProtocol { | 
|  | }; | 
|  |  | 
|  | alias aliased_plain_handle = handle; | 
|  | alias aliased_subtype_handle = handle:VMO; | 
|  | alias aliased_rights_handle = handle:<VMO, zx.rights.DUPLICATE>; | 
|  |  | 
|  | resource struct Handles { | 
|  | handle plain_handle; | 
|  |  | 
|  | handle:BTI bti_handle; | 
|  | handle:CHANNEL channel_handle; | 
|  | handle:CLOCK clock_handle; | 
|  | handle:LOG debuglog_handle; | 
|  | handle:EVENT event_handle; | 
|  | handle:EVENTPAIR eventpair_handle; | 
|  | handle:EXCEPTION exception_handle; | 
|  | handle:FIFO fifo_handle; | 
|  | handle:GUEST guest_handle; | 
|  | handle:INTERRUPT interrupt_handle; | 
|  | handle:IOMMU iommu_handle; | 
|  | handle:JOB job_handle; | 
|  | handle:PAGER pager_handle; | 
|  | handle:PCI_DEVICE pcidevice_handle; | 
|  | handle:PMT pmt_handle; | 
|  | handle:PORT port_handle; | 
|  | handle:PROCESS process_handle; | 
|  | handle:PROFILE profile_handle; | 
|  | handle:RESOURCE resource_handle; | 
|  | handle:SOCKET socket_handle; | 
|  | handle:SUSPEND_TOKEN suspendtoken_handle; | 
|  | handle:THREAD thread_handle; | 
|  | handle:TIMER timer_handle; | 
|  | handle:VCPU vcpu_handle; | 
|  | handle:VMAR vmar_handle; | 
|  | handle:VMO vmo_handle; | 
|  |  | 
|  | handle:<VMO, zx.rights.DUPLICATE | zx.rights.READ> rights_handle; | 
|  |  | 
|  | aliased_plain_handle aliased_plain_handle_field; | 
|  | aliased_subtype_handle aliased_subtype_handle_field; | 
|  | aliased_rights_handle aliased_rights_handle_field; | 
|  |  | 
|  | SomeProtocol some_protocol; | 
|  | request<SomeProtocol> request_some_protocol; | 
|  | }; |