webservices/wscore/inc/msendao.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_DAO_H
       
    26 #define M_SEN_DAO_H
       
    27 
       
    28 //  INCLUDES
       
    29 #include <flogger.h>
       
    30 #include <e32std.h>
       
    31 
       
    32 #include "msenserviceinvocationframework.h"
       
    33 #include "msenservicemanager.h"
       
    34 #include "msenremoteserviceconsumer.h"
       
    35 #include "MSenServiceDescription.h"
       
    36 
       
    37 // FORWARD DECLARATIONS
       
    38 class CSIF;
       
    39 class CSenServiceSession;
       
    40 class CSenXMLDAO;
       
    41 class CSenCoreServiceManager;
       
    42 
       
    43 // CLASS DECLARATION
       
    44 class MSenDAO
       
    45     {
       
    46     friend class CSenXMLDAO;             // to provide visibility to critical section
       
    47     friend class CSenCoreServiceManager; // to provide visibility to critical section
       
    48 
       
    49     public:
       
    50         virtual MSIF* Framework( const TDesC8& aFramework ) = 0;
       
    51         virtual TInt Add( CSenWSDescription& aDescription ) = 0;
       
    52         virtual TInt Add( CSIF& aFramework ) = 0;
       
    53         virtual TBool Remove( CSenWSDescription& aDescription ) = 0;
       
    54         virtual void Remove( CSIF& aFramework ) = 0;
       
    55         
       
    56         /**
       
    57         * The ownership of the returned ServiceDescription is NOT transferred 
       
    58         */
       
    59         virtual CSenWSDescription* FindMatchingServiceDescriptionL( CSenWSDescription& aSd ) = 0; //codescannerwarnings
       
    60                                            
       
    61         virtual TInt AddServiceDescriptionToFrameworksL( CSenWSDescription& aPattern,
       
    62                                                          MSenRemoteServiceConsumer& aRemoteConsumer,
       
    63                                                          HBufC8*& aErrorMsg ) = 0;
       
    64                      
       
    65         virtual TInt FindAllMatchingServiceDescriptions( RWSDescriptionArray& aMatches,
       
    66                                                          const TDesC8& aContract ) = 0;
       
    67                                             
       
    68         virtual TInt FindAllMatchingServiceDescriptions( RWSDescriptionArray& aMatches,
       
    69                                                          MSenServiceDescription& aPattern ) = 0;
       
    70                                         
       
    71         virtual TInt SaveL( const CSenServiceSession& aServiceSession ) = 0;
       
    72         virtual TInt SaveL( const CSIF& aServiceInvocationFramework ) = 0;
       
    73         virtual CDesC8Array& SupportedFrameworksL() = 0;
       
    74         virtual void Load() = 0;
       
    75         virtual TInt NotifyFrameworksL( const TDesC8& aFrameworkID,
       
    76                                         const TInt aEvent,
       
    77                                         TAny* aArgument) = 0;
       
    78 
       
    79         virtual TPtrC8 TransportPluginCueBySchemeL( const TPtrC8& aSchema ) = 0;
       
    80 
       
    81         /** 
       
    82         * Looks up CSenProvider ECOM plug-in. Sharable hostlets (providers)
       
    83         * may be found from a "proxy", a cache allowing them to be reused.
       
    84         */
       
    85         virtual MSenProvider& LookupHostletForL( const TDesC8& aHostletEndpoint,
       
    86                                                  const TDesC& aReqThreadId,
       
    87                                                  const TDesC8& aReqConsumerId ) = 0;
       
    88 
       
    89         /** 
       
    90         * Unsharable providers should be released from server (main) threads
       
    91         * memory by calling this method. 
       
    92         */
       
    93         virtual TInt ReleaseHostletL(const MSenProvider* aHostlet,
       
    94                                       const TDesC& aReqThreadId,
       
    95                                       const TDesC8& aReqConsumerId) = 0;
       
    96 
       
    97     private:
       
    98         virtual TInt Save() = 0;
       
    99 
       
   100         RCriticalSection iCriticalSection;
       
   101     };
       
   102 
       
   103 #endif // M_SEN_DAO_H
       
   104 
       
   105 // End of File