webservices/wsframework/inc/msencredentialmanager.h
changeset 0 62f9d29f7211
equal deleted inserted replaced
-1:000000000000 0:62f9d29f7211
       
     1 /*
       
     2 * Copyright (c) 2002-2005 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: Header declaration
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 
       
    23 
       
    24 
       
    25 #ifndef M_SEN_CREDENTIAL_MANAGER_H
       
    26 #define M_SEN_CREDENTIAL_MANAGER_H
       
    27 
       
    28 // INCLUDES
       
    29 #include <e32base.h>
       
    30 
       
    31 //#include "MSenDAO.h"
       
    32 
       
    33 // FORWARD DECLARATIONS
       
    34 class CSenWSDescription;
       
    35 class CSenIdentityProvider;
       
    36 class CSenInternalCredential;
       
    37 class RSenCredentialPtr;
       
    38 class CSenXMLDAO;
       
    39 
       
    40 typedef RPointerArray<CSenInternalCredential> RSenCredentialArray;
       
    41 typedef RArray<RSenCredentialPtr> RSenCredentialPtrArray;
       
    42 
       
    43 class MSenCredentialManager
       
    44     {
       
    45     
       
    46     friend class CSenXMLDAO; // only component that saves Credential DB outside CRED-MGR
       
    47     
       
    48     public:
       
    49 		virtual TInt CredentialsL(const CSenWSDescription& aPattern,
       
    50 								  RSenCredentialArray& aCredentials) = 0;
       
    51 
       
    52 		virtual TInt CredentialsL(const CSenWSDescription& aPattern,
       
    53 								  const CSenIdentityProvider& aIdP,
       
    54 								  RSenCredentialArray& aCredentials) = 0;
       
    55 
       
    56 		virtual TInt CredentialsL(const CSenWSDescription& aPattern,
       
    57 								  RSenCredentialPtrArray& aCredentials) = 0;
       
    58 
       
    59 		virtual TInt CredentialsL(const CSenWSDescription& aPattern,
       
    60 								  const CSenIdentityProvider& aIdP,
       
    61 								  RSenCredentialPtrArray& aCredentials) = 0;
       
    62 
       
    63 		virtual RSenCredentialPtr AddCredentialL(CSenInternalCredential* apCredential,
       
    64 		                                          TInt& aErrorTo) = 0;
       
    65 
       
    66 		virtual RSenCredentialPtr AddCredentialL(CSenIdentityProvider* apIdP,
       
    67 									              CSenInternalCredential* apCredential,
       
    68 									              TInt& aErrorTo) = 0;
       
    69 
       
    70 		virtual RSenCredentialPtr AddCredentialL(const TDesC8& aCredential,
       
    71 		                                          TInt& aErrorTo) = 0;
       
    72 
       
    73 		virtual RSenCredentialPtr AddCredentialL(CSenIdentityProvider* apIdP,
       
    74                                                  const TDesC8& aCredential,
       
    75                                                  TInt& aErrorTo) = 0;
       
    76 
       
    77 		virtual TInt RemoveCredentialsL(const CSenWSDescription& aPattern) = 0;
       
    78 
       
    79 		virtual TInt RemoveCredentialsL(const CSenWSDescription& aPattern,
       
    80 										const CSenIdentityProvider& aIdP) = 0;
       
    81 
       
    82         virtual TInt RemoveCredentialsL(const TDesC8& aProviderId) = 0;
       
    83 										
       
    84         virtual TInt RemoveCredentialL(TInt aInternalCredentialId) = 0;	//codescannerwarnings
       
    85         
       
    86         virtual RSenCredentialPtr CredentialL(TInt aInternalCredentialId,
       
    87                                               TInt& aErrorTo) = 0;
       
    88 
       
    89         virtual RSenCredentialPtr UpdateCredentialL(TInt aInternalCredentialId,
       
    90                                                     CSenInternalCredential* apCredential,
       
    91                                                     TInt& aErrorTo) = 0;
       
    92         
       
    93         virtual RSenCredentialPtr UpdateCredentialL(TInt aInternalCredentialId,
       
    94                                                     const TDesC8& aCredential,
       
    95                                                     TInt& aErrorTo) = 0;
       
    96                                                     
       
    97     private:
       
    98         virtual TInt SaveCredentialDB() = 0;
       
    99     };
       
   100 
       
   101 #endif // M_SEN_CREDENTIAL_MANAGER_H
       
   102 
       
   103 // End of File