1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255
| /*
Copyright (c) 2006, Intel Corporation.
This Intel Laptop Gaming TDK ("Software") is furnished under license and may
only be used or copied in accordance with the terms of that license. No license,
express or implied, by estoppel or otherwise, to any intellectual property rights
is granted by this document. The Software is subject to change without notice,
and should not be construed as a commitment by Intel Corporation to market,
license, sell or support any product or technology. Unless otherwise provided
for in the license under which this Software is provided, the Software is
provided AS IS, with no warranties of any kind, express or implied.
Except as expressly permitted by the Software license, neither Intel Corporation
nor its suppliers assumes any responsibility or liability for any errors or
inaccuracies that may appear herein. Except as expressly permitted by the
Software license, no part of the Software may be reproduced, stored in a
retrieval system, transmitted in any form, or distributed by any means
without the express written consent of Intel Corporation.
*/
/**
* This is a higher level class which provides access to classes defined
* for individual devices. This class is exposed to user and control
* creation and deletion of objects as needed
*/
#ifndef INTELGAMINGTDKAPI_H
#define INTELGAMINGTDKAPI_H
//#define MADLL_EXPORTS
#ifdef MADLL_EXPORTS
#define LINKDLL __declspec(dllexport)
#pragma message("Building DLL" )
#else
#define LINKDLL __declspec(dllimport)
#pragma message("Importing DLL" )
#endif
#include "ILGdefines.h"
#include "ILGAbstractEventInfo.h"
class PowerInfo;
class ProcessorInfo;
class NetworkInfo;
class DisplayInfo;
class BandwidthInfo;
#ifdef __cplusplus // If used by C++ code,
#pragma message("using extern 'C' instruction" )
extern "C" { // we need to export the C interface
#endif
class LINKDLL IntelLaptopGamingTDKInterface
{
private:
PowerInfo* m_PowerInfo;
NetworkInfo* m_NetworkInfo;
DisplayInfo* m_DisplayInfo;
ProcessorInfo* m_ProcessorInfo;
BandwidthInfo* m_BandwidthInfo;
static bool bInitialize;
static bool m_bVista;
static bool m_bx64;
protected:
IntelLaptopGamingTDKInterface();
static IntelLaptopGamingTDKInterface* Interface;
public:
/**
* Static function to get instance of pointer to IntelLaptopGamingTDKInterface
* class
*/
static IntelLaptopGamingTDKInterface* GetTDKInterface();
/**
* Standard destructor
*/
~IntelLaptopGamingTDKInterface();
// Properties
/**
* Start the threaded model offered by the TDK to get updates to
* specified events/properties.
* This function takes in pointer to 'Notifiable' class implemented
* by the client to call back into caller site.
*/
void RegisterEventObserver(int event, Notifiable* m_pNot, int WatchForValue = -1, int UpdateFreq = 2000);
/**
* Halt the threaded model offered by the TDK.
*/
void UnregisterEventObserver(int event);
/**
* Checks if the current system is a laptop
*/
virtual bool IsLaptop();
/**
* Get current power source
*/
PowerSource GetPowerSrc();
/**
* Get percent battery life left
*/
int GetPercentBatteryLife();
/**
* Get battery life time remaining
*/
unsigned long GetSecBatteryLifeTimeRemaining();
/**
* Get current power scheme of the system
*/
PowerScheme GetCurrentPowerScheme();
/**
* Set power scheme for the system
*/
bool SetCurrentPowerScheme(PowerScheme new_scheme);
/**
* Get 802.11 signal strength
*/
int Get80211SignalStrength();
/**
* Is wireless adapter connected to network
*/
bool IsWirelessAdapterConnected();
/**
* Is wireless adapter enabled
*/
bool IsWirelessAdapterEnabled();
/**
* Get list of all adapters on the system
*/
char** GetAllNetworkAdapters(int* cnt);
/**
* Get IP address
*/
char** GetIPAddresses(int* cnt);
/**
*
*/
char* GetConnectedAdapter(char* adapterName,int bufferSize);
void ReleaseMem(unsigned char* ptr);
/**
* Get current Tx Rate in bytes/sec
*/
unsigned long GetCurrentTxRate();
/**
* Get current Rx Rate in bytes/sec
*/
unsigned long GetCurrentRxRate();
/**
* Get Tx + Rx rate in bytes/sec
*/
unsigned long GetTotalTxRxRate();
/**
* Get current dislay resolution. Returned as struct
*/
Resolution GetDisplayResolution();
/**
* Set display resolution e.g. 1024x768
*/
bool SetDisplayResolution(Resolution res);
/**
* Set color depth for display properties
*/
bool SetDisplayColorDepth(int depth);
/**
* Set display screen brightness
*/
bool SetDisplayScreenBrightness(float brightness);
/**
* Get display color depth
*/
int GetDisplayColorDepth();
/**
* Get display screen brightness
*/
float GetDisplayScreenBrightness();
/**
* Restore original screen brightness
*/
bool RestoreOriginalBrightness();
/**
* Get number of core on per physical processor
*/
unsigned int GetNumCoresPerProcessor();
/**
* Get total number of processors as seen by OS
*/
unsigned int GetNumProcessors();
/**
* Get number of active threads for a process
*/
int GetNumActiveThreadsForProcess(const char* ProcessName);
/**
* Get current CPU utilization
*/
int GetCurrentCPUUtilization(int CpuNum = -1);
/**
* Get current processor frequency
*/
unsigned long GetCurrentCPUFrequency();
/**
* Get maximum frequency
*/
unsigned long GetMaxCPUFrequency();
};
#ifdef __cplusplus
}
#endif
typedef IntelLaptopGamingTDKInterface* (*Type_GetTDKInterface)();
/*typedef bool (*Type_IsLaptop)();
typedef char* (*Type_GetConnectedAdapter)(char*, int);
typedef bool (*Type_IsWirelessAdapterConnected)();
typedef int (*Type_Get80211SignalStrength)();
typedef int (*Type_GetPercentBatteryLife)();
typedef PowerSource (*Type_GetPowerSrc)();
typedef unsigned long (*Type_GetSecBatteryLifeTimeRemaining)();
*/
#endif INTELGAMINGTDKAPI_H |
Partager