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