fmorrow/SMCWrapper — pull request #2 by perfaram (2014-12-11 16:51:48+00:00)
Title: Refactored code

Hi !
I refactored the code, adding functions, making other ones deprecated (but keeping support), and made the interface a bit more consistent (across function names, e.g. readKey:AsString, but readKey:intoNumber).
I made some functions private, and added an underline to distinguish them.
Here are the details :
* Renamed and made private IOService functions (_smcOpen, _smcClose, _smcCall)
* Helper functions (_strtoul, _ultostr) are private too
* Deprecated :
* SMCReadKey:outputValue (replaced by _smcReadKey:toValue:)
* SMCCall:forKeyData:outputKeyDataIn (by _smcCall:forKeyData:toKeyData )
* getStringRepresentation:forSize:ofType:inBuffer (became stringRepresentationForBytes:withSize:ofType:inBuffer:)
* readKey:AsString: (by readKey:IntoString) *not sure about this one, tell me how you feel*
* Added :
* ``` -(UInt32) _smcIndexCount;```
* ```-(BOOL) dumpToValueDict:(NSMutableDictionary**)valDict andTypeDict:(NSMutableDictionary**)typeDict;```
* ```-(SMCVal_t) createEmptyValue;```
* ```-(BOOL) readKey:(NSString *)key intoVal:(SMCVal_t *)val;```
* ```-(BOOL) stringRepresentationForBytes: (SMCBytes_t)bytes
withSize: (UInt32)dataSize
ofType: (UInt32Char_t)dataType
inBuffer: (char *)str;```
* ```-(BOOL) stringRepresentationForBytes: (SMCBytes_t)bytes
withSize: (UInt32)dataSize
ofType: (UInt32Char_t)dataType
toNSString: (NSString**)abri;```
* ```-(BOOL) stringRepresentationOfVal:(SMCVal_t)val
inBuffer: (char *)str;```
* ```-(BOOL) stringRepresentationOfVal:(SMCVal_t)val
toNSString:(NSString**)abri;```