inc/drmserviceapiwrapper.h
changeset 23 493788a4a8a4
parent 0 95b198f216e5
equal deleted inserted replaced
5:79d62d1d7957 23:493788a4a8a4
    18 
    18 
    19 #ifndef CDRMSERVICEAPIWRAPPER_H
    19 #ifndef CDRMSERVICEAPIWRAPPER_H
    20 #define CDRMSERVICEAPIWRAPPER_H
    20 #define CDRMSERVICEAPIWRAPPER_H
    21 
    21 
    22 #include <e32base.h>
    22 #include <e32base.h>
    23 #include "drmtypes.h"
    23 #include "DRMTypes.h"
    24 
    24 
    25 /**
    25 /**
    26  * Environment gate function
    26  * Environment gate function
    27  *
    27  *
    28  * @since S60 3.2
    28  * @since S60 3.2
    35 public:
    35 public:
    36     /**
    36     /**
    37      * Get the secure time
    37      * Get the secure time
    38      *
    38      *
    39      * @since   S60 v3.2
    39      * @since   S60 v3.2
    40      * @param   aTime           Output parameter containing the 
    40      * @param   aTime           Output parameter containing the
    41      *                          secure time in UTC.
    41      *                          secure time in UTC.
    42      * @param   aTimeZone       Time zone information including summer/winter time
    42      * @param   aTimeZone       Time zone information including summer/winter time
    43      *                          in +/- 15 minutes
    43      *                          in +/- 15 minutes
    44      * @param   aSecurityLevel  Output parameter Securiry level.
    44      * @param   aSecurityLevel  Output parameter Securiry level.
    45      * @return  Symbian OS error code if any.
    45      * @return  Symbian OS error code if any.
    46      */
    46      */
    47     virtual TInt GetSecureTime( TTime& aTime, 
    47     virtual TInt GetSecureTime( TTime& aTime,
    48                                 TInt& aTimeZone,
    48                                 TInt& aTimeZone,
    49                                 DRMClock::ESecurityLevel& aSecurityLevel ) const = 0;
    49                                 DRMClock::ESecurityLevel& aSecurityLevel ) const = 0;
    50                         
    50 
    51     /**
    51     /**
    52      * Update the secure time
    52      * Update the secure time
    53      *
    53      *
    54      * Requires DRM Capability
    54      * Requires DRM Capability
    55      *
    55      *
    56      * @since   S60 v3.2
    56      * @since   S60 v3.2
    57      * @param   aTime           Input parameter containing the 
    57      * @param   aTime           Input parameter containing the
    58      *                          secure time in UTC.
    58      *                          secure time in UTC.
    59      * @param   aTimeZone       Time zone information including 
    59      * @param   aTimeZone       Time zone information including
    60      *                          summer/winter time
    60      *                          summer/winter time
    61      *                          in +/- 15 minutes         
    61      *                          in +/- 15 minutes
    62      * @return  Symbian OS error code if any.
    62      * @return  Symbian OS error code if any.
    63      */
    63      */
    64     virtual TInt UpdateSecureTime( const TTime& aTime, const TInt& aTimeZone ) = 0;
    64     virtual TInt UpdateSecureTime( const TTime& aTime, const TInt& aTimeZone ) = 0;
    65 
    65 
    66 
    66 
    87      */
    87      */
    88     virtual void SignL( const TDesC8& aHash, HBufC8*& aSignature ) = 0;
    88     virtual void SignL( const TDesC8& aHash, HBufC8*& aSignature ) = 0;
    89     };
    89     };
    90 
    90 
    91 
    91 
    92 namespace DRM 
    92 namespace DRM
    93     {
    93     {
    94 
    94 
    95 // forward declaration
    95 // forward declaration
    96 class CDrmServiceApi;    
    96 class CDrmServiceApi;
    97     
    97 
    98     
    98 
    99 /**
    99 /**
   100  *  Class for connecting to the WmDrmServer
   100  *  Class for connecting to the WmDrmServer
   101  *
   101  *
   102  *  @lib WmDrmClientWrapper
   102  *  @lib WmDrmClientWrapper
   103  *  @since S60 3.2
   103  *  @since S60 3.2
   116 
   116 
   117     /**
   117     /**
   118      * Get the secure time
   118      * Get the secure time
   119      *
   119      *
   120      * @since   S60 v3.2
   120      * @since   S60 v3.2
   121      * @param   aTime           Output parameter containing the 
   121      * @param   aTime           Output parameter containing the
   122      *                          secure time in UTC.
   122      *                          secure time in UTC.
   123      * @param   aTimeZone       Time zone information including summer/winter time
   123      * @param   aTimeZone       Time zone information including summer/winter time
   124      *                          in +/- 15 minutes
   124      *                          in +/- 15 minutes
   125      * @param   aSecurityLevel  Output parameter Securiry level.
   125      * @param   aSecurityLevel  Output parameter Securiry level.
   126      * @return  Symbian OS error code if any.
   126      * @return  Symbian OS error code if any.
   127      */
   127      */
   128     virtual TInt GetSecureTime( TTime& aTime, 
   128     virtual TInt GetSecureTime( TTime& aTime,
   129                                 TInt& aTimeZone,
   129                                 TInt& aTimeZone,
   130                                 DRMClock::ESecurityLevel& aSecurityLevel ) const;
   130                                 DRMClock::ESecurityLevel& aSecurityLevel ) const;
   131                         
   131 
   132     /**
   132     /**
   133      * Update the secure time
   133      * Update the secure time
   134      *
   134      *
   135      * Requires DRM Capability
   135      * Requires DRM Capability
   136      *
   136      *
   137      * @since   S60 v3.2
   137      * @since   S60 v3.2
   138      * @param   aTime           Input parameter containing the 
   138      * @param   aTime           Input parameter containing the
   139      *                          secure time in UTC.
   139      *                          secure time in UTC.
   140      * @param   aTimeZone       Time zone information including 
   140      * @param   aTimeZone       Time zone information including
   141      *                          summer/winter time
   141      *                          summer/winter time
   142      *                          in +/- 15 minutes         
   142      *                          in +/- 15 minutes
   143      * @return  Symbian OS error code if any.
   143      * @return  Symbian OS error code if any.
   144      */
   144      */
   145     virtual TInt UpdateSecureTime( const TTime& aTime, const TInt& aTimeZone );
   145     virtual TInt UpdateSecureTime( const TTime& aTime, const TInt& aTimeZone );
   146 
   146 
   147 
   147 
   165      *                          the caller
   165      *                          the caller
   166      * @return  none
   166      * @return  none
   167      * @leave Symbian OS error code
   167      * @leave Symbian OS error code
   168      */
   168      */
   169     virtual void SignL( const TDesC8& aHash, HBufC8*& aSignature );
   169     virtual void SignL( const TDesC8& aHash, HBufC8*& aSignature );
   170     
   170 
   171 protected:
   171 protected:
   172 
   172 
   173 private:
   173 private:
   174 
   174 
   175     /**
   175     /**
   184 
   184 
   185     /**
   185     /**
   186      * Download manager session
   186      * Download manager session
   187      */
   187      */
   188     CDrmServiceApi* iServiceApi;
   188     CDrmServiceApi* iServiceApi;
   189     
   189 
   190     };
   190     };
   191     
   191 
   192     } // namespace DRM
   192     } // namespace DRM
   193     
   193 
   194 #endif // CDRMSERVICEAPIWRAPPER_H
   194 #endif // CDRMSERVICEAPIWRAPPER_H