PEP 55 Update license on source files to current license text and date
[tpot/pegasus/.git] / src / Providers / linux / ProviderSupport / DeviceLocator / Ix86ProcessorLocatorPlugin.h
1 //%2003////////////////////////////////////////////////////////////////////////
2 //
3 // Copyright (c) 2000, 2001, 2002  BMC Software, Hewlett-Packard Development
4 // Company, L. P., IBM Corp., The Open Group, Tivoli Systems.
5 // Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L. P.;
6 // IBM Corp.; EMC Corporation, The Open Group.
7 //
8 // Permission is hereby granted, free of charge, to any person obtaining a copy
9 // of this software and associated documentation files (the "Software"), to
10 // deal in the Software without restriction, including without limitation the
11 // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
12 // sell copies of the Software, and to permit persons to whom the Software is
13 // furnished to do so, subject to the following conditions:
14 // 
15 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
16 // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
17 // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
18 // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
19 // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
20 // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
21 // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 //
24 //==============================================================================
25 //
26 // Author: Christopher Neufeld <neufeld@linuxcare.com>
27 //         David Kennedy       <dkennedy@linuxcare.com>
28 //
29 // Modified By: David Kennedy       <dkennedy@linuxcare.com>
30 //              Christopher Neufeld <neufeld@linuxcare.com>
31 //              Al Stone            <ahs3@fc.hp.com>
32 //
33 //%////////////////////////////////////////////////////////////////////////////
34
35 #ifndef Pegasus_Ix86ProcessorLocatorPlugin_h
36 #define Pegasus_Ix86ProcessorLocatorPlugin_h
37
38 /* The Device Locator class is responsible for providing a consistant
39  * interface to enumerating devices of many different types.
40  * The initial implementation of this class will be for Linux but
41  * it also could be ported to other operating systems.
42  *
43  * This file is a virtual base class used to build plugins for the 
44  * Device Locator class
45  */
46
47 #include <Pegasus/Common/Config.h>
48 #include "DeviceLocatorPlugin.h"
49 #include "FileReader.h"
50
51 /* Device list */
52
53 #include "DeviceTypes.h"
54
55 PEGASUS_NAMESPACE_BEGIN
56
57 class Ix86ProcessorLocatorPlugin : public DeviceLocatorPlugin {
58
59 public:
60         Ix86ProcessorLocatorPlugin();
61
62         ~Ix86ProcessorLocatorPlugin();
63
64         /* Sets the device search criteria.
65          * Returns 0 for no error or -1 if it is unable to search for that type. 
66          * Calling this function resets the locator pointer */
67         int setDeviceSearchCriteria(Uint16 base_class,
68                                     Uint16 subclass = WILDCARD_DEVICE,
69                                     Uint16 prog_if = WILDCARD_DEVICE);
70         /* Returns a pointer to a DeviceInformation class or NULL if the last device of that type was located.
71          * This method allocated the DeviceInformation object */
72         DeviceInformation *getNextDevice(void);
73
74 private:
75         Uint16 baseClass;
76         Uint16 subClass;
77         Uint16 progIF;
78
79         FileReader *fileReader;
80 };
81
82 PEGASUS_NAMESPACE_END
83
84 #endif