@@ -24,7 +24,7 @@ namespace Tizen.Security.TEEC
24
24
/// <summary>
25
25
/// This type denotes Session Login Method used in OpenSession
26
26
/// </summary>
27
- /// <since_tizen> 4 </since_tizen>
27
+ /// <since_tizen> 3 </since_tizen>
28
28
public class LoginMethod
29
29
{
30
30
/// <summary>No login data is provided.</summary>
@@ -40,7 +40,7 @@ public class LoginMethod
40
40
/// <summary>
41
41
/// This type denotes Value parameter
42
42
/// </summary>
43
- /// <since_tizen> 4 </since_tizen>
43
+ /// <since_tizen> 3 </since_tizen>
44
44
public enum TEFValueType : UInt32
45
45
{
46
46
/// <summary>The Parameter is a ValueType tagged as input.</summary>
@@ -55,7 +55,7 @@ public enum TEFValueType : UInt32
55
55
/// This type denotes TempMemoryReference parameter
56
56
/// describing a region of memory which needs to be temporarily registered for the duration of the operation.
57
57
/// </summary>
58
- /// <since_tizen> 4 </since_tizen>
58
+ /// <since_tizen> 3 </since_tizen>
59
59
public enum TEFTempMemoryType : UInt32
60
60
{
61
61
/// <summary>The Parameter is a TempMemoryType and is tagged as input.</summary>
@@ -69,7 +69,7 @@ public enum TEFTempMemoryType : UInt32
69
69
/// <summary>
70
70
/// This type denotes SharedMemoryReference parameter
71
71
/// </summary>
72
- /// <since_tizen> 4 </since_tizen>
72
+ /// <since_tizen> 3 </since_tizen>
73
73
public enum TEFRegisteredMemoryType : UInt32
74
74
{
75
75
/// <summary>The Parameter is a Registered Memory Reference that refers to the entirety of its parent Shared Memory block.</summary>
@@ -85,7 +85,7 @@ public enum TEFRegisteredMemoryType : UInt32
85
85
/// <summary>
86
86
/// This type denotes SharedMemory access direction
87
87
/// </summary>
88
- /// <since_tizen> 4 </since_tizen>
88
+ /// <since_tizen> 3 </since_tizen>
89
89
[ Flags ]
90
90
public enum SharedMemoryFlags : UInt32
91
91
{
@@ -101,7 +101,7 @@ public enum SharedMemoryFlags : UInt32
101
101
/// This type denotes a Shared Memory block which has either been registered
102
102
/// with the implementation or allocated by it.
103
103
/// </summary>
104
- /// <since_tizen> 4 </since_tizen>
104
+ /// <since_tizen> 3 </since_tizen>
105
105
public sealed class SharedMemory
106
106
{
107
107
internal Interop . TEEC_SharedMemory shm ;
@@ -112,15 +112,15 @@ internal SharedMemory(Interop.TEEC_SharedMemory shm)
112
112
/// <summary>
113
113
/// This property represents shared memory size in bytes.
114
114
/// </summary>
115
- /// <since_tizen> 4 </since_tizen>
115
+ /// <since_tizen> 3 </since_tizen>
116
116
public UInt32 Size
117
117
{
118
118
get { return shm . size ; }
119
119
}
120
120
/// <summary>
121
121
/// This property represents start address of shared memory block.
122
122
/// </summary>
123
- /// <since_tizen> 4 </since_tizen>
123
+ /// <since_tizen> 3 </since_tizen>
124
124
public IntPtr Address
125
125
{
126
126
get { return shm . buffer ; }
@@ -130,7 +130,7 @@ public IntPtr Address
130
130
/// This function makes a copy and is designed for convenient operations on small buffers.
131
131
/// For large buffers direct address should be used.
132
132
/// </summary>
133
- /// <since_tizen> 4 </since_tizen>
133
+ /// <since_tizen> 3 </since_tizen>
134
134
/// <param name="data">Source data buffer to copy data from</param>
135
135
/// <param name="dstOffs">Starting offset in source shared memory</param>
136
136
/// <exception cref="InvalidOperationException">The operation is invalid.</exception>
@@ -143,7 +143,7 @@ public void SetData(byte[] data, int dstOffs)
143
143
/// This function makes a copy and is designed for convenient operations on small buffers.
144
144
/// For large buffers direct address should be used.
145
145
/// </summary>
146
- /// <since_tizen> 4 </since_tizen>
146
+ /// <since_tizen> 3 </since_tizen>
147
147
/// <param name="data">Destination data buffer to copy data into</param>
148
148
/// <param name="dstOffs">Starting offset in destination shared memory</param>
149
149
/// <exception cref="InvalidOperationException">The operation is invalid.</exception>
@@ -159,7 +159,7 @@ public void GetData(byte[] data, int srcOffs)
159
159
/// also used for cancellation of operations, which may be desirable even if no payload is passed.
160
160
/// Parameters are used to exchange data between CA and TA
161
161
/// </summary>
162
- /// <since_tizen> 4 </since_tizen>
162
+ /// <since_tizen> 3 </since_tizen>
163
163
public abstract class Parameter
164
164
{
165
165
internal Parameter ( uint t )
@@ -172,7 +172,7 @@ internal Parameter(uint t)
172
172
/// <summary>
173
173
/// This type defines a template for parameter types.
174
174
/// </summary>
175
- /// <since_tizen> 4 </since_tizen>
175
+ /// <since_tizen> 3 </since_tizen>
176
176
public abstract class BaseParameter < TEnum > : Parameter where TEnum : struct , IComparable , IFormattable , IConvertible // as close to Enum as possible
177
177
{
178
178
internal BaseParameter ( TEnum t ) : base ( ( uint ) ( object ) t )
@@ -183,20 +183,20 @@ internal BaseParameter(TEnum t) : base((uint)(object)t)
183
183
/// <summary>
184
184
/// This property represents access type to this parameter.
185
185
/// </summary>
186
- /// <since_tizen> 4 </since_tizen>
186
+ /// <since_tizen> 3 </since_tizen>
187
187
public TEnum Type { get ; }
188
188
}
189
189
190
190
/// <summary>
191
191
/// This type defines a temporary memory reference.
192
192
/// </summary>
193
- /// <since_tizen> 4 </since_tizen>
193
+ /// <since_tizen> 3 </since_tizen>
194
194
public sealed class TempMemoryReference : BaseParameter < TEFTempMemoryType >
195
195
{
196
196
/// <summary>
197
197
/// Constructs Prameter object which holds info about temporary memory copied to/from TA
198
198
/// </summary>
199
- /// <since_tizen> 4 </since_tizen>
199
+ /// <since_tizen> 3 </since_tizen>
200
200
/// <param name="buffer">Address of allocated memory buffer</param>
201
201
/// <param name="size">Size of the buffer</param>
202
202
/// <param name="type">Kind of access allowed for TA <see cref="TEFTempMemoryType"/></param>
@@ -209,25 +209,25 @@ public TempMemoryReference(IntPtr buffer, uint size, TEFTempMemoryType type) :
209
209
/// <summary>
210
210
/// This property represents memory address of buffer.
211
211
/// </summary>
212
- /// <since_tizen> 4 </since_tizen>
212
+ /// <since_tizen> 3 </since_tizen>
213
213
public IntPtr Buffer { get ; }
214
214
/// <summary>
215
215
/// This property represents size of buffer.
216
216
/// </summary>
217
- /// <since_tizen> 4 </since_tizen>
217
+ /// <since_tizen> 3 </since_tizen>
218
218
public uint Size { get ; }
219
219
} ;
220
220
221
221
/// <summary>
222
222
/// This type defines a memory reference that uses a pre-registered or pre-allocated Shared Memory block.
223
223
/// </summary>
224
- /// <since_tizen> 4 </since_tizen>
224
+ /// <since_tizen> 3 </since_tizen>
225
225
public sealed class RegisteredMemoryReference : BaseParameter < TEFRegisteredMemoryType >
226
226
{
227
227
/// <summary>
228
228
/// Constructs Prameter object which holds info about registered memory shared with TA
229
229
/// </summary>
230
- /// <since_tizen> 4 </since_tizen>
230
+ /// <since_tizen> 3 </since_tizen>
231
231
/// <param name="parent">Shared memory - registered or allocated</param>
232
232
/// <param name="size">Size of the buffer part</param>
233
233
/// <param name="offset">Offset of buffer in shared memory</param>
@@ -242,31 +242,31 @@ public RegisteredMemoryReference(SharedMemory parent, uint size, uint offset, TE
242
242
/// <summary>
243
243
/// This property represents SharedMemory that is referred to.
244
244
/// </summary>
245
- /// <since_tizen> 4 </since_tizen>
245
+ /// <since_tizen> 3 </since_tizen>
246
246
public SharedMemory Parent { get ; }
247
247
/// <summary>
248
248
/// This property represents size (in bytes) of SharedMemory.
249
249
/// </summary>
250
- /// <since_tizen> 4 </since_tizen>
250
+ /// <since_tizen> 3 </since_tizen>
251
251
public uint Size { get ; }
252
252
/// <summary>
253
253
/// This property represents offset (in bytes) from the begin of SharedMemory.
254
254
/// </summary>
255
- /// <since_tizen> 4 </since_tizen>
255
+ /// <since_tizen> 3 </since_tizen>
256
256
public uint Offset { get ; }
257
257
} ;
258
258
259
259
/// <summary>
260
260
/// This type defines a parameter that is not referencing shared memory, but carries instead small raw data
261
261
/// passed by value.
262
262
/// </summary>
263
- /// <since_tizen> 4 </since_tizen>
263
+ /// <since_tizen> 3 </since_tizen>
264
264
public sealed class Value : BaseParameter < TEFValueType >
265
265
{
266
266
/// <summary>
267
267
/// Constructs Prameter object which holds info about int values copied to/from TA
268
268
/// </summary>
269
- /// <since_tizen> 4 </since_tizen>
269
+ /// <since_tizen> 3 </since_tizen>
270
270
/// <param name="a">User paramter A</param>
271
271
/// <param name="b">User paramter B</param>
272
272
/// <param name="type">Kind of access allowed for TA <see cref="TEFValueType"/></param>
@@ -279,20 +279,20 @@ public Value(uint a, uint b, TEFValueType type) :
279
279
/// <summary>
280
280
/// This property represents unsigned integer A.
281
281
/// </summary>
282
- /// <since_tizen> 4 </since_tizen>
282
+ /// <since_tizen> 3 </since_tizen>
283
283
public uint A { get ; }
284
284
/// <summary>
285
285
/// This property represents unsigned integer B.
286
286
/// </summary>
287
- /// <since_tizen> 4 </since_tizen>
287
+ /// <since_tizen> 3 </since_tizen>
288
288
public uint B { get ; }
289
289
} ;
290
290
291
291
292
292
/// <summary>
293
293
/// This type denotes a TEE Session, the logical container linking a Client Application with a particular Trusted Application.
294
294
/// </summary>
295
- /// <since_tizen> 4 </since_tizen>
295
+ /// <since_tizen> 3 </since_tizen>
296
296
public sealed class Session
297
297
{
298
298
private Interop . TEEC_Context context ;
@@ -323,7 +323,7 @@ internal void Open(Guid destination, uint loginMethod, byte[] connectionData, Pa
323
323
/// This function closes a Session which has been opened with a Trusted Application.
324
324
/// All Commands within the Session MUST have completed before this function can be called.
325
325
/// </summary>
326
- /// <since_tizen> 4 </since_tizen>
326
+ /// <since_tizen> 3 </since_tizen>
327
327
/// <privilege>http://tizen.org/privilege/tee.client</privilege>
328
328
/// <privlevel>partner</privlevel>
329
329
/// <feature>http://tizen.org/feature/security.tee</feature>
@@ -342,7 +342,7 @@ public void Close() {
342
342
/// Trusted Application's protocol.
343
343
/// There can be up to four Parameter objects given in the <paramref name="paramlist"/> array
344
344
/// </summary>
345
- /// <since_tizen> 4 </since_tizen>
345
+ /// <since_tizen> 3 </since_tizen>
346
346
/// <param name="commandID">The command</param>
347
347
/// <param name="paramlist">The array of parameters</param>
348
348
/// <privilege>http://tizen.org/privilege/tee.client</privilege>
@@ -372,7 +372,7 @@ public void InvokeCommand(uint commandID, Parameter[] paramlist)
372
372
/// <summary>
373
373
/// Asynchronous version of InvokeCommand
374
374
/// </summary>
375
- /// <since_tizen> 4 </since_tizen>
375
+ /// <since_tizen> 3 </since_tizen>
376
376
/// <param name="commandID">The command</param>
377
377
/// <param name="paramlist">The array of parameters</param>
378
378
/// <param name="token">The token for task manipulation</param>
@@ -394,7 +394,7 @@ public void InvokeCommand(uint commandID, Parameter[] paramlist)
394
394
/// <summary>
395
395
/// This type denotes a TEE Context, the main logical container linking a Client Application with a particular TEE.
396
396
/// </summary>
397
- /// <since_tizen> 4 </since_tizen>
397
+ /// <since_tizen> 3 </since_tizen>
398
398
public sealed class Context : IDisposable
399
399
{
400
400
private Interop . TEEC_Context context ;
@@ -403,7 +403,7 @@ public sealed class Context : IDisposable
403
403
/// This function (constructor) initializes a new TEE Context, forming a connection between this Client Application and the
404
404
/// TEE identified by the string identifier name (empty or null name denotes default TEE).
405
405
/// </summary>
406
- /// <since_tizen> 4 </since_tizen>
406
+ /// <since_tizen> 3 </since_tizen>
407
407
/// <param name="name">The TEE name</param>
408
408
/// <privilege>http://tizen.org/privilege/tee.client</privilege>
409
409
/// <privlevel>partner</privlevel>
@@ -426,7 +426,7 @@ public Context(string name)
426
426
/// <summary>
427
427
/// This function implements IDisposable interface
428
428
/// </summary>
429
- /// <since_tizen> 4 </since_tizen>
429
+ /// <since_tizen> 3 </since_tizen>
430
430
/// <privilege>http://tizen.org/privilege/tee.client</privilege>
431
431
/// <privlevel>partner</privlevel>
432
432
/// <feature>http://tizen.org/feature/security.tee</feature>
@@ -440,7 +440,7 @@ public void Dispose() {
440
440
/// The target Trusted Application is identified by a UUID passed in the parameter destination.
441
441
/// There can be up to four Parameter objects given in the {paramlist} array
442
442
/// </summary>
443
- /// <since_tizen> 4 </since_tizen>
443
+ /// <since_tizen> 3 </since_tizen>
444
444
/// <param name="destination">The UUID of destination TA</param>
445
445
/// <param name="loginMethod">The authentication algorithm <see cref="LoginMethod" /></param>
446
446
/// <param name="connectionData">The data to be verified by given login method</param>
@@ -462,7 +462,7 @@ public Session OpenSession(Guid destination, uint loginMethod, byte[] connection
462
462
/// <summary>
463
463
/// @see OpenSession(Guid destination, uint connectionMethod, byte[] connectionData, Parameter[] paramlist, CancellationToken token)
464
464
/// </summary>
465
- /// <since_tizen> 4 </since_tizen>
465
+ /// <since_tizen> 3 </since_tizen>
466
466
/// <param name="destination">The UUID of destination TA</param>
467
467
/// <returns>Returns opened session</returns>
468
468
/// <privilege>http://tizen.org/privilege/tee.client</privilege>
@@ -471,7 +471,6 @@ public Session OpenSession(Guid destination, uint loginMethod, byte[] connection
471
471
/// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
472
472
/// <exception cref="NotSupportedException">The required feature is not supported.</exception>
473
473
/// <exception cref="InvalidOperationException">The operation is invalid.</exception>
474
- /// <exception cref="ArgumentException">The argument is wrong</exception>
475
474
public Session OpenSession ( Guid destination )
476
475
{
477
476
Session ses = new Session ( context ) ;
@@ -483,7 +482,7 @@ public Session OpenSession(Guid destination)
483
482
/// Asynchronous version of OpenSession
484
483
/// @see OpenSession(Guid destination, uint connectionMethod, byte[] connectionData, Parameter[] paramlist, CancellationToken token)
485
484
/// </summary>
486
- /// <since_tizen> 4 </since_tizen>
485
+ /// <since_tizen> 3 </since_tizen>
487
486
/// <param name="destination">The UUID of destination TA</param>
488
487
/// <param name="loginMethod">The authentication algorithm <see cref="LoginMethod" /></param>
489
488
/// <param name="connectionData">The data to be verified by given login method</param>
@@ -509,7 +508,7 @@ public Session OpenSession(Guid destination)
509
508
/// Asynchronous version of OpenSession
510
509
/// @see OpenSession(Guid destination, uint connectionMethod, byte[] connectionData, Parameter[] paramlist, CancellationToken token)
511
510
/// </summary>
512
- /// <since_tizen> 4 </since_tizen>
511
+ /// <since_tizen> 3 </since_tizen>
513
512
/// <param name="destination">The UUID of destination TA</param>
514
513
/// <param name="token">The token for task manipulation</param>
515
514
/// <returns>Returns Task executing session open in backgroung</returns>
@@ -519,7 +518,6 @@ public Session OpenSession(Guid destination)
519
518
/// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
520
519
/// <exception cref="NotSupportedException">The required feature is not supported.</exception>
521
520
/// <exception cref="InvalidOperationException">The operation is invalid.</exception>
522
- /// <exception cref="ArgumentException">One of arguments is wrong</exception>
523
521
public async Task < Session > OpenSessionAsync ( Guid destination , CancellationToken token = default ( CancellationToken ) )
524
522
{
525
523
Task < Session > task = Task < Session > . Factory . StartNew ( ( ) =>
@@ -534,7 +532,7 @@ public Session OpenSession(Guid destination)
534
532
/// the scope of the specified Context, in accordance with the parameters.
535
533
/// The input <paramref name="memaddr"/> MUST point to the shared memory region to register
536
534
/// </summary>
537
- /// <since_tizen> 4 </since_tizen>
535
+ /// <since_tizen> 3 </since_tizen>
538
536
/// <param name="memaddr">The address of shared memory</param>
539
537
/// <param name="size">The size of shared memory</param>
540
538
/// <param name="flags">The flags describing access modes (Input and/or Output)</param>
@@ -561,7 +559,7 @@ public SharedMemory RegisterSharedMemory(IntPtr memaddr, UInt32 size, SharedMemo
561
559
/// This function allocates a new block of memory as a block of Shared Memory within the scope of the
562
560
/// specified Context, in accordance with the parameters.
563
561
/// </summary>
564
- /// <since_tizen> 4 </since_tizen>
562
+ /// <since_tizen> 3 </since_tizen>
565
563
/// <param name="size">The size of shared memory</param>
566
564
/// <param name="flags">The flags describing access modes (Input and/or Output)</param>
567
565
/// <returns>Returns SharedMemory handler</returns>
@@ -591,7 +589,7 @@ public SharedMemory AllocateSharedMemory(UInt32 size, SharedMemoryFlags flags)
591
589
/// underlying memory from the TEE, but the memory region will stay available to the Client Application for
592
590
/// other purposes as the memory is owned by it.
593
591
/// </summary>
594
- /// <since_tizen> 4 </since_tizen>
592
+ /// <since_tizen> 3 </since_tizen>
595
593
/// <param name="shm">The shared memory object returned by RegisterSharedMemory or AllocateSharedMemory</param>
596
594
/// <privilege>http://tizen.org/privilege/tee.client</privilege>
597
595
/// <privlevel>partner</privlevel>
0 commit comments