webservices/wsframework/inc/msenremotehostlet.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:        Non-public callback interface, which transports typically call
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 
       
    23 
       
    24 
       
    25 #ifndef M_SEN_REMOTE_HOSTLET
       
    26 #define M_SEN_REMOTE_HOSTLET
       
    27 
       
    28 
       
    29 /**
       
    30  * MSenRemoteHostlet is non-public interface, which is typically implemented by
       
    31  * Symbian server-side session implementations (like CSenClientSession) and
       
    32  * called by Transport plug-ins (like HostletTransportPlugin) classes.
       
    33  * Interface is used send requests (transactions from service consumers)
       
    34  * to hostlet applications (residing behind process boundary) - in this sense
       
    35  * the "remote" here stands for for that hostlet application process, which
       
    36  * is remotely manipulated. Any methods introduced in this interface, are
       
    37  * typically turned into IPC operations by the implementing classes, so
       
    38  * that corresponding real communication (data transfer) may take place.
       
    39  */
       
    40 
       
    41  // CLASS DECLARATION
       
    42 class MSenRemoteHostlet
       
    43     {
       
    44     public:
       
    45         /**
       
    46         * Send a message with transaction ID to the service consumer.
       
    47         * This method allows session implementation to perform internal
       
    48         * mechanisms prior handing the response to the actual, already
       
    49         * known consumer (MSenRemoteServiceConsumer).
       
    50         *
       
    51         * Session implementation might decide, that certain messages are
       
    52         * not delivered to consumer(s). Or, the session may validate the
       
    53         * received message and actually decide sending an error to the
       
    54         * consumer.
       
    55         * 
       
    56         * @see sendToConsumer in com.nokia.serene.framework.RServiceSession
       
    57         *
       
    58         * @param aMessage is the request message from service consumer
       
    59         * @param aConsumer is the consumer sending the request. 
       
    60         * @param aTxnId is the transaction id of this async request. 
       
    61         * This id is most likely used by MSenRemoteHostlet implementations
       
    62         * to query CSenChunk (RChunk) from RSenRemoteServiceConsumer, so
       
    63         * that copying of that payload can be avoided altogether.
       
    64         * @return KErrNone if message was successfully delivered to hostlet
       
    65         *         KErrSen
       
    66         *         Otherwise, some system-wide error code.
       
    67         * Method leaves with some system-wide code, if message cannot be
       
    68         * processed by the hostlet implementation without some major fault.
       
    69         */
       
    70         virtual TInt ProcessRequestFromConsumerL(const TDesC8& aMessage,
       
    71                                                  const TInt aTxnId,
       
    72                                                  MSenRemoteServiceConsumer& aConsumer) = 0; 
       
    73 
       
    74 
       
    75         // Call-back which tells when HostletConnection's Respond (ASYNC OP) has been
       
    76         // completed and with what code (error code or KErrNone)
       
    77         virtual TInt OnServiceCompleteL(const TInt aTxnId, TInt aCompletionCode, const TDesC8& aDesc = KNullDesC8) = 0; 
       
    78         virtual void TransferProgressForHostlet(TInt aTxnId, TBool aIncoming,
       
    79                 TBool aIsSoap, const TDesC8& aSoapOrCid, TInt aProgress) = 0;
       
    80     };
       
    81 #endif // M_SEN_SERVICE_SESSION