July 13th, 2007 03:00 PM
How to get Restart,Shutdown .... events
My first query is what are different automation testing tools are available in Mac?
I have written a network application in cocoa.
In my application I want to capture the Logout,Restart,Shutdown events.
Based on these events I want to send some message to my server.
After reading the documentation on internet regarding system events I came to know that whenever user choose "Shutdown" or "Restart" from the Apple Menu the running application gets "KAEQuitApplication" event but not any specific event whether the application is quiting by "Shutdown" or "Restart" or "Log Out". The "KAEQuitApplication" event also get by the user when he/she quit their application by clicking at the top left cross button of the application window.
I m looking to get the specific event related with each action taken by the user i.e. "Shutdown" or "Restart" or "Log Out".
Is it possible to get the different event for each of the action taken by the user i.e. "Shutdown" or "Restart" or "Log Out"?.
suggest me some imp link or sample code.
waiting for the reply.
July 14th, 2007 07:15 PM
sorry im not offering advice here, but isnt that invasion of privacy...?
July 16th, 2007 09:42 AM
Originally Posted by striker0204
And sorry, I'm only after installing Mac OS X for the first time over the weekend so not familiar with it.
July 16th, 2007 10:17 AM
Restart ,Shutdonw events
I don't think capturing the event of shutdown,restart .... is relate with privacy.
I think Microsoft provide the these events then why not Apple. It may be but I m unable to find out the solution.
Last edited by sunilp2011; July 16th, 2007 at 10:20 AM.
July 16th, 2007 11:05 AM
I do not think that there is a privacy issue here, other than from a security angle.
If a user Logs Out, then the session should be closed and any cookies erased. It is a conscious request that must be responded to accordingly.
Restart or Shutdown are the same.......... and identical to system crashes, power outs. The user merely terminates the connection. This may be willing or unwilling, you have no way of telling as that is "client side".
You now have just two possible scenarios:
1. The user requests closure
2. The contact is terminated for "some reason"
In the first instance the response is simple. In the second scenario the response will depend upon user requirements. I would suspect that something like a session validation check every "x" minutes, then close the session if there is no response from the client.
The simplest and safest approach is to close the session on loss of contact. All you need to log is if it was requested or just happened. That way you minimise the risk of session hijacking.
From the client side you should be able to determine the "abrupt" terminations, but not an orderly shutdown request, as this is not an "event", it is someone using an application within its normal parameters.
You should be able to detect a requested shutdown
1. Shut Down Machine or Restart ( no significant difference as shutdown happens in both cases)
2. User Logout/Change (should close open applications)
3. Close Application
You then assume that anything that does not do that is a systems crash of some sort, or a power down. You have no choice there, as neither the application nor the OS will have the opportunity to report the plug being pulled.
Items #1 ~ #3 above would be kicked off by "system" at the request of "user"........... assuming that "user" has the proper authorities.
If you cannot do someone any good: don't do them any harm....
As long as you did this to one of these, the least of my little ones............you did it unto Me.
What profiteth a man if he gains the entire World at the expense of his immortal soul?
July 18th, 2007 08:03 AM
is not possible to capture the Restart,Shutdown,Log Out events in Macintosh?
Then How can I get the notification that user session is ending whenever the user Restart ,Shutdown or Log Out the machine?
waiting for the positive response.
By spamdies in forum Site Feedback/Questions/Suggestions
Last Post: July 27th, 2006, 12:33 PM
By Barov4e in forum Programming Security
Last Post: November 22nd, 2005, 07:29 AM
By !mitationRust in forum Microsoft Security Discussions
Last Post: November 10th, 2005, 11:20 AM
By Palemoon in forum AntiOnline's General Chit Chat
Last Post: August 14th, 2003, 04:42 AM
By t2k2 in forum IDS & Scanner Discussions
Last Post: May 26th, 2003, 11:17 PM