FROM : Shawn Erickson
DATE : Fri Jul 28 23:18:28 2006
On 7/28/06, Shaun Wexler <<email_removed>> wrote:
> On Jul 28, 2006, at 7:51 AM, matt jaffa wrote:
>
> > Is there any cocoa api or other api that can get what type of machine
> > it is. i.e. MacBook Pro, Powerbook, etc. I can easily get the machine
> > model like MacBookPro1,1.
>
> IOKit is your friend. Use it. ;)
Likely simpler to use sysctl or sysctlbyname (man 3 sysctl) and ask
for "hw.model". Also that is a more stable API then the IOKit registry
(nothing really ensures that the keys and layout of the IOKit registry
wont change).
-Shawn
DATE : Fri Jul 28 23:18:28 2006
On 7/28/06, Shaun Wexler <<email_removed>> wrote:
> On Jul 28, 2006, at 7:51 AM, matt jaffa wrote:
>
> > Is there any cocoa api or other api that can get what type of machine
> > it is. i.e. MacBook Pro, Powerbook, etc. I can easily get the machine
> > model like MacBookPro1,1.
>
> IOKit is your friend. Use it. ;)
Likely simpler to use sysctl or sysctlbyname (man 3 sysctl) and ask
for "hw.model". Also that is a more stable API then the IOKit registry
(nothing really ensures that the keys and layout of the IOKit registry
wont change).
-Shawn
| Related mails | Author | Date |
|---|---|---|
| matt jaffa | Jul 28, 16:51 | |
| Shawn Erickson | Jul 28, 16:52 | |
| Shawn Erickson | Jul 28, 16:58 | |
| matt jaffa | Jul 28, 17:53 | |
| Michael Watson | Jul 28, 18:17 | |
| Chris Vetter | Jul 28, 18:27 | |
| Shaun Wexler | Jul 28, 22:58 | |
| Shaun Wexler | Jul 28, 23:06 | |
| Shawn Erickson | Jul 28, 23:18 | |
| Shaun Wexler | Jul 29, 23:14 |






Cocoa mail archive

