Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
IOKit.h
Go to the documentation of this file.
1// Copyright 2013 The Flutter Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5// These declarations are an amalgamation of different headers whose
6// symbols exist in IOKit.framework. The headers have been removed
7// from the iOS SDKs but all the functions are documented here:
8// * https://developer.apple.com/documentation/iokit/iokitlib_h?language=objc
9// * https://developer.apple.com/documentation/iokit/iokit_functions?language=objc
10// * file:///Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/IOKit.framework/Versions/A/Headers/IOKitLib.h
11
12#if FLUTTER_RUNTIME_MODE == FLUTTER_RUNTIME_MODE_DEBUG || \
13 FLUTTER_RUNTIME_MODE == FLUTTER_RUNTIME_MODE_PROFILE
14#ifndef FLUTTER_SHELL_PLATFORM_DARWIN_IOS_FRAMEWORK_SOURCE_IOKIT_H_
15#define FLUTTER_SHELL_PLATFORM_DARWIN_IOS_FRAMEWORK_SOURCE_IOKIT_H_
16
17#if defined(__cplusplus)
18extern "C" {
19#endif // defined(__cplusplus)
20
21#include <CoreFoundation/CoreFoundation.h>
22#include <mach/mach.h>
23#include <stdint.h>
24
25#define IOKIT
26#include <device/device_types.h>
27
28static const char* kIOServicePlane = "IOService";
29
30typedef io_object_t io_registry_entry_t;
31typedef io_object_t io_service_t;
32typedef io_object_t io_connect_t;
33typedef io_object_t io_iterator_t;
34
35enum {
37};
38
39extern const mach_port_t kIOMasterPortDefault;
40
41kern_return_t IOObjectRetain(io_object_t object);
42kern_return_t IOObjectRelease(io_object_t object);
43boolean_t IOObjectConformsTo(io_object_t object, const io_name_t name);
44uint32_t IOObjectGetKernelRetainCount(io_object_t object);
45kern_return_t IOObjectGetClass(io_object_t object, io_name_t name);
46CFStringRef IOObjectCopyClass(io_object_t object);
47CFStringRef IOObjectCopySuperclassForClass(CFStringRef name);
49
51kern_return_t IORegistryEntryGetName(io_registry_entry_t entry, io_name_t name);
53 uint64_t* entryID);
55 const io_name_t plane,
56 io_string_t path);
58 const io_name_t name,
59 io_struct_inband_t buffer,
60 uint32_t* size);
63 CFMutableDictionaryRef* properties,
64 CFAllocatorRef allocator,
65 uint32_t options);
67 CFStringRef key,
68 CFAllocatorRef allocator,
69 uint32_t options);
71 CFTypeRef properties);
72
73kern_return_t IORegistryCreateIterator(mach_port_t master,
74 const io_name_t plane,
75 uint32_t options,
76 io_iterator_t* it);
78 const io_name_t plane,
79 uint32_t options,
80 io_iterator_t* it);
82 const io_name_t plane,
83 io_iterator_t* it);
85 const io_name_t plane,
86 io_iterator_t* it);
90
91CFMutableDictionaryRef IOServiceMatching(const char* name) CF_RETURNS_RETAINED;
92CFMutableDictionaryRef IOServiceNameMatching(const char* name)
93 CF_RETURNS_RETAINED;
95 mach_port_t master,
96 CFDictionaryRef matching CF_RELEASES_ARGUMENT);
98 mach_port_t master,
99 CFDictionaryRef matching CF_RELEASES_ARGUMENT,
100 io_iterator_t* it);
101
102#if __cplusplus
103}
104#endif // __cplusplus
105
106#endif // FLUTTER_SHELL_PLATFORM_DARWIN_IOS_FRAMEWORK_SOURCE_IOKIT_H_
107#endif // FLUTTER_SHELL_PLATFORM_DARWIN_IOS_FRAMEWORK_SOURCE_IOKIT_H_
108 // defined(FLUTTER_RUNTIME_MODE_PROFILE)
const char * options
kern_return_t IOObjectGetClass(io_object_t object, io_name_t name)
io_object_t io_registry_entry_t
Definition IOKit.h:30
kern_return_t IORegistryEntryGetChildIterator(io_registry_entry_t entry, const io_name_t plane, io_iterator_t *it)
io_object_t io_connect_t
Definition IOKit.h:32
kern_return_t IORegistryEntryGetParentIterator(io_registry_entry_t entry, const io_name_t plane, io_iterator_t *it)
kern_return_t IORegistryEntryGetProperty(io_registry_entry_t entry, const io_name_t name, io_struct_inband_t buffer, uint32_t *size)
CFStringRef IOObjectCopySuperclassForClass(CFStringRef name)
static const char * kIOServicePlane
Definition IOKit.h:28
kern_return_t IORegistryEntryGetName(io_registry_entry_t entry, io_name_t name)
io_service_t IOServiceGetMatchingService(mach_port_t master, CFDictionaryRef matching CF_RELEASES_ARGUMENT)
kern_return_t IORegistryEntrySetCFProperties(io_registry_entry_t entry, CFTypeRef properties)
io_object_t io_iterator_t
Definition IOKit.h:33
io_object_t io_service_t
Definition IOKit.h:31
kern_return_t IORegistryEntryGetPath(io_registry_entry_t entry, const io_name_t plane, io_string_t path)
void IOIteratorReset(io_iterator_t it)
const mach_port_t kIOMasterPortDefault
CFTypeRef IORegistryEntryCreateCFProperty(io_registry_entry_t entry, CFStringRef key, CFAllocatorRef allocator, uint32_t options)
kern_return_t IORegistryCreateIterator(mach_port_t master, const io_name_t plane, uint32_t options, io_iterator_t *it)
CFMutableDictionaryRef IOServiceNameMatching(const char *name) CF_RETURNS_RETAINED
CFStringRef IOObjectCopyBundleIdentifierForClass(CFStringRef name)
io_registry_entry_t IORegistryGetRootEntry(mach_port_t master)
kern_return_t IORegistryEntryCreateCFProperties(io_registry_entry_t entry, CFMutableDictionaryRef *properties, CFAllocatorRef allocator, uint32_t options)
CFStringRef IOObjectCopyClass(io_object_t object)
kern_return_t IORegistryEntryCreateIterator(io_registry_entry_t entry, const io_name_t plane, uint32_t options, io_iterator_t *it)
kern_return_t IOObjectRelease(io_object_t object)
kern_return_t IOServiceGetMatchingServices(mach_port_t master, CFDictionaryRef matching CF_RELEASES_ARGUMENT, io_iterator_t *it)
boolean_t IOIteratorIsValid(io_iterator_t it)
CFMutableDictionaryRef IOServiceMatching(const char *name) CF_RETURNS_RETAINED
kern_return_t IOObjectRetain(io_object_t object)
@ kIOReturnSuccess
Definition IOKit.h:36
io_object_t IOIteratorNext(io_iterator_t it)
kern_return_t IORegistryEntryGetRegistryEntryID(io_registry_entry_t entry, uint64_t *entryID)
boolean_t IOObjectConformsTo(io_object_t object, const io_name_t name)
uint32_t IOObjectGetKernelRetainCount(io_object_t object)
static const uint8_t buffer[]
const char * name
Definition fuchsia.cc:50