webservices/wsframework/inc/msentransportcontext.h
changeset 0 62f9d29f7211
equal deleted inserted replaced
-1:000000000000 0:62f9d29f7211
       
     1 /*
       
     2 * Copyright (c) 2002-2006 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_TRANSPORT_CONTEXT_H
       
    26 #define M_SEN_TRANSPORT_CONTEXT_H
       
    27 
       
    28 // INCLUDES
       
    29 #include <e32std.h>
       
    30 #include "msencontext.h"
       
    31 
       
    32 /**
       
    33 * This class defines abstract interface for transport plug-in context, 
       
    34 * which is visible to CSenTransport ECOM plug-in implementations.
       
    35 */
       
    36 
       
    37 // FORWARD DECLARATIONS
       
    38 class MSenRemoteServiceSession;
       
    39 class MSenCoreServiceManager;
       
    40 class CSenWSDescription;
       
    41 class CSenServiceSession;
       
    42 
       
    43 
       
    44 // CLASS DECLARATION
       
    45 class MSenTransportContext : public MSenContext
       
    46     {
       
    47     public:
       
    48         /**
       
    49         * Adds new MSenCoreServiceManager& type value into context,
       
    50         * typically identified by this key: KSenCtxKeyCoreServiceManager.
       
    51         * @aKey identifies new value
       
    52         * @aValue is the value being added. Ownership is NEVER transferred
       
    53         * to this context.
       
    54         * @return KErrNone on success, 
       
    55         *         KErrAlreadyExists, if the key is reserved,
       
    56         *         or some other system-wide error code.
       
    57         */
       
    58         // virtual TInt AddCore(MSenCoreServiceManager& aValue) = 0;
       
    59 
       
    60         /*
       
    61         * Method returns MSenCoreServiceManager* type value.
       
    62         * @return reference to Core Service Manager.
       
    63         * LeaveCode:
       
    64         *        KErrNotFound - If Core is not available in this context
       
    65         *        KErrSenTypeMismatch - If KSenCtxKeyCoreServiceManager
       
    66         *        illegally points to other than CSenCoreServiceManager
       
    67         *        instance (not to happen).
       
    68         */
       
    69         virtual MSenCoreServiceManager& GetCoreL() = 0;
       
    70         //virtual MSenCoreServiceManager* GetCore() = 0;
       
    71 
       
    72         /*
       
    73         * Adds session description (as CSenWSDescription*) into context,
       
    74         * typically identified by following key: KSenCtxKeyServiceSession
       
    75         * 
       
    76         * @param aValue is the value being added. Ownership is NOT transferred
       
    77         * to this context.
       
    78         * 
       
    79         * @return KErrNone on success, 
       
    80         *         KErrAlreadyExists, if the key is reserved,
       
    81         *         or some other system-wide error code.
       
    82         */
       
    83         // virtual TInt AddSession(CSenServiceSession* aValue) = 0; // protected context
       
    84 
       
    85         /*
       
    86         * Updates new CSenWSDescription* type value into context, typically
       
    87         * identified by following key: KSenCtxKeyServiceSession
       
    88         * If some value for the same key already exists, it is replaced with the new value.
       
    89         * @param aValue is the updated value, which may replace
       
    90         *         any existing value, which used same key.
       
    91         *         Ownership is NOT transferred to this context.
       
    92         * @return KErrNone on success, 
       
    93         *         or some other system-wide error code.
       
    94         */
       
    95         //virtual TInt UpdateSession(CSenServiceSession* aValue) = 0;  // protected context
       
    96 
       
    97         /*
       
    98         * Method returns the service session which loaded (created) this transport plug-in instance.
       
    99         * 
       
   100         * @return value behind given key, or NULL, if such is not found.
       
   101         * Ownership cannot be transferred, as it is never to be held by this context.   
       
   102         * Method leaves with KErrSenTypeMismatch error code,
       
   103         * if value at this index is not CSenServiceSession type,
       
   104         * or any of it's subclass's.
       
   105         */
       
   106         virtual const CSenServiceSession* GetSession() = 0;
       
   107         //virtual CSenServiceSession& GetSessionL() = 0;
       
   108 
       
   109         // virtual TInt AddInitializer(CSenWSDescription* aValue) = 0; // protected context
       
   110         // virtual TInt UpdateInitializer(CSenWSDescription* aValue) = 0;  // protected context
       
   111 
       
   112         /*
       
   113         * Method returns session initializer as CSenWSDescriptionL* type value.
       
   114         * 
       
   115         * @returns value behind given key, or NULL, if not
       
   116         * found.
       
   117         * Ownership is NOT transferred, as it is NEVER to be held by this context.
       
   118         * Method leaves with KErrSenTypeMismatch error code,
       
   119         * if value at this index is not CSenWSDescription*
       
   120         * type, or any of it's subclass's.   
       
   121         */
       
   122         virtual CSenWSDescription& GetInitializerL() = 0;
       
   123 
       
   124         //virtual const CSenWSDescription* GetInitializer() = 0;
       
   125 
       
   126         /*
       
   127         * Adds new CSenWSDescription* type value into context, identified by given key.
       
   128         * 
       
   129         * @param aKey identifies new value
       
   130         * @param aValue is the value being added. Ownership is transferred
       
   131         * to this context.
       
   132         * 
       
   133         * @return KErrNone on success, 
       
   134         *         KErrAlreadyExists, if the key is reserved,
       
   135         *         or some other system-wide error code.
       
   136         */
       
   137         //virtual TInt AddServiceDescription(const TDesC8& aKey, CSenWSDescription* aValue) = 0;
       
   138 
       
   139         /*
       
   140         * Updates session description (as CSenWSDescription*) into context,
       
   141         * typically identified by following key: KSenCtxKeyServiceSession
       
   142         * If some value for this key already exists, it is destroyed and replaced
       
   143         * by the new value.
       
   144         * 
       
   145         * @param aKey identifies new value
       
   146         * @param aValue is the updated value, which may replace
       
   147         *         any existing value, which used same key.
       
   148         *         Ownership is transferred to this context.
       
   149         * @return KErrNone on success, 
       
   150         *         or some other system-wide error code.
       
   151         */
       
   152         //virtual TInt UpdateServiceDescription(const TDesC8& aKey, CSenWSDescription* aValue) = 0;
       
   153 
       
   154         /*
       
   155         * Method returns CSenWSDescriptionL* type value.
       
   156         * 
       
   157         * @return value behind given key, or NULL, if not
       
   158         * found.
       
   159         * Ownership is  not transferred, but remains
       
   160         * to be held by this context.   
       
   161         * Method leaves with KErrSenTypeMismatch error code,
       
   162         * if value at this index is not CSenSoapEnvelope* type.   
       
   163         */
       
   164         //virtual const CSenWSDescription* GetServiceDescriptionL(const TDesC8& aKey) = 0;
       
   165 
       
   166         /*
       
   167         * Adds new MSenRemoteServiceSession& type value into context, identified by given key.
       
   168         * 
       
   169         * @param aKey identifies new value
       
   170         * @param aValue is the value being added. Ownership is transferred
       
   171         * to this context.
       
   172         * 
       
   173         * @return KErrNone on success, 
       
   174         *         KErrAlreadyExists, if the key is reserved,
       
   175         *         or some other system-wide error code.
       
   176         */
       
   177         //virtual TInt Add(const TDesC8& aKey, MSenRemoteServiceSession& aValue) = 0; // protected context
       
   178 
       
   179         /*
       
   180         * Updates new MSenRemoteServiceSession& type value into context, identified by given key.
       
   181         * If some value for the same key already exists, it is destroyed and replaced
       
   182         * by the new value.
       
   183         * 
       
   184         * @param aKey identifies new value
       
   185         * @param aValue is the updated value, which may replace
       
   186         *         any existing value, which used same key.
       
   187         *         Ownership is transferred to this context.
       
   188         * 
       
   189         * @return KErrNone on success, 
       
   190         *         or some other system-wide error code.
       
   191         */
       
   192         //virtual TInt Update(const TDesC8& aKey, MSenRemoteServiceSession& aValue) = 0;
       
   193 
       
   194         /*
       
   195         * Method returns MSenRemoteServiceSession* type value.
       
   196         * 
       
   197         * @param aKey identifies remote service session
       
   198         * 
       
   199         * @returns value behind given key, or NULL, if not
       
   200         * found.
       
   201         * Ownership is  not transferred, but remains
       
   202         * to be held by this context.   
       
   203         * Method leaves with KErrSenTypeMismatch error code,
       
   204         * if value at this index is not MSenRemoteServiceSession* type.   
       
   205         */
       
   206         //virtual const MSenRemoteServiceSession* GetSenRemoteServiceSessionL(const TDesC8& aKey) = 0;
       
   207     };
       
   208 
       
   209 #endif // M_SEN_SESSION_CONTEXT_H
       
   210 
       
   211 // End of File