1*5e3eaea3SApple OSS Distributions/* 2*5e3eaea3SApple OSS Distributions * Copyright (c) 2019-2019 Apple Inc. All rights reserved. 3*5e3eaea3SApple OSS Distributions * 4*5e3eaea3SApple OSS Distributions * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ 5*5e3eaea3SApple OSS Distributions * 6*5e3eaea3SApple OSS Distributions * This file contains Original Code and/or Modifications of Original Code 7*5e3eaea3SApple OSS Distributions * as defined in and that are subject to the Apple Public Source License 8*5e3eaea3SApple OSS Distributions * Version 2.0 (the 'License'). You may not use this file except in 9*5e3eaea3SApple OSS Distributions * compliance with the License. The rights granted to you under the License 10*5e3eaea3SApple OSS Distributions * may not be used to create, or enable the creation or redistribution of, 11*5e3eaea3SApple OSS Distributions * unlawful or unlicensed copies of an Apple operating system, or to 12*5e3eaea3SApple OSS Distributions * circumvent, violate, or enable the circumvention or violation of, any 13*5e3eaea3SApple OSS Distributions * terms of an Apple operating system software license agreement. 14*5e3eaea3SApple OSS Distributions * 15*5e3eaea3SApple OSS Distributions * Please obtain a copy of the License at 16*5e3eaea3SApple OSS Distributions * http://www.opensource.apple.com/apsl/ and read it before using this file. 17*5e3eaea3SApple OSS Distributions * 18*5e3eaea3SApple OSS Distributions * The Original Code and all software distributed under the License are 19*5e3eaea3SApple OSS Distributions * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 20*5e3eaea3SApple OSS Distributions * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 21*5e3eaea3SApple OSS Distributions * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 22*5e3eaea3SApple OSS Distributions * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 23*5e3eaea3SApple OSS Distributions * Please see the License for the specific language governing rights and 24*5e3eaea3SApple OSS Distributions * limitations under the License. 25*5e3eaea3SApple OSS Distributions * 26*5e3eaea3SApple OSS Distributions * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ 27*5e3eaea3SApple OSS Distributions */ 28*5e3eaea3SApple OSS Distributions 29*5e3eaea3SApple OSS Distributions#if !__IIG 30*5e3eaea3SApple OSS Distributions#if KERNEL 31*5e3eaea3SApple OSS Distributions#include <libkern/c++/OSObject.h> 32*5e3eaea3SApple OSS Distributions#endif 33*5e3eaea3SApple OSS Distributions#endif 34*5e3eaea3SApple OSS Distributions 35*5e3eaea3SApple OSS Distributions#ifndef _IOKIT_UOSOBJECT_H 36*5e3eaea3SApple OSS Distributions#define _IOKIT_UOSOBJECT_H 37*5e3eaea3SApple OSS Distributions 38*5e3eaea3SApple OSS Distributions#if !KERNEL 39*5e3eaea3SApple OSS Distributions#include <stddef.h> 40*5e3eaea3SApple OSS Distributions#include <stdint.h> 41*5e3eaea3SApple OSS Distributions#include <DriverKit/IOReturn.h> 42*5e3eaea3SApple OSS Distributions#if DRIVERKIT_PRIVATE 43*5e3eaea3SApple OSS Distributions#include <mach/port.h> 44*5e3eaea3SApple OSS Distributions#endif /* DRIVERKIT_PRIVATE */ 45*5e3eaea3SApple OSS Distributions#if !__IIG 46*5e3eaea3SApple OSS Distributions#include <string.h> 47*5e3eaea3SApple OSS Distributions#include <DriverKit/OSMetaClass.h> 48*5e3eaea3SApple OSS Distributions#endif /* !__IIG */ 49*5e3eaea3SApple OSS Distributionsclass OSObject; 50*5e3eaea3SApple OSS Distributionstypedef OSObject * OSObjectPtr; 51*5e3eaea3SApple OSS Distributions#endif /* !KERNEL */ 52*5e3eaea3SApple OSS Distributions 53*5e3eaea3SApple OSS Distributions#if !__IIG_ATTRIBUTES_DEFINED__ 54*5e3eaea3SApple OSS Distributions 55*5e3eaea3SApple OSS Distributions#define __IIG_ATTRIBUTES_DEFINED__ 1 56*5e3eaea3SApple OSS Distributions 57*5e3eaea3SApple OSS Distributions#if __IIG || __DOCUMENTATION__ 58*5e3eaea3SApple OSS Distributions 59*5e3eaea3SApple OSS Distributions#define IIG_KERNEL __attribute__((annotate("kernel"))) 60*5e3eaea3SApple OSS Distributions#define IIG_NATIVE __attribute__((annotate("native"))) 61*5e3eaea3SApple OSS Distributions#define IIG_LOCAL __attribute__((annotate("local"))) 62*5e3eaea3SApple OSS Distributions#define IIG_LOCALONLY __attribute__((annotate("localonly"))) 63*5e3eaea3SApple OSS Distributions#define IIG_REMOTE __attribute__((annotate("remote"))) 64*5e3eaea3SApple OSS Distributions#define IIG_LOCALHOST __attribute__((annotate("localhost"))) 65*5e3eaea3SApple OSS Distributions#define IIG_INVOKEREPLY __attribute__((annotate("invokereply"))) 66*5e3eaea3SApple OSS Distributions#define IIG_REPLY __attribute__((annotate("reply"))) 67*5e3eaea3SApple OSS Distributions#define IIG_PORTMAKESEND __attribute__((annotate("MACH_MSG_TYPE_MAKE_SEND"))) 68*5e3eaea3SApple OSS Distributions#define IIG_PORTCOPYSEND __attribute__((annotate("MACH_MSG_TYPE_COPY_SEND"))) 69*5e3eaea3SApple OSS Distributions#define IIG_TARGET __attribute__((annotate("target"))) 70*5e3eaea3SApple OSS Distributions#define IIG_TYPE(p) __attribute__((annotate("type=" # p))) 71*5e3eaea3SApple OSS Distributions//#define IIG_ARRAY(maxcount) __attribute__((annotate(# maxcount), annotate("array"))) 72*5e3eaea3SApple OSS Distributions#define IIG_EXTENDS(cls) __attribute__((annotate("extends=" # cls))) 73*5e3eaea3SApple OSS Distributions//#define IIG_INTERFACE __attribute__((annotate("interface"))) 74*5e3eaea3SApple OSS Distributions//#define IIG_IMPLEMENTS(i) void __implements(i *); 75*5e3eaea3SApple OSS Distributions#define IIG_QUEUENAME(name) __attribute__((annotate("queuename=" # name))) 76*5e3eaea3SApple OSS Distributions#define IIG_SERIALIZABLE __attribute__((annotate("serializable"))) 77*5e3eaea3SApple OSS Distributions#define IIG_CONCRETE __attribute__((annotate("concrete"))) 78*5e3eaea3SApple OSS Distributions 79*5e3eaea3SApple OSS Distributions#if __IIG 80*5e3eaea3SApple OSS Distributions#define KERNEL IIG_KERNEL 81*5e3eaea3SApple OSS Distributions#endif /* __IIG */ 82*5e3eaea3SApple OSS Distributions#define NATIVE IIG_NATIVE 83*5e3eaea3SApple OSS Distributions#define LOCAL IIG_LOCAL 84*5e3eaea3SApple OSS Distributions#define LOCALONLY IIG_LOCALONLY 85*5e3eaea3SApple OSS Distributions#define REMOTE IIG_REMOTE 86*5e3eaea3SApple OSS Distributions#define LOCALHOST IIG_LOCALHOST 87*5e3eaea3SApple OSS Distributions#define INVOKEREPLY IIG_INVOKEREPLY 88*5e3eaea3SApple OSS Distributions#define REPLY IIG_REPLY 89*5e3eaea3SApple OSS Distributions#define PORTMAKESEND IIG_PORTMAKESEND 90*5e3eaea3SApple OSS Distributions#define PORTCOPYSEND IIG_PORTCOPYSEND 91*5e3eaea3SApple OSS Distributions#define TARGET IIG_TARGET 92*5e3eaea3SApple OSS Distributions#define TYPE(p) IIG_TYPE(p) 93*5e3eaea3SApple OSS Distributions//#define ARRAY(maxcount) IIG_ARRAY(maxcount) 94*5e3eaea3SApple OSS Distributions#define EXTENDS(cls) IIG_EXTENDS(cls) 95*5e3eaea3SApple OSS Distributions//#define INTERFACE IIG_INTERFACE 96*5e3eaea3SApple OSS Distributions//#define IMPLEMENTS(i) IIG_IMPLEMENTS(i) 97*5e3eaea3SApple OSS Distributions#define QUEUENAME(name) IIG_QUEUENAME(name) 98*5e3eaea3SApple OSS Distributions 99*5e3eaea3SApple OSS Distributions#else /* __IIG || __DOCUMENTATION__ */ 100*5e3eaea3SApple OSS Distributions 101*5e3eaea3SApple OSS Distributions#define IIG_KERNEL 102*5e3eaea3SApple OSS Distributions#define IIG_NATIVE 103*5e3eaea3SApple OSS Distributions#define IIG_LOCAL 104*5e3eaea3SApple OSS Distributions#define IIG_LOCALONLY 105*5e3eaea3SApple OSS Distributions#define IIG_REMOTE 106*5e3eaea3SApple OSS Distributions#define IIG_LOCALHOST 107*5e3eaea3SApple OSS Distributions#define IIG_INVOKEREPLY 108*5e3eaea3SApple OSS Distributions#define IIG_REPLY 109*5e3eaea3SApple OSS Distributions#define IIG_PORTMAKESEND 110*5e3eaea3SApple OSS Distributions#define IIG_PORTCOPYSEND 111*5e3eaea3SApple OSS Distributions#define IIG_TARGET 112*5e3eaea3SApple OSS Distributions#define IIG_TYPE(p) 113*5e3eaea3SApple OSS Distributions//#define IIG_ARRAY(maxcount) 114*5e3eaea3SApple OSS Distributions#define IIG_EXTENDS(cls) 115*5e3eaea3SApple OSS Distributions//#define IIG_INTERFACE 116*5e3eaea3SApple OSS Distributions//#define IIG_IMPLEMENTS(i) 117*5e3eaea3SApple OSS Distributions#define IIG_QUEUENAME(name) 118*5e3eaea3SApple OSS Distributions#define IIG_SERIALIZABLE 119*5e3eaea3SApple OSS Distributions 120*5e3eaea3SApple OSS Distributions#endif /* __IIG || __DOCUMENTATION__ */ 121*5e3eaea3SApple OSS Distributions 122*5e3eaea3SApple OSS Distributions#endif /* __IIG_ATTRIBUTES_DEFINED__ */ 123*5e3eaea3SApple OSS Distributions 124*5e3eaea3SApple OSS Distributions 125*5e3eaea3SApple OSS Distributions#if !__IIG 126*5e3eaea3SApple OSS Distributions#if KERNEL 127*5e3eaea3SApple OSS Distributionstypedef OSObject OSContainer; 128*5e3eaea3SApple OSS Distributions#else /* KERNEL */ 129*5e3eaea3SApple OSS Distributionsclass IIG_SERIALIZABLE OSContainer; 130*5e3eaea3SApple OSS Distributions#endif /* KERNEL */ 131*5e3eaea3SApple OSS Distributions#else /* !__IIG */ 132*5e3eaea3SApple OSS Distributionsclass IIG_SERIALIZABLE OSContainer; 133*5e3eaea3SApple OSS Distributions#endif /* !__IIG */ 134*5e3eaea3SApple OSS Distributions 135*5e3eaea3SApple OSS Distributions/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 136*5e3eaea3SApple OSS Distributions 137*5e3eaea3SApple OSS Distributions/* 138*5e3eaea3SApple OSS Distributions * DRIVERKIT_ macros below can be used to describe the ownership semantics 139*5e3eaea3SApple OSS Distributions * of functions handling subclasses of OSObject. 140*5e3eaea3SApple OSS Distributions * The attributes propagate with inheritance, but can be overriden. 141*5e3eaea3SApple OSS Distributions * New versions of the Clang Static Analyzer can use this knowledge to 142*5e3eaea3SApple OSS Distributions * check the code for leaks or uses-after-free. 143*5e3eaea3SApple OSS Distributions */ 144*5e3eaea3SApple OSS Distributions 145*5e3eaea3SApple OSS Distributions#ifndef KERNEL 146*5e3eaea3SApple OSS Distributions/* 147*5e3eaea3SApple OSS Distributions * By default, methods returning OSObjects are assumed to have the following 148*5e3eaea3SApple OSS Distributions * owneship semantics: 149*5e3eaea3SApple OSS Distributions * - Functions and methods that have "Get" in their name are assumed to be 150*5e3eaea3SApple OSS Distributions * getters. They return at "+0" and the caller is not responsible for releasing 151*5e3eaea3SApple OSS Distributions * the returned object. 152*5e3eaea3SApple OSS Distributions * 153*5e3eaea3SApple OSS Distributions * - All other methods are assumed to return at "+1", and the caller is 154*5e3eaea3SApple OSS Distributions * responsible for releasing the returned object. 155*5e3eaea3SApple OSS Distributions * 156*5e3eaea3SApple OSS Distributions * The semantics implied by the naming convention described above can be 157*5e3eaea3SApple OSS Distributions * overriden using either DRIVERKIT_RETURNS_RETAINED or 158*5e3eaea3SApple OSS Distributions * DRIVERKIT_RETURNS_NOT_RETAINED attribute applied to a function. 159*5e3eaea3SApple OSS Distributions * In the former case, it stipulates that the function is returning at "+1", 160*5e3eaea3SApple OSS Distributions * and in the latter case "+0". 161*5e3eaea3SApple OSS Distributions * DRIVERKIT_RETURNS_RETAINED and DRIVERKIT_RETURNS_NOT_RETAINED attributes 162*5e3eaea3SApple OSS Distributions * can be also applied to out parameters, in which case they specify 163*5e3eaea3SApple OSS Distributions * that an out parameter is written into at +1 or +0 respectively. 164*5e3eaea3SApple OSS Distributions * Behavior of out parameters of non-void functions can be additionally 165*5e3eaea3SApple OSS Distributions * customized via annotations that explain how a function returns a retained 166*5e3eaea3SApple OSS Distributions * or a non-retained value through its out-parameter depending on its 167*5e3eaea3SApple OSS Distributions * return value: DRIVERKIT_RETURNS_RETAINED_ON_ZERO and 168*5e3eaea3SApple OSS Distributions * DRIVERKIT_RETURNS_RETAINED_ON_NONZERO. 169*5e3eaea3SApple OSS Distributions */ 170*5e3eaea3SApple OSS Distributions#if __has_attribute(os_returns_retained) 171*5e3eaea3SApple OSS Distributions#define DRIVERKIT_RETURNS_RETAINED __attribute__((os_returns_retained)) 172*5e3eaea3SApple OSS Distributions#else 173*5e3eaea3SApple OSS Distributions#define DRIVERKIT_RETURNS_RETAINED 174*5e3eaea3SApple OSS Distributions#endif 175*5e3eaea3SApple OSS Distributions#if __has_attribute(os_returns_not_retained) 176*5e3eaea3SApple OSS Distributions#define DRIVERKIT_RETURNS_NOT_RETAINED __attribute__((os_returns_not_retained)) 177*5e3eaea3SApple OSS Distributions#else 178*5e3eaea3SApple OSS Distributions#define DRIVERKIT_RETURNS_NOT_RETAINED 179*5e3eaea3SApple OSS Distributions#endif 180*5e3eaea3SApple OSS Distributions 181*5e3eaea3SApple OSS Distributions/* 182*5e3eaea3SApple OSS Distributions * DRIVERKIT_CONSUMED attribute can be applied to parameters. 183*5e3eaea3SApple OSS Distributions * It specifies that this function call would consume the reference to the 184*5e3eaea3SApple OSS Distributions * annotated parameter. 185*5e3eaea3SApple OSS Distributions */ 186*5e3eaea3SApple OSS Distributions#if __has_attribute(os_consumed) 187*5e3eaea3SApple OSS Distributions#define DRIVERKIT_CONSUMED __attribute__((os_consumed)) 188*5e3eaea3SApple OSS Distributions#else 189*5e3eaea3SApple OSS Distributions#define DRIVERKIT_CONSUMED 190*5e3eaea3SApple OSS Distributions#endif 191*5e3eaea3SApple OSS Distributions 192*5e3eaea3SApple OSS Distributions/* 193*5e3eaea3SApple OSS Distributions * DRIVERKIT_CONSUMES_THIS attribute can be applied to C++ methods. 194*5e3eaea3SApple OSS Distributions * It specifies that this method call consumes a reference to "this" (e.g. 195*5e3eaea3SApple OSS Distributions * by storing a reference to "this" in a passed parameter). 196*5e3eaea3SApple OSS Distributions */ 197*5e3eaea3SApple OSS Distributions#if __has_attribute(os_consumes_this) 198*5e3eaea3SApple OSS Distributions#define DRIVERKIT_CONSUMES_THIS __attribute__((os_consumes_this)) 199*5e3eaea3SApple OSS Distributions#else 200*5e3eaea3SApple OSS Distributions#define DRIVERKIT_CONSUMES_THIS 201*5e3eaea3SApple OSS Distributions#endif 202*5e3eaea3SApple OSS Distributions 203*5e3eaea3SApple OSS Distributions/* 204*5e3eaea3SApple OSS Distributions * DRIVERKIT_RETURNS_RETAINED_ON_ZERO is an attribute applicable to out 205*5e3eaea3SApple OSS Distributions * parameters. 206*5e3eaea3SApple OSS Distributions * It specifies that an out parameter at +1 is written into an argument iff 207*5e3eaea3SApple OSS Distributions * the function returns a zero return value. 208*5e3eaea3SApple OSS Distributions */ 209*5e3eaea3SApple OSS Distributions#if __has_attribute(os_returns_retained_on_zero) 210*5e3eaea3SApple OSS Distributions#define DRIVERKIT_RETURNS_RETAINED_ON_ZERO __attribute__((os_returns_retained_on_zero)) 211*5e3eaea3SApple OSS Distributions#else 212*5e3eaea3SApple OSS Distributions#define DRIVERKIT_RETURNS_RETAINED_ON_ZERO 213*5e3eaea3SApple OSS Distributions#endif 214*5e3eaea3SApple OSS Distributions 215*5e3eaea3SApple OSS Distributions/* 216*5e3eaea3SApple OSS Distributions * DRIVERKIT_RETURNS_RETAINED_ON_NON_ZERO is an attribute applicable to out 217*5e3eaea3SApple OSS Distributions * parameters. 218*5e3eaea3SApple OSS Distributions * It specifies that an out parameter at +1 is written into an argument iff 219*5e3eaea3SApple OSS Distributions * the function returns a non-zero return value. 220*5e3eaea3SApple OSS Distributions */ 221*5e3eaea3SApple OSS Distributions#if __has_attribute(os_returns_retained_on_non_zero) 222*5e3eaea3SApple OSS Distributions#define DRIVERKIT_RETURNS_RETAINED_ON_NONZERO __attribute__((os_returns_retained_on_non_zero)) 223*5e3eaea3SApple OSS Distributions#else 224*5e3eaea3SApple OSS Distributions#define DRIVERKIT_RETURNS_RETAINED_ON_NONZERO 225*5e3eaea3SApple OSS Distributions#endif 226*5e3eaea3SApple OSS Distributions 227*5e3eaea3SApple OSS Distributions 228*5e3eaea3SApple OSS Distributions/* 229*5e3eaea3SApple OSS Distributions * Macros below are equivalent to their DRIVERKIT_ counterparts. 230*5e3eaea3SApple OSS Distributions * They are provided for source-compatibility with IOKit code so they can 231*5e3eaea3SApple OSS Distributions * be used in code that gets compiled for both platforms. 232*5e3eaea3SApple OSS Distributions */ 233*5e3eaea3SApple OSS Distributions#define LIBKERN_RETURNS_RETAINED DRIVERKIT_RETURNS_RETAINED 234*5e3eaea3SApple OSS Distributions#define LIBKERN_RETURNS_NOT_RETAINED DRIVERKIT_RETURNS_NOT_RETAINED 235*5e3eaea3SApple OSS Distributions#define LIBKERN_CONSUMED DRIVERKIT_CONSUMED 236*5e3eaea3SApple OSS Distributions#define LIBKERN_CONSUMES_THIS DRIVERKIT_CONSUMES_THIS 237*5e3eaea3SApple OSS Distributions#define LIBKERN_RETURNS_RETAINED_ON_ZERO DRIVERKIT_RETURNS_RETAINED_ON_ZERO 238*5e3eaea3SApple OSS Distributions#define LIBKERN_RETURNS_RETAINED_ON_NONZERO DRIVERKIT_RETURNS_RETAINED_ON_NONZERO 239*5e3eaea3SApple OSS Distributions 240*5e3eaea3SApple OSS Distributions#endif /* !defined(KERNEL) */ 241*5e3eaea3SApple OSS Distributions 242*5e3eaea3SApple OSS Distributions/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 243*5e3eaea3SApple OSS Distributions 244*5e3eaea3SApple OSS Distributions 245*5e3eaea3SApple OSS Distributionsclass IIG_SERIALIZABLE OSData; 246*5e3eaea3SApple OSS Distributionsclass IIG_SERIALIZABLE OSNumber; 247*5e3eaea3SApple OSS Distributionsclass IIG_SERIALIZABLE OSString; 248*5e3eaea3SApple OSS Distributionsclass IIG_SERIALIZABLE OSBoolean; 249*5e3eaea3SApple OSS Distributionsclass IIG_SERIALIZABLE OSDictionary; 250*5e3eaea3SApple OSS Distributionsclass IIG_SERIALIZABLE OSArray; 251*5e3eaea3SApple OSS Distributionsclass IIG_SERIALIZABLE OSSet; 252*5e3eaea3SApple OSS Distributionsclass IIG_SERIALIZABLE OSOrderedSet; 253*5e3eaea3SApple OSS Distributions 254*5e3eaea3SApple OSS Distributionsclass OSMetaClass; 255*5e3eaea3SApple OSS Distributionsclass IODispatchQueue; 256*5e3eaea3SApple OSS Distributionstypedef char IODispatchQueueName[256]; 257*5e3eaea3SApple OSS Distributions 258*5e3eaea3SApple OSS Distributions#if __IIG 259*5e3eaea3SApple OSS Distributionsclass OSMetaClassBase 260*5e3eaea3SApple OSS Distributions{ 261*5e3eaea3SApple OSS Distributions virtual const OSMetaClass * 262*5e3eaea3SApple OSS Distributions getMetaClass() const LOCALONLY; 263*5e3eaea3SApple OSS Distributions 264*5e3eaea3SApple OSS Distributions virtual void 265*5e3eaea3SApple OSS Distributions retain() const LOCALONLY; 266*5e3eaea3SApple OSS Distributions 267*5e3eaea3SApple OSS Distributions virtual void 268*5e3eaea3SApple OSS Distributions release() const LOCALONLY; 269*5e3eaea3SApple OSS Distributions 270*5e3eaea3SApple OSS Distributions virtual bool 271*5e3eaea3SApple OSS Distributions isEqualTo(const OSMetaClassBase * anObject) const LOCALONLY; 272*5e3eaea3SApple OSS Distributions}; 273*5e3eaea3SApple OSS Distributions#endif /* __IIG */ 274*5e3eaea3SApple OSS Distributions 275*5e3eaea3SApple OSS Distributions 276*5e3eaea3SApple OSS Distributions/*! 277*5e3eaea3SApple OSS Distributions@iig implementation 278*5e3eaea3SApple OSS Distributions#include <DriverKit/IODispatchQueue.h> 279*5e3eaea3SApple OSS Distributions@iig end 280*5e3eaea3SApple OSS Distributions*/ 281*5e3eaea3SApple OSS Distributions 282*5e3eaea3SApple OSS Distributionsclass OSObject : public OSMetaClassBase 283*5e3eaea3SApple OSS Distributions{ 284*5e3eaea3SApple OSS Distributionspublic: 285*5e3eaea3SApple OSS Distributions 286*5e3eaea3SApple OSS Distributions virtual bool 287*5e3eaea3SApple OSS Distributions init() LOCALONLY; 288*5e3eaea3SApple OSS Distributions 289*5e3eaea3SApple OSS Distributions virtual void 290*5e3eaea3SApple OSS Distributions free() LOCALONLY; 291*5e3eaea3SApple OSS Distributions 292*5e3eaea3SApple OSS Distributions virtual void 293*5e3eaea3SApple OSS Distributions retain() const override; 294*5e3eaea3SApple OSS Distributions 295*5e3eaea3SApple OSS Distributions virtual void 296*5e3eaea3SApple OSS Distributions release() const override; 297*5e3eaea3SApple OSS Distributions 298*5e3eaea3SApple OSS Distributions virtual kern_return_t 299*5e3eaea3SApple OSS Distributions SetDispatchQueue( 300*5e3eaea3SApple OSS Distributions const IODispatchQueueName name, 301*5e3eaea3SApple OSS Distributions IODispatchQueue * queue) KERNEL = 0; 302*5e3eaea3SApple OSS Distributions 303*5e3eaea3SApple OSS Distributions virtual kern_return_t 304*5e3eaea3SApple OSS Distributions CopyDispatchQueue( 305*5e3eaea3SApple OSS Distributions const IODispatchQueueName name, 306*5e3eaea3SApple OSS Distributions IODispatchQueue ** queue) KERNEL = 0; 307*5e3eaea3SApple OSS Distributions}; 308*5e3eaea3SApple OSS Distributions 309*5e3eaea3SApple OSS Distributions#define DEFN(classname, name) \ 310*5e3eaea3SApple OSS Distributionsname ## _Impl(classname ## _ ## name ## _Args) 311*5e3eaea3SApple OSS Distributions 312*5e3eaea3SApple OSS Distributions/* 313*5e3eaea3SApple OSS Distributions * Use of the IMPL macro is discouraged and should be replaced by a normal c++ 314*5e3eaea3SApple OSS Distributions * method implementation (with the all method arguments) and the name of the method 315*5e3eaea3SApple OSS Distributions * given a suffix '_Impl' 316*5e3eaea3SApple OSS Distributions */ 317*5e3eaea3SApple OSS Distributions 318*5e3eaea3SApple OSS Distributions#define IMPL(classname, name) \ 319*5e3eaea3SApple OSS Distributionsclassname :: DEFN(classname, name) 320*5e3eaea3SApple OSS Distributions 321*5e3eaea3SApple OSS Distributions/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 322*5e3eaea3SApple OSS Distributions 323*5e3eaea3SApple OSS Distributions#endif /* ! _IOKIT_UOSOBJECT_H */ 324