os/security/cryptomgmtlibs/securityutils/source/secsettings/secsettingsclient/rsecsettingssession.cpp
Update contrib.
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of the License "Eclipse Public License v1.0"
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
15 * RSecSettingsSession implementation. See class and function definitions
26 #include <secsettings/secsettingsclient.h>
27 #include <e32property.h>
29 #include "secsettingscommon.h"
31 namespace SecuritySettingsServer
35 EXPORT_C RSecSettingsSession::RSecSettingsSession()
37 This constructor provides a single point of definition from
38 which the superclass constructor is called.
45 EXPORT_C TInt RSecSettingsSession::Connect()
47 Connect to the SecSettings server.
49 The thread which calls this function must be the same one which later calls Close().
51 @return Symbian OS error code where KErrNone indicates
52 success and any other value indicates failure.
55 TVersion v = SecuritySettingsServer::Version();
56 TUidType serverFullUid = SecuritySettingsServer::ServerImageFullUid();
58 TInt r = RScsClientBase::Connect(
59 SecuritySettingsServer::KSecSettingsServerName, v, SecuritySettingsServer::KServerImageName, serverFullUid);
73 EXPORT_C void RSecSettingsSession::Close()
75 Frees the configuration object and calls RScsClientBase::Close
77 This function MUST be called by the same thread which Connect().
80 RScsClientBase::Close();
84 EXPORT_C TInt RSecSettingsSession::SettingValueL(TUid aUidRepository, TUint32 aKey)
86 * Retrieves the value of the setting from the repository.
88 * @param aUidRepository UID of the Central Repository.
89 * @param aKey 32-bit unsigned Key identifying the setting.
90 * @return Value of the setting.
94 TIpcArgs args(aUidRepository.iUid, aKey, &p);
96 User::LeaveIfError(CallSessionFunction(ESettingValue, args));
104 } // End of namespace SecuritySettingsServer.