mpx/commonframework/common/inc/mpxsessionretry.h
changeset 0 a2952bb97e68
equal deleted inserted replaced
-1:000000000000 0:a2952bb97e68
       
     1 /*
       
     2 * Copyright (c) 2007 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:  Client session retry implementation
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef RMPXSESSIONRETRY_H
       
    19 #define RMPXSESSIONRETRY_H
       
    20 
       
    21 #include <e32std.h>
       
    22 
       
    23 const TInt KMPXMaxServerImageNameLength = 30;
       
    24 
       
    25 /**
       
    26 *  Client session retry implementation
       
    27 *
       
    28 *  @lib MPXCommon.lib
       
    29 */
       
    30 class RMPXSessionRetry : public RSessionBase
       
    31     {
       
    32     public:
       
    33 
       
    34         /** 
       
    35         * Get version info.
       
    36         *
       
    37         * @since S60 5.0
       
    38         * @return version info
       
    39         */
       
    40         TVersion Version() const;
       
    41         
       
    42         /** 
       
    43         * Connect to server.
       
    44         *
       
    45         * @since S60 5.0
       
    46         * @param aServer server name
       
    47         * @param aImage server image name
       
    48         * @return KErrNone success, otherwise system error code
       
    49         */
       
    50         TInt Connect(const TDesC& aServer, 
       
    51                      const TDesC& aImage, 
       
    52                      const TVersion& aVersion);
       
    53         
       
    54         /** 
       
    55         * Reconnect to server.
       
    56         *
       
    57         * @since S60 5.0
       
    58         * @return KErrNone success, otherwise system error code
       
    59         */
       
    60         TInt  Reconnect();
       
    61         
       
    62         /** 
       
    63         * Send a message.
       
    64         *
       
    65         * @since S60 5.0
       
    66         * @param aFunction function code
       
    67         * @return message completion code
       
    68         */
       
    69         TInt SendReceiveL(TInt aFunction);
       
    70 
       
    71         /** 
       
    72         * Send a message.
       
    73         *
       
    74         * @since S60 5.0
       
    75         * @param aFunction function code
       
    76         * @param aArgs parameter to server
       
    77         * @return message completion code
       
    78         */
       
    79         TInt SendReceiveL(TInt aFunction, const TIpcArgs& aArgs);
       
    80         
       
    81         /** 
       
    82         * Send message asynchronously.
       
    83         *
       
    84         * @since S60 5.0
       
    85         * @param aFunction function code
       
    86         * @param aStatus the request status object used to contain the 
       
    87         *                completion status of the request
       
    88         */
       
    89         void SendReceive(TInt aFunction, TRequestStatus& aStatus);
       
    90 
       
    91         /** 
       
    92         * Send message asynchronously.
       
    93         *
       
    94         * @since S60 5.0
       
    95         * @param aFunction function code
       
    96         * @param aArgs parameter to server
       
    97         * @param aStatus the request status object used to contain the 
       
    98         *                completion status of the request
       
    99         */
       
   100         void SendReceive(TInt aFunction, const TIpcArgs& aArgs,
       
   101                          TRequestStatus& aStatus);
       
   102        
       
   103     private:       
       
   104         TVersion iVersion;  
       
   105         TBuf<KMPXMaxServerImageNameLength> iServer;
       
   106         TBuf<KMPXMaxServerImageNameLength> iImage;      
       
   107     };
       
   108 
       
   109 #endif // RMPXSESSIONRETRY_H
       
   110 
       
   111 // End of file