omadrm/drmengine/roapstorage/inc/RoapStorageSession.h
changeset 0 95b198f216e5
child 14 8cdda00a45da
equal deleted inserted replaced
-1:000000000000 0:95b198f216e5
       
     1 /*
       
     2 * Copyright (c) 2004-2008 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:  This class declares the interface of class CRoapStorageSession.
       
    15 *                handles the queues for notification events
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef ROAP_STORAGE_SESSION_H
       
    21 #define ROAP_STORAGE_SESSION_H
       
    22 
       
    23 //  INCLUDES
       
    24 #include <e32base.h>
       
    25 
       
    26 // CONSTANTS
       
    27 // MACROS
       
    28 // FUNCTION PROTOTYPES
       
    29 // DATA TYPES
       
    30 
       
    31 // FORWARD DECLARATIONS
       
    32 class RMessage2;
       
    33 class MDrmKeyStorage;
       
    34 class LazyClockClient;
       
    35 
       
    36 // CLASS DECLARATION
       
    37 
       
    38 /**
       
    39 *  This class is the server side instance of C/S communications of a certain
       
    40 *  session.
       
    41 
       
    42 *  @since 3.0
       
    43 */
       
    44 NONSHARABLE_CLASS( CRoapStorageSession ): public CSession2
       
    45 {
       
    46     enum TPanic
       
    47         {
       
    48         EPanicBadDescriptor, EPanicBadFunction
       
    49         };
       
    50 public:
       
    51     // Constructors and destructor
       
    52 
       
    53     /**
       
    54      * Two-phased constructor.
       
    55      *
       
    56      * @since 3.0
       
    57      * @param aClient Associated client side thread.
       
    58      * @return New session instance.
       
    59      */
       
    60     static CRoapStorageSession* NewL();
       
    61 
       
    62     /**
       
    63      * Destructor.
       
    64      * @since 3.0
       
    65      */
       
    66     virtual ~CRoapStorageSession();
       
    67 
       
    68 public:
       
    69     // Functions from base classes
       
    70 
       
    71    /**
       
    72      * From CSession2: Handles the service request event.
       
    73      * @since 3.0
       
    74      * @param aMessage The message related to the event.
       
    75      */
       
    76     void ServiceL( const RMessage2& aMessage );
       
    77 
       
    78     /**
       
    79      * Utility function for ServiceL
       
    80      * @since 3.0
       
    81      * @param aMessage The message related to the event.
       
    82      * @exception Method leaves with appropriate exception value
       
    83      *            if any errors occured.
       
    84      */
       
    85     void DispatchL( const RMessage2& aMessage );
       
    86 
       
    87     /**
       
    88      * From CSession2: Handles ServiceL errors
       
    89      * @since 3.0
       
    90      */
       
    91     void ServiceError( const RMessage2& aMessage, TInt aError );
       
    92 
       
    93 private:
       
    94 
       
    95     /**
       
    96      * C++ constructor.
       
    97      * @since 3.0
       
    98      * @param aClient Client thread.
       
    99      */
       
   100     CRoapStorageSession();
       
   101 
       
   102     /**
       
   103      * Second phase constructor.
       
   104      * @since 3.0
       
   105      */
       
   106     void ConstructL();
       
   107 
       
   108     static void PanicClient( const RMessage2& aMessage, TPanic aReason );
       
   109 
       
   110     void AddRiContextL( const RMessage2& aMessage );
       
   111 
       
   112     void AddDomainContextL( const RMessage2& aMessage );
       
   113 
       
   114     void GetRiContextL( const RMessage2& aMessage );
       
   115 
       
   116     void GetDomainContextL( const RMessage2& aMessage );
       
   117 
       
   118     void GetDataL( const RMessage2& aMessage );
       
   119 
       
   120     void DeleteRiContextL( const RMessage2& aMessage );
       
   121 
       
   122     void DeleteDomainContextL( const RMessage2& aMessage );
       
   123 
       
   124     void DeleteExpiredRIsL( const RMessage2& aMessage );
       
   125 
       
   126     void DeleteExpiredDomainsL( const RMessage2& aMessage );
       
   127 
       
   128     void WhiteListUrlExistsL( const RMessage2& aMessage );
       
   129 
       
   130     void GetDevicePublicKeyDerL( const RMessage2& aMessage );
       
   131 
       
   132     void GetDeviceCertificateChainL( const RMessage2& aMessage );
       
   133 
       
   134     void SignL( const RMessage2& aMessage );
       
   135 
       
   136     void SelectTrustedRootL( const RMessage2& aMessage );
       
   137 
       
   138     void ActivateTrustedRootL( const RMessage2& aMessage );
       
   139 
       
   140     void GetTrustedRootsL( const RMessage2& aMessage );
       
   141 
       
   142     void GetRootCertificateL( const RMessage2& aMessage );
       
   143 
       
   144     void DeleteExpiredContextsL( const RMessage2& aMessage );
       
   145 
       
   146     void DeleteAllL( const RMessage2& aMessage );
       
   147 
       
   148     void RsaSignL( const RMessage2& aMessage );
       
   149 
       
   150     void GetMeteringDataL( const RMessage2& aMessage );
       
   151 
       
   152     void DeleteMeteringDataL( const RMessage2& aMessage );
       
   153 
       
   154     void GetAllRIContextsL( const RMessage2& aMessage );
       
   155 
       
   156     void UpdateRIContextL( const RMessage2& aMessage );
       
   157 
       
   158     void UpdateDrmTimeL( const RMessage2& aMessage );
       
   159 
       
   160     void
       
   161         CRoapStorageSession::VerifyOcspResponsesL( const RMessage2& aMessage );
       
   162 
       
   163     void GetOcspResponderIdL( const RMessage2& aMessage );
       
   164 
       
   165     // Prohibit copy constructor.
       
   166     CRoapStorageSession( const CRoapStorageSession& );
       
   167     // Prohibit assigment operator.
       
   168     CRoapStorageSession& operator=( const CRoapStorageSession& );
       
   169 
       
   170 private:
       
   171     // Data
       
   172 
       
   173     HBufC8* iPreparedData;
       
   174 
       
   175     MDrmKeyStorage* iKeyStorage;
       
   176 
       
   177     TBool iDeleteExpired;
       
   178 
       
   179     LazyClockClient* iLazyClock;
       
   180 
       
   181 };
       
   182 #endif      // ROAP_STORAGE_SESSION_H
       
   183 
       
   184 // End of File