|
1 // Copyright (c) 2006-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 the License "Symbian Foundation License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // rsecureasbase.h |
|
15 // Definition of base class for secure sessions |
|
16 // |
|
17 // |
|
18 |
|
19 |
|
20 |
|
21 /** |
|
22 @file |
|
23 @internalTechnology |
|
24 */ |
|
25 |
|
26 |
|
27 #ifndef __LBSSECURESESSIONBASE_H__ |
|
28 #define __LBSSECURESESSIONBASE_H__ |
|
29 |
|
30 #include <e32std.h> |
|
31 #include "tserverstartparams.h" |
|
32 #include "lbsmessageenums.h" |
|
33 |
|
34 NONSHARABLE_CLASS(RSecureSessionBase) : public RSessionBase |
|
35 { |
|
36 public: |
|
37 TInt Connect(TServerStartParams& aParams); |
|
38 virtual void Close(); |
|
39 virtual TVersion Version() = 0; |
|
40 virtual TInt StartServer(TServerStartParams& aParams); |
|
41 }; |
|
42 |
|
43 NONSHARABLE_CLASS(RSecureSubSessionBase) : public RSubSessionBase |
|
44 { |
|
45 public: |
|
46 // template code MUST be inlined |
|
47 template <class S, class T> |
|
48 inline TInt Open(RSecureSessionBase& aServer, S& aSubSessionType, T& aOpenData); |
|
49 //TInt Open(RSecureSessionBase& aServer, const TInt& aOpenData); |
|
50 virtual void Close(); |
|
51 }; |
|
52 |
|
53 template<class S, class T> |
|
54 TInt RSecureSubSessionBase::Open(RSecureSessionBase& aServer, S& aSubSessionType, T& aOpenData) |
|
55 { |
|
56 TPckg<S> subSessPckg(aSubSessionType); |
|
57 TPckg<T> openPckg(aOpenData); |
|
58 //TPckg<TInt> openPckg(aOpenData); |
|
59 TIpcArgs args(&subSessPckg, &openPckg); |
|
60 return CreateSubSession(aServer, ESecureSubSessionBaseOpen, args); |
|
61 } |
|
62 |
|
63 |
|
64 #endif // __LBSSECURESESSSIONBASE_H__ |