kerneltest/e32test/random/d_entropysources.h
branchRCL_3
changeset 80 597aaf25e343
equal deleted inserted replaced
62:4a8fed1c0ef6 80:597aaf25e343
       
     1 // Copyright (c) 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 "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 // e32test\entropysources\d_entropysources.h
       
    15 //
       
    16 // Test driver which notifies userspace when an RNG reseed has taken place
       
    17 // 
       
    18 //
       
    19 
       
    20 /**
       
    21  @file
       
    22  @internalComponent
       
    23  @test
       
    24 */
       
    25 
       
    26 #if !defined(__D_ENTROPYSOURCES_H__)
       
    27 #define __D_ENTROPYSOURCES_H__
       
    28 
       
    29 #include <e32cmn.h>
       
    30 #ifndef __KERNEL_MODE__
       
    31 #include <e32std.h>
       
    32 #endif
       
    33 
       
    34 _LIT(KEntropySourcesName,"D_ENTROPYSOURCES");
       
    35 
       
    36 class TCapsEntropySources
       
    37     {
       
    38 public:
       
    39     TVersion iVersion;
       
    40     };
       
    41 
       
    42 class REntropySources : public RBusLogicalChannel
       
    43     {
       
    44 public:
       
    45   enum TRequest
       
    46         {
       
    47         EReseedTest,        
       
    48         };
       
    49     
       
    50 #ifndef __KERNEL_MODE__
       
    51 public:
       
    52     inline TInt Open()
       
    53         { 
       
    54         return DoCreate(KEntropySourcesName,TVersion(0, 1, 1),KNullUnit,NULL,NULL,EOwnerThread);    
       
    55         }
       
    56     inline void ReseedTest(TRequestStatus& aRequestStatus)
       
    57         {
       
    58         DoRequest(EReseedTest, aRequestStatus);
       
    59         }
       
    60 #endif
       
    61     };
       
    62 
       
    63 #endif // __D_ENTROPYSOURCES_H__