omadrm/drmengine/roap/inc/RoapSigner.h
changeset 0 95b198f216e5
equal deleted inserted replaced
-1:000000000000 0:95b198f216e5
       
     1 /*
       
     2 * Copyright (c) 2002-2004 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:  ?Description
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef ROAPSIGNER_H
       
    21 #define ROAPSIGNER_H
       
    22 
       
    23 //  INCLUDES
       
    24 
       
    25 class CSHA1;
       
    26 
       
    27 namespace Roap
       
    28 {
       
    29 
       
    30 // CONSTANTS
       
    31 //const ?type ?constant_var = ?constant;
       
    32 
       
    33 // MACROS
       
    34 //#define ?macro ?macro_def
       
    35 
       
    36 // DATA TYPES
       
    37 //enum ?declaration
       
    38 //typedef ?declaration
       
    39 //extern ?data_type;
       
    40 
       
    41 // FUNCTION PROTOTYPES
       
    42 //?type ?function_name(?arg_list);
       
    43 
       
    44 // FORWARD DECLARATIONS
       
    45 
       
    46 // CLASS DECLARATION
       
    47 class RRoapStorageClient;
       
    48 
       
    49 /**
       
    50 *  ?one_line_short_description.
       
    51 *  ?other_description_lines
       
    52 *
       
    53 *  @lib ?library
       
    54 *  @since Series ?XX ?SeriesXX_version
       
    55 */
       
    56 class CRoapSigner: public CBase
       
    57     {
       
    58     public:  // Constructors and destructor
       
    59         
       
    60         /**
       
    61         * Two-phased constructor.
       
    62         */
       
    63         static CRoapSigner* NewL(RRoapStorageClient& aStorageClient);
       
    64         
       
    65         /**
       
    66         * Destructor.
       
    67         */
       
    68         virtual ~CRoapSigner();
       
    69 
       
    70     public: // New functions
       
    71         
       
    72         /**
       
    73         * ?member_description.
       
    74         * @since Series ?XX ?SeriesXX_version
       
    75         * @param ?arg1 ?description
       
    76         * @return ?description
       
    77         */
       
    78         //?type ?member_function( ?type ?arg1 );
       
    79         
       
    80         void ResetResponses(void);
       
    81         
       
    82         void AddResponseL(
       
    83             const TDesC8& aResponse);
       
    84 
       
    85         TBool VerifyAndAddResponseL(
       
    86             const TDesC8& aResponse,
       
    87             const TDesC8& aSignature,
       
    88             const RPointerArray<HBufC8>& aCertificateChain);
       
    89         
       
    90         void ResetRequests(void);
       
    91 
       
    92         void AddRequestL(
       
    93             const TDesC8& aRequest);
       
    94 
       
    95         HBufC8* SignAndAddRequestL(
       
    96             const TDesC8& aRequest);
       
    97         
       
    98     public: // Functions from base classes
       
    99 
       
   100         /**
       
   101         * From ?base_class ?member_description.
       
   102         * @param 
       
   103         * @param 
       
   104         */
       
   105 
       
   106     protected:  // New functions
       
   107         
       
   108         /**
       
   109         * ?member_description.
       
   110         * @since Series ?XX ?SeriesXX_version
       
   111         * @param ?arg1 ?description
       
   112         * @return ?description
       
   113         */
       
   114         
       
   115         /**
       
   116         * C++ default constructor.
       
   117         */
       
   118         CRoapSigner();
       
   119 
       
   120         /**
       
   121         * Symbian 2nd phase constructor.
       
   122         */
       
   123         void ConstructL(RRoapStorageClient& aStorageClient);
       
   124 
       
   125     protected:  // Functions from base classes
       
   126         
       
   127         /**
       
   128         * From ?base_class ?member_description
       
   129         */
       
   130         //?type ?member_function();
       
   131 
       
   132     private:
       
   133 
       
   134         // Prohibit copy constructor if not deriving from CBase.
       
   135         // CRoapSigner( const CRoapStorageClient& );
       
   136         // Prohibit assigment operator if not deriving from CBase.
       
   137         // CRoapSigner& operator=( const CRoapStorageClient& );
       
   138 
       
   139     public:     // Data
       
   140         // ?one_line_short_description_of_data
       
   141         //?data_declaration;
       
   142 
       
   143     protected:  // Data
       
   144         // ?one_line_short_description_of_data
       
   145 
       
   146     private:    // Data
       
   147         // ?one_line_short_description_of_data
       
   148         //?data_declaration;
       
   149         
       
   150         CSHA1* iHash;
       
   151         RPointerArray<HBufC8> iRequests;
       
   152         RPointerArray<HBufC8> iResponses;
       
   153         RRoapStorageClient* iStorage;
       
   154          
       
   155         // Reserved pointer for future extension
       
   156         //TAny* iReserved;
       
   157 
       
   158     public:     // Friend classes
       
   159         //?friend_class_declaration;
       
   160     protected:  // Friend classes
       
   161         //?friend_class_declaration;
       
   162     private:    // Friend classes
       
   163         //?friend_class_declaration;
       
   164 
       
   165     };
       
   166 }
       
   167 
       
   168 #endif      // ROAPSIGNER_H
       
   169             
       
   170 // End of File