examples/Base/IPC/secureserver/secureclientsession.cpp

Go to the documentation of this file.
00001 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
00002 // All rights reserved.
00003 // This component and the accompanying materials are made available
00004 // under the terms of "Eclipse Public License v1.0"
00005 // which accompanies this distribution, and is available
00006 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
00007 //
00008 // Initial Contributors:
00009 // Nokia Corporation - initial contribution.
00010 //
00011 // Contributors:
00012 //
00013 // Description:
00014 // Contains the implementation of functions defined in the RSecureSession class.
00015 //
00016 
00017 
00018 
00023 #include "secureclientandserver.h"
00024 #include "secureclient.h"
00025 
00029 RSecureSession::RSecureSession()
00030         {
00031         }
00032 
00044 TInt RSecureSession::Connect()
00045         {
00046         TInt r = StartThread(iServerThread);
00047         if (r == KErrNone)
00048                 {
00049                 r = CreateSession(KSecureServerName,Version(),KDefaultMessageSlots);
00050                 }
00051         return(r);
00052         }
00053 
00059 TVersion RSecureSession::Version(void) const
00060         {
00061         return(TVersion(KSecureServMajorVersionNumber,KSecureServMinorVersionNumber,KSecureServBuildVersionNumber));
00062         }
00063 
00067 void RSecureSession::Close()
00068         {
00069         SendReceive(ESecureServerCloseSession);
00070         RHandleBase::Close();
00071         iServerThread.Close();
00072         }
00073 
00079 TInt RSecureSession::ResourceCountL()
00080         {
00081         TInt count = 0;
00082         TPckgBuf<TInt> pckgcount;
00083         TIpcArgs args(&pckgcount);
00084         User::LeaveIfError(SendReceive(ESecureServerResourceCount, args));
00085         count = pckgcount();
00086         return count;
00087         }

Generated by  doxygen 1.6.2