|
1 // Copyright (c) 2008-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". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // Location Based Services PSK API |
|
15 // Note this file is not exported and remains in prototype status. |
|
16 // |
|
17 // |
|
18 |
|
19 /** |
|
20 @file |
|
21 @publishedPartner |
|
22 @prototype |
|
23 */ |
|
24 #ifndef LBS_PSK_BASE_H |
|
25 #define LBS_PSK_BASE_H |
|
26 |
|
27 |
|
28 //------------------------------------------------------------------------------- |
|
29 #include <e32base.h> |
|
30 |
|
31 //------------------------------------------------------------------------------- |
|
32 class TLbsPskParams; |
|
33 |
|
34 |
|
35 //------------------------------------------------------------------------------- |
|
36 /** |
|
37 The CLbsPskBase is the abstract interface to a licensee specific PSK plug-in responsible for |
|
38 deciding which PSK identity and value should be used to secure a connection. |
|
39 |
|
40 It is normally used by the LBS SUPL Protocol Module to secure connections to SUPL Servers. |
|
41 |
|
42 An actual implementation of a PSK plug-in will derive from CLbsPskBase to provide the specific |
|
43 implementation of the interface methods. |
|
44 |
|
45 Not yet supported/implemented. |
|
46 */ |
|
47 class CLbsPskBase : public CBase |
|
48 { |
|
49 public: |
|
50 #pragma message("NOTE: Location of the UID TBD. Possibly in the SUPL PM Central Rep file") |
|
51 #pragma message("NOTE: OR there should be only one PSK plug-in? TBD") |
|
52 |
|
53 /** Creates an instance of the CLbsPskBase implementation with the given Uid. |
|
54 |
|
55 @param aImplementationUid [In] Identifies the plug-in to load. |
|
56 @param aParams [In] The parameters passed to the plug-in when it is instantiated. |
|
57 Currently not used. |
|
58 |
|
59 */ |
|
60 IMPORT_C static CLbsPskBase* NewL(TUid aImplementationUid, TLbsPskParams& aParams); |
|
61 |
|
62 /** Called during the TLS PSK handshake to get the PSK identity and value to be used to secure the connection. |
|
63 |
|
64 @param aHostNameAddress [In] A pointer to a string containing an address of a server. |
|
65 The pointer may be NULL if the address is unknown. Data ownership is not passed. |
|
66 @param aPskIdentityHint [In] A pointer to a string containing a "PSK identity hint". |
|
67 The pointer may be NULL if the hint is unknown. Data ownership is not passed. |
|
68 @param aPskIdentity [Out] NULL passed in, must be set to an HBufC8 containing the PSK Identity to be used. |
|
69 Data ownership is passed back to the caller. |
|
70 @param aPskKey [Out] NULL passed in, must be set to an HBufC8 containing the PSK key value to be used. |
|
71 Data ownership is passed back to the caller. |
|
72 |
|
73 Note that the meaning of the PSK identity hint is NOT defined by the TLS standard, therefore any application |
|
74 using PSK must previously agree the source of the PSK to be used and the interpretation of the (optional) PSK identity |
|
75 hint.*/ |
|
76 virtual void GetPskL(const TDesC8* aHostNameAddress, const TDesC8* aPskIdentityHint, HBufC8*& aPskIdentity, HBufC8*& aPskKey) = 0; |
|
77 |
|
78 |
|
79 /** |
|
80 Standard destructor that handles the ECom destruction. |
|
81 The LBS subsystem invokes the destructor when it wishes to |
|
82 unload the module. */ |
|
83 IMPORT_C ~CLbsPskBase(); |
|
84 |
|
85 /** Currently not implemented */ |
|
86 IMPORT_C virtual TAny* ExtendedInterface(TInt aFunctionNumber, TAny* aPtr1, TAny* aPtr2); |
|
87 |
|
88 private: |
|
89 //** Prohibit copy constructor */ |
|
90 CLbsPskBase(const CLbsPskBase&); |
|
91 //** Prohibit assigment operator */ |
|
92 CLbsPskBase& operator= (const CLbsPskBase&); |
|
93 |
|
94 private: |
|
95 /** Reserved for future use */ |
|
96 TAny* iReserved; |
|
97 |
|
98 /** Instance identifier key */ |
|
99 TUid iDtor_ID_Key; |
|
100 }; |
|
101 |
|
102 |
|
103 //------------------------------------------------------------------------------- |
|
104 /** Reserved for future use */ |
|
105 class TLbsPskParams |
|
106 { |
|
107 /** Default constructor */ |
|
108 IMPORT_C TLbsPskParams(); |
|
109 |
|
110 private: |
|
111 TUint8 iReserved[16]; |
|
112 }; |
|
113 |
|
114 #endif //LBS_PSK_BASE_H |