|
1 /* |
|
2 * Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "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". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Class is used for configuring secure RTP. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 #ifndef MMCCSECURECINTERFACE_H |
|
22 #define MMCCSECURECINTERFACE_H |
|
23 |
|
24 // INCLUDES |
|
25 #include <e32base.h> |
|
26 //#include "mmccinterface_stub.h" |
|
27 // CONSTANTS |
|
28 const TInt KMccLinkSecure = 110; |
|
29 |
|
30 // FORWARD DECLARATIONS |
|
31 class CMccInterface; |
|
32 /** |
|
33 * MCC subsystem client interface for secure sessions. |
|
34 * |
|
35 * @lib mmccinterface.lib |
|
36 */ |
|
37 class CMccSecureInterface : public CBase |
|
38 { |
|
39 public: // Constructors and destructor |
|
40 |
|
41 /** |
|
42 * Two-phased constructor. |
|
43 * @param aInterface reference to MCC interface. |
|
44 * @return CMccSecureInterface* Pointer to the secure interface object created |
|
45 */ |
|
46 IMPORT_C static CMccSecureInterface* NewL( CMccInterface& aInterface ); |
|
47 |
|
48 /** |
|
49 * Destructor. |
|
50 */ |
|
51 virtual ~CMccSecureInterface(); |
|
52 |
|
53 public: // New functions |
|
54 |
|
55 /** |
|
56 * Creates new crypto context. |
|
57 * @since Series 60 3.2 |
|
58 * @param aMasterKey The master key value. |
|
59 * @param aSaltKey The master salt value. |
|
60 * @param aContextId ID of the new context if successful. |
|
61 * @param aParams Crypto context optional parameters. |
|
62 * @return KErrNone if success; otherwise system wide error code. |
|
63 */ |
|
64 IMPORT_C TInt CreateContext( const TDesC8& aMasterKey, const TDesC8& aSaltKey, |
|
65 TUint32& aContextId, const TDesC8& aParams ); |
|
66 |
|
67 /** |
|
68 * Updates existing crypto context. |
|
69 * @since Series 60 3.2 |
|
70 * @param aMasterKey The master key value. |
|
71 * @param aSaltKey The master salt value. |
|
72 * @param aContextId ID of the updated context. |
|
73 * @param aParams Crypto context optional parameters. |
|
74 * @return KErrNone if success; otherwise system wide error code. |
|
75 */ |
|
76 IMPORT_C TInt UpdateContext( const TDesC8& aMasterKey, const TDesC8& aSaltKey, |
|
77 TUint32 aContextId, const TDesC8& aParams ); |
|
78 /** |
|
79 * Removes existing crypto context. |
|
80 * @since Series 60 3.2 |
|
81 * @param aContextId ID of the context to be removed. |
|
82 * @return KErrNone if success; otherwise system wide error code. |
|
83 */ |
|
84 IMPORT_C TInt RemoveContext( TUint32 aContextId ); |
|
85 |
|
86 /** |
|
87 * Binds crypto context into stream. Binding must be done |
|
88 * before stream is prepared. |
|
89 * @since Series 60 3.2 |
|
90 * @param aSessionId ID of session. |
|
91 * @param aLinkId ID of link. |
|
92 * @param aStreamId ID of stream. |
|
93 * @param aEndpointId ID identifying endpoint of the stream. |
|
94 * @param aContextId ID of context. |
|
95 * @return KErrNone if success; otherwise system wide error code. |
|
96 */ |
|
97 IMPORT_C TInt Bind( TUint32 aSessionId, TUint32 aLinkId, |
|
98 TUint32 aStreamId, TUint32 aEndPointId, |
|
99 TUint32 aContextId ); |
|
100 |
|
101 private: |
|
102 |
|
103 /** |
|
104 * C++ default constructor. |
|
105 */ |
|
106 CMccSecureInterface( CMccInterface& aController ); |
|
107 |
|
108 /** |
|
109 * By default Symbian 2nd phase constructor is private. |
|
110 */ |
|
111 void ConstructL( ); |
|
112 |
|
113 private: |
|
114 |
|
115 /** |
|
116 * Instance of Mcc interface. |
|
117 */ |
|
118 CMccInterface& iInterface; |
|
119 |
|
120 /** |
|
121 * Contains unique ID of controller interface |
|
122 */ |
|
123 //TMMFMessageDestinationPckg iMessageDest; |
|
124 |
|
125 /** |
|
126 * Handle to the controller plugin for sending custom commands |
|
127 */ |
|
128 //RMMFController iController; |
|
129 |
|
130 /** |
|
131 * Crypto context container for context containing and handling |
|
132 * Own. |
|
133 */ |
|
134 //CMccCryptoContextContainer* iContextContainer; |
|
135 |
|
136 TUint32 iContextCounter; |
|
137 |
|
138 TUint32 iContextId1; |
|
139 TUint32 iContextId2; |
|
140 TBool iContextId1Binded; |
|
141 TBool iContextId2Binded; |
|
142 }; |
|
143 |
|
144 #endif /* MMCCSECUREINTERFACE_H */ |