Chameleon

Chameleon Svn Source Tree

Root/branches/rewrite/i386/include/IOKit/audio/IOAudioSelectorControl.h

Source at commit 1129 created 12 years 11 months ago.
By meklort, Change options.o so that it reloads the system config as well. Also change it so that it uses that config for variables (NOTE: if the calue exists in chameleonConfig, it's used instead.
1/*
2 * Copyright (c) 1998-2010 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_IOAUDIOSELECTORCONTROL_H
24#define _IOKIT_IOAUDIOSELECTORCONTROL_H
25
26#ifndef IOAUDIOFAMILY_SELF_BUILD
27#include <IOKit/audio/IOAudioControl.h>
28#else
29#include "IOAudioControl.h"
30#endif
31
32class OSString;
33class OSArray;
34
35class IOAudioSelectorControl : public IOAudioControl
36{
37 OSDeclareDefaultStructors(IOAudioSelectorControl)
38
39protected:
40
41 OSArray *availableSelections;
42
43protected:
44 struct ExpansionData { };
45
46 ExpansionData *reserved;
47
48public:
49static IOAudioSelectorControl *createOutputSelector(SInt32 initialValue,
50UInt32 channelID,
51const char *channelName = 0,
52UInt32 cntrlID = 0);
53static IOAudioSelectorControl *createOutputClockSelector(SInt32 initialValue,
54 UInt32 channelID,
55UInt32 clockSource,
56 const char *channelName = 0,
57 UInt32 cntrlID = 0);
58static IOAudioSelectorControl *createInputClockSelector(SInt32 initialValue,
59 UInt32 channelID,
60UInt32 clockSource,
61 const char *channelName = 0,
62 UInt32 cntrlID = 0);
63
64 // OSMetaClassDeclareReservedUsed(IOAudioSelectorControl, 0);
65virtual IOReturn removeAvailableSelection(SInt32 selectionValue);
66 // OSMetaClassDeclareReservedUsed(IOAudioSelectorControl, 1);
67virtual IOReturn replaceAvailableSelection(SInt32 selectionValue, const char *selectionDescription);
68 // OSMetaClassDeclareReservedUsed(IOAudioSelectorControl, 2);
69virtual IOReturn replaceAvailableSelection(SInt32 selectionValue, OSString *selectionDescription);
70
71private:
72 OSMetaClassDeclareReservedUsed(IOAudioSelectorControl, 0);
73 OSMetaClassDeclareReservedUsed(IOAudioSelectorControl, 1);
74 OSMetaClassDeclareReservedUsed(IOAudioSelectorControl, 2);
75
76 OSMetaClassDeclareReservedUnused(IOAudioSelectorControl, 3);
77 OSMetaClassDeclareReservedUnused(IOAudioSelectorControl, 4);
78 OSMetaClassDeclareReservedUnused(IOAudioSelectorControl, 5);
79 OSMetaClassDeclareReservedUnused(IOAudioSelectorControl, 6);
80 OSMetaClassDeclareReservedUnused(IOAudioSelectorControl, 7);
81 OSMetaClassDeclareReservedUnused(IOAudioSelectorControl, 8);
82 OSMetaClassDeclareReservedUnused(IOAudioSelectorControl, 9);
83 OSMetaClassDeclareReservedUnused(IOAudioSelectorControl, 10);
84 OSMetaClassDeclareReservedUnused(IOAudioSelectorControl, 11);
85 OSMetaClassDeclareReservedUnused(IOAudioSelectorControl, 12);
86 OSMetaClassDeclareReservedUnused(IOAudioSelectorControl, 13);
87 OSMetaClassDeclareReservedUnused(IOAudioSelectorControl, 14);
88 OSMetaClassDeclareReservedUnused(IOAudioSelectorControl, 15);
89
90public:
91 static IOAudioSelectorControl *create(SInt32 initialValue,
92 UInt32 channelID,
93 const char *channelName = 0,
94 UInt32 cntrlID = 0,
95 UInt32 subType = 0,
96 UInt32 usage = 0);
97
98 static IOAudioSelectorControl *createInputSelector(SInt32 initialValue,
99 UInt32 channelID,
100 const char *channelName = 0,
101 UInt32 cntrlID = 0);
102
103 virtual bool init(SInt32 initialValue,
104 UInt32 channelID,
105 const char *channelName = 0,
106 UInt32 cntrlID = 0,
107 UInt32 subType = 0,
108 UInt32 usage = 0,
109 OSDictionary *properties = 0);
110
111 virtual void free();
112
113 virtual IOReturn addAvailableSelection(SInt32 selectionValue, const char *selectionDescription);
114 virtual IOReturn addAvailableSelection(SInt32 selectionValue, OSString *selectionDescription);
115
116 virtual bool valueExists(SInt32 selectorValue);
117
118 virtual IOReturn validateValue(OSObject *newValue);
119
120};
121
122#endif /* _IOKIT_IOAUDIOSELECTORCONTROL_H */
123

Archive Download this file

Revision: 1129