wim/WimClient/inc/WimTrustSettingsMgmt.h
changeset 0 164170e6151a
equal deleted inserted replaced
-1:000000000000 0:164170e6151a
       
     1 /*
       
     2 * Copyright (c) 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:  Trust Settings management class.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef WIMTRUSTSETTINGSMGMT_H
       
    20 #define WIMTRUSTSETTINGSMGMT_H
       
    21 
       
    22 //  INCLUDES
       
    23 #include "WimClient.h"
       
    24 #include "WimCertInfo.h"
       
    25 #include "WimCertTClassWrappers.h"
       
    26 
       
    27 // FORWARD DECLARATIONS
       
    28 class CWimCertInfo;
       
    29 
       
    30 // CLASS DECLARATION
       
    31 
       
    32 /**
       
    33 *  RWimTrustSettingsMgmt 
       
    34 *  This class handles Trust Settings Store
       
    35 *  related traffic between client and server.
       
    36 *  @lib WimClient.lib
       
    37 *  @since Series 60 3.0
       
    38 */
       
    39 class RWimTrustSettingsMgmt : public RWimClient
       
    40     {
       
    41     public:
       
    42 
       
    43         /**
       
    44         * A Static method to get the client Session
       
    45         * @return Pointer to newly created instance of RWimTrustSettingsMgmt
       
    46         */  
       
    47         static RWimTrustSettingsMgmt* ClientSessionL();
       
    48 
       
    49         /**
       
    50         * Destructor.
       
    51         * Allocated memory is released.
       
    52         */  
       
    53         virtual ~RWimTrustSettingsMgmt();
       
    54 
       
    55         /**
       
    56         * Fetches trust settings for given certificate. 
       
    57         * @param  aCert (IN) Certificate
       
    58         * @param  aStatus (IN/OUT) Request Status of asynchronous call
       
    59         * @return void
       
    60         */
       
    61         void GetTrustSettingsL( const CWimCertInfo& aCert,
       
    62                                 TRequestStatus& aStatus );
       
    63 
       
    64         /**
       
    65         * Set applicability for given certificate. 
       
    66         * @param aCert (IN) Certificate
       
    67         * @param aApplications (IN) Array of applications supported by 
       
    68         *        certificate
       
    69         * @param aStatus Request (IN/OUT) Status of asynchronous call.
       
    70         * @return void
       
    71         */
       
    72         void SetApplicabilityL( const CWimCertInfo& aCert,
       
    73                                 const RArray<TUid>& aApplications,
       
    74                                 TRequestStatus& aStatus );
       
    75 
       
    76         /**
       
    77         * Set trust flag for given certificate.
       
    78         * @param aCert (IN) Certificate
       
    79         * @param aTrusted (IN) Is certificate trusted
       
    80         * @param aStatus (IN/OUT) Request Status of asynchronous call.
       
    81         * @return void
       
    82         */
       
    83         void SetTrustL( const CWimCertInfo& aCert,
       
    84                         TBool aTrusted,
       
    85                         TRequestStatus& aStatus );
       
    86 
       
    87         /**
       
    88         * Set default trust settings for given certificate.
       
    89         * @param aCert (IN) Certificate
       
    90         * @param aAddApps (IN) Are default applications inserted 
       
    91         *        (ETrue means yes)
       
    92         * @param aStatus (IN/OUT) Request Status of asynchronous call
       
    93         * @return void
       
    94         */
       
    95         void SetDefaultTrustSettingsL( const CWimCertInfo& aCert,
       
    96                                        TBool aAddApps,
       
    97                                        TRequestStatus& aStatus );
       
    98 
       
    99         /**
       
   100         * Remove trust settings of given certificate. If certificate
       
   101         * is not found, return with status.Int() = KErrNotFound
       
   102         * @param aCert (IN) Certificate
       
   103         * @param aStatus (IN/OUT) Request Status of asynchronous call
       
   104         * @return void
       
   105         */
       
   106         void RemoveTrustSettingsL( const CWimCertInfo& aCert,
       
   107                                    TRequestStatus& aStatus );
       
   108 
       
   109         /**
       
   110         * Cancel any issued asynchronous call
       
   111         * @return void
       
   112         */
       
   113         void CancelDoing();
       
   114 
       
   115         /**
       
   116         * Returns pointer to package of trust settings.
       
   117         * @return Pointer to package of trust settings
       
   118         */
       
   119         CWimCertPckgBuf<TTrustSettings>* TrustSettingsPckg();
       
   120 
       
   121         /**
       
   122         * Delete buffer pointers
       
   123         * @return void
       
   124         */
       
   125         void DeleteBuffers();
       
   126      
       
   127     private:
       
   128         
       
   129         /**
       
   130         * Constructor 
       
   131         */
       
   132         RWimTrustSettingsMgmt();
       
   133 
       
   134         /** 
       
   135         * Copy constructor
       
   136         * @param aSource -Reference to class object.
       
   137         */
       
   138         RWimTrustSettingsMgmt( const RWimTrustSettingsMgmt& aSource );
       
   139 
       
   140         /** 
       
   141         * Assignment operator
       
   142         * @param aParam -Reference to class object.
       
   143         */
       
   144         RWimTrustSettingsMgmt& operator=( const RWimTrustSettingsMgmt& aParam );
       
   145 
       
   146     private:
       
   147 
       
   148         // Package for trust settings. Owned.
       
   149         CWimCertPckgBuf<TTrustSettings>* iPckgBufTrustSettings;
       
   150 
       
   151         // Package for cert info. Owned.
       
   152         CWimCertPckgBuf<TWimCertInfoPckg>* iCertPkcg;
       
   153     };
       
   154 
       
   155 #endif // WIMTRUSTSETTINGSMGMT_H
       
   156 
       
   157 // End of File
       
   158 
       
   159 
       
   160 
       
   161 
       
   162 
       
   163 
       
   164 
       
   165 
       
   166 
       
   167 
       
   168 
       
   169 
       
   170 
       
   171 
       
   172 
       
   173 
       
   174 
       
   175 
       
   176 
       
   177 
       
   178 
       
   179 
       
   180 
       
   181 
       
   182 
       
   183 
       
   184 
       
   185 
       
   186 
       
   187 
       
   188 
       
   189 
       
   190 
       
   191 
       
   192 
       
   193 
       
   194 
       
   195 
       
   196 
       
   197 
       
   198