1/*
2 * Copyright (c) 1998-2014 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
6 * The contents of this file constitute Original Code as defined in and
7 * are subject to the Apple Public Source License Version 1.1 (the
8 * "License").  You may not use this file except in compliance with the
9 * License.  Please obtain a copy of the License at
10 * http://www.apple.com/publicsource and read it before using this file.
11 *
12 * This Original Code and all software distributed under the License are
13 * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
14 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
15 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
17 * License for the specific language governing rights and limitations
18 * under the License.
19 *
20 * @APPLE_LICENSE_HEADER_END@
21 */
22
23#ifndef _IOKIT_IOAUDIOCONTROLUSERCLIENT_H
24#define _IOKIT_IOAUDIOCONTROLUSERCLIENT_H
25
26#include <AvailabilityMacros.h>
27#include <IOKit/IOUserClient.h>
28
29#ifndef IOAUDIOFAMILY_SELF_BUILD
30#include <IOKit/audio/IOAudioTypes.h>
31#else
32#include "IOAudioTypes.h"
33#endif
34
35class IOAudioControl;
36
37class IOAudioControlUserClient : public IOUserClient
38{
39    OSDeclareDefaultStructors(IOAudioControlUserClient)
40
41protected:
42    task_t 				clientTask;
43    IOAudioControl *			audioControl;
44    IOAudioNotificationMessage *	notificationMessage;
45
46    virtual IOReturn clientClose( ) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10;
47    virtual IOReturn clientDied( ) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10;
48
49protected:
50    struct ExpansionData { };
51
52    ExpansionData *reserved;
53
54public:
55	virtual void sendChangeNotification(UInt32 notificationType ) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10;
56    // OSMetaClassDeclareReservedUsed(IOAudioControlUserClient, 1);
57    virtual bool initWithAudioControl(IOAudioControl *control, task_t owningTask, void *securityID, UInt32 type, OSDictionary *properties ) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10;
58
59private:
60    OSMetaClassDeclareReservedUsed(IOAudioControlUserClient, 0);
61    OSMetaClassDeclareReservedUsed(IOAudioControlUserClient, 1);
62
63    OSMetaClassDeclareReservedUnused(IOAudioControlUserClient, 2);
64    OSMetaClassDeclareReservedUnused(IOAudioControlUserClient, 3);
65    OSMetaClassDeclareReservedUnused(IOAudioControlUserClient, 4);
66    OSMetaClassDeclareReservedUnused(IOAudioControlUserClient, 5);
67    OSMetaClassDeclareReservedUnused(IOAudioControlUserClient, 6);
68    OSMetaClassDeclareReservedUnused(IOAudioControlUserClient, 7);
69    OSMetaClassDeclareReservedUnused(IOAudioControlUserClient, 8);
70    OSMetaClassDeclareReservedUnused(IOAudioControlUserClient, 9);
71    OSMetaClassDeclareReservedUnused(IOAudioControlUserClient, 10);
72    OSMetaClassDeclareReservedUnused(IOAudioControlUserClient, 11);
73    OSMetaClassDeclareReservedUnused(IOAudioControlUserClient, 12);
74    OSMetaClassDeclareReservedUnused(IOAudioControlUserClient, 13);
75    OSMetaClassDeclareReservedUnused(IOAudioControlUserClient, 14);
76    OSMetaClassDeclareReservedUnused(IOAudioControlUserClient, 15);
77
78public:
79    static IOAudioControlUserClient *withAudioControl(IOAudioControl *control, task_t clientTask, void *securityID, UInt32 type ) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10;
80    static IOAudioControlUserClient *withAudioControl(IOAudioControl *control, task_t clientTask, void *securityID, UInt32 type, OSDictionary *properties ) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10;
81
82    virtual bool initWithAudioControl(IOAudioControl *control, task_t owningTask, void *securityID, UInt32 type ) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10;
83
84    virtual void free( ) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10;
85
86    virtual IOReturn registerNotificationPort(mach_port_t port, UInt32 type, UInt32 refCon ) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10;
87
88    virtual void sendValueChangeNotification( ) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10;
89};
90
91#endif /* _IOKIT_IOAUDIOCONTROLUSERCLIENT_H */
92