webservices/wsframework/inc/msencoreservicemanager.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_CORE_SERVICE_MANAGER_H
       
    26 #define M_SEN_CORE_SERVICE_MANAGER_H
       
    27 
       
    28 //  INCLUDES
       
    29 #include <e32base.h>
       
    30 #include <e32std.h>
       
    31 #include <flogger.h>
       
    32 #include <badesca.h>    //CDesC8Array
       
    33 
       
    34 #include "msenservicemanager.h"
       
    35 #include "msenidentitymanager.h"
       
    36 #include "msencredentialmanager.h"
       
    37 
       
    38 // FORWARD DECLARATIONS
       
    39 class MSenTransport;
       
    40 class MSenProvider;
       
    41 
       
    42 class CSenXmlReader;
       
    43 class CSenWSDescription;
       
    44 class CSenIdentityProvider;
       
    45 class CSenServiceSession;
       
    46 class CSenIdentifier;
       
    47 class CSIF;
       
    48 
       
    49 // CLASS DECLARATION
       
    50 
       
    51 /**
       
    52 *
       
    53 * MSenCoreServiceManager represents the internal (core) side interface of
       
    54 * a CoreServiceManager
       
    55 * The methods defined in this interface are executed from MDAO implementations
       
    56 * and from different frameworks, which are expected to operate in the same
       
    57 * process as the CoreServiceManager.
       
    58 */
       
    59 class MSenCoreServiceManager :  public MSenServiceManager,
       
    60                                 public MSenIdentityManager,
       
    61                                 public MSenCredentialManager
       
    62     {
       
    63     public: // New methods
       
    64 
       
    65         virtual TInt AddServiceDescriptionL( CSenWSDescription* apServiceDescription ) = 0;
       
    66 
       
    67         virtual TInt RemoveServiceDescriptionL( CSenWSDescription& aServiceDescription ) = 0;
       
    68 
       
    69         virtual TInt SaveL( const CSenServiceSession& aServiceSession ) = 0;
       
    70         
       
    71         virtual TInt SaveL( const CSIF& aServiceInvocationFramework ) = 0;
       
    72 
       
    73         //virtual MSenIdentityManager& IdentityManager() = 0;
       
    74 
       
    75         /**
       
    76         * Notifies *ALL* framework plug-ins about certain event
       
    77         * @return some system-wide error code, if an error occurred
       
    78         */
       
    79         //virtual TInt NotifyFrameworksL(const TInt aEvent) = 0;
       
    80 
       
    81         /**
       
    82         * Notifies *ALL* framework plug-ins about certain event and
       
    83         * an additional object pointer may be passed
       
    84         * NULL is also accepted
       
    85         * @return some system-wide error code, if an error occurred
       
    86         */
       
    87         //virtual TInt NotifyFrameworksL(const TInt aEvent, 
       
    88         //                               TAny* aArgument) = 0;
       
    89 
       
    90 
       
    91         /**
       
    92         * Notifies only those frameworks plug-ins, which match
       
    93         * with given framework ID (aFrameworkID)
       
    94         * Note(!): if aFrameworkID == KNullDesC8 (zero-length),
       
    95         * then *all* known framework plug-ins are notified
       
    96         * about the event.
       
    97         * @return some system-wide error code, if an error occurred
       
    98         */
       
    99         //virtual TInt NotifyFrameworksL(const TDesC8& aFrameworkID,
       
   100         //                               const TInt aEvent) = 0;
       
   101 
       
   102         /**
       
   103         * Notifies only those frameworks plug-ins, which match
       
   104         * with given framework ID (aFrameworkID) and 
       
   105         * an additional object pointer may be passed
       
   106         * NULL is also accepted
       
   107 
       
   108         * Note(!): if aFrameworkID == KNullDesC8 (zero-length),
       
   109         * then *all* known framework plug-ins are notified
       
   110         * about the event.
       
   111         * @return some system-wide error code, if an error occurred
       
   112         */
       
   113         //virtual TInt NotifyFrameworksL(const TDesC8& aFrameworkID,
       
   114         //                              const TInt aEvent,
       
   115         //                              TAny* aArgument) = 0;
       
   116 
       
   117         /**
       
   118          * Return a list with FrameworkId strings (TDesC&), 
       
   119          * each a name of a supported ServiceInvocationFramework.
       
   120          * This may help applications, to decide what to ask for.
       
   121          */
       
   122         virtual CDesC8Array& SupportedFrameworksL() = 0;
       
   123 
       
   124         /**
       
   125         * Method for requesting a MSenProvider reference
       
   126         * to a hostlet (provider) accessible behind given
       
   127         * endpoint. Core service manager implementation 
       
   128         * typically owns the instances behind this reference,
       
   129         * as well as it often does some pooling / caching / 
       
   130         * proxy-ing of these instances for several requesters.
       
   131         * Typical caller of this method is transport plug-in.
       
   132         * @param aHostletEndpoint is the endpoint of requested provider.
       
   133         * @param aReqThreadId is the full name of the requesting thread
       
   134         * @param aReqConsumerId is the unique id (urn) of the requesting
       
   135         *        service consumer
       
   136         * @return reference to found provider. If provider was not
       
   137         * found from the system, this method will leave with
       
   138         * KErrNotFound error code. Other leave codes are system-wide.
       
   139         */
       
   140         virtual MSenProvider& LookupHostletForL( const TDesC8& aHostletEndpoint,
       
   141                                                  const TDesC& aReqThreadId,
       
   142                                                  const TDesC8& aReqConsumerId ) = 0;
       
   143 
       
   144         /** 
       
   145         * Unsharable hostlets (providers) should be released from server (main)
       
   146         * thread's memory by calling this method. 
       
   147         * @param aHostlet is a pointer to the hostlet (provider) being released,
       
   148         *        and possibly de-allocated.
       
   149         * @param aReqThreadId is the full name of the requesting thread
       
   150         * @param aReqConsumerId is the unique id (urn) of the requesting
       
   151         *        service consumer
       
   152         * @return KErrNone on success or otherwise some system-wide error code.
       
   153         */
       
   154         virtual TInt ReleaseHostletL( const MSenProvider* aHostlet,
       
   155                                       const TDesC& aReqThreadId,
       
   156                                       const TDesC8& aReqConsumerId ) = 0;
       
   157         virtual TPtrC8 IMSI() = 0;
       
   158         
       
   159         virtual TPtrC8 IMEI() = 0;
       
   160 
       
   161     };
       
   162 
       
   163 #endif // M_SEN_CORE_SERVICE_MANAGER_H
       
   164 
       
   165 // End of File