Re: How to determine host is a laptop?
site_archiver@lists.apple.com Delivered-To: Darwin-dev@lists.apple.com Hi, Andre On 9-Oct-05, at 11:04 , Shaun Wexler wrote: _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/ajmas%40sympatico.ca This email sent to ajmas@sympatico.ca _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... Interesting. Other than assuming the portabilitty based on a certain characteristics, such as name, I am not so sure there is a way, since it almost an issue of symantics. If you are happy using an approach based on characteristics assumptions, then the best one would be the presence of a battery, since this is one thing that portables have built in to this date, that desktops don't. I am not sure what you are trying to do exactly, but if I was writing an application I would allow the user to have last say, in whether the computer is portable or not. This way, if my assumption did fail at some point, the user would not be left with a computer in the wrong state. If you are doing something that is based on power consumption issues, then maybe a test to find out whether it is plugged in or not would be good, so the program can adjust based on computer state. What is the Apple-approved method for determining the portability of the local host hardware? I need to enforce certain behavior if the host is a laptop, and other behavior if the host is a tower/ desktop. My first thoughts were to parse 'compatible' for "PowerMac" and "PowerBook", but I want to remain forward- compatible. Is this the correct approach? -- Shaun Wexler MacFOH http://www.macfoh.com This email sent to site_archiver@lists.apple.com
participants (1)
-
André-John Mas