Update contrib.
1 // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
17 #include "SaPrivate.h"
20 The function starts SysAgt2 server.
22 SysAgt2 server does not offer any functionality other than registering system
23 software P&S properties. This method is redundant and not used by system
24 software, hence it is deprecated and will be removed in a future release. It
25 should also be considered an internal API not for use outside of Symbian even
26 though it is classified as publishedAll. Its interface access scope was
27 incorrectly set when introduced.
29 @return KErrNone The server was started successfully. <BR>
30 KErrAlreadyExists An instance of the server already exists. <BR>
31 KErrGeneral The server panicked at the startup. <BR>
32 Some other system-wide error codes.
34 @deprecated Redundant method no longer used by system software
36 EXPORT_C TInt StartSysAgt2()
39 const TUid KSystemAgentExeUid = {0x10204FC5};
40 const TUidType serverUid(KNullUid, KNullUid, KSystemAgentExeUid);
42 TInt err = server.Create(KSystemAgentServerImageName, KNullDesC, serverUid);
48 server.Rendezvous(stat);
49 if(stat != KRequestPending)
51 server.Kill(0); // abort startup
55 server.Resume(); // logon OK - start the server
57 User::WaitForRequest(stat); // wait for start or death
58 // we can't use the 'exit reason' if the server panicked as this
59 // is the panic 'reason' and may be '0' which cannot be distinguished
61 err = server.ExitType() == EExitPanic ? KErrGeneral : stat.Int();