PECengine/PluginServer2/ClntInc/RPEngPluginClient.h
changeset 0 094583676ce7
equal deleted inserted replaced
-1:000000000000 0:094583676ce7
       
     1 /*
       
     2 * Copyright (c) 2004 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:  See class description below.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef __RPENGPLUGINCLIENT_H__
       
    20 #define __RPENGPLUGINCLIENT_H__
       
    21 
       
    22 //  INCLUDES
       
    23 #include <e32std.h>
       
    24 
       
    25 //  CONSTANTS
       
    26 
       
    27 /**
       
    28 *  Main class of plugin server client side.
       
    29 *
       
    30 *  Features:
       
    31 *
       
    32 *   - Load individual or all plugins
       
    33 *       - Also load all plugins with exception list
       
    34 *   - Unload individual or all plugins
       
    35 *   - Observer plugin status
       
    36 *   - Shutdown or restart plugin server
       
    37 *   - Inform plugins about state changes
       
    38 *   - Verify if plugins are running
       
    39 *   - Get list of running plugins
       
    40 *   - Send messages to plugins
       
    41 *
       
    42 *  @lib PEngPlgSrv2.lib
       
    43 *  @since 3.0
       
    44 */
       
    45 class RPEngPluginClient : public RSessionBase
       
    46     {
       
    47 
       
    48     public:     // Constructors and destructors
       
    49 
       
    50         IMPORT_C RPEngPluginClient();
       
    51         IMPORT_C ~RPEngPluginClient();
       
    52 
       
    53     public: //Server management methods
       
    54 
       
    55         /**
       
    56         * Connects to plugin server. If the server is not running, it is started.
       
    57         *
       
    58         * @since 3.0
       
    59         * @param aOOMRate is deterministic OOM failure rate. Works only in debug builds. For testing only!
       
    60         * @return TInt is error code which indicates if connecting was successfull.
       
    61         */
       
    62         IMPORT_C TInt Connect( TInt aOOMRate = 0 );
       
    63         TInt ConnectWithoutStarting();
       
    64 
       
    65         /**
       
    66         * Close connection to plugin server. Doesn't shutdown server session.
       
    67         *
       
    68         * @since 3.0
       
    69         */
       
    70         IMPORT_C void Close();
       
    71 
       
    72         /**
       
    73         * Informs plugin server about network state changes
       
    74         *
       
    75         * @param aOnlineStatus is ETrue if network session was opened
       
    76         * @return TInt KErrNone if everything went ok
       
    77         * @since 3.0
       
    78         */
       
    79         TInt SetOnlineState( TBool aOnlineStatus );
       
    80 
       
    81         /**
       
    82         * Shutdown plugin server process
       
    83         *
       
    84         * Close called automatically.
       
    85         *
       
    86         * @since 3.0
       
    87         */
       
    88         TInt ShutdownServer();
       
    89 
       
    90     public: //Plugin handling methods
       
    91 
       
    92         /**
       
    93         * Count of plugins running at the moment.
       
    94         *
       
    95         * @since 3.0
       
    96         * @return TUint is count of plugins.
       
    97         */
       
    98         IMPORT_C TUint PluginCountL();
       
    99 
       
   100         /**
       
   101         * Gets the plugin's uid by the index
       
   102         *
       
   103         * @since 3.0
       
   104         * @param aIndex The index of the plugin in server's
       
   105         *               held plugins
       
   106         * @return
       
   107         */
       
   108         IMPORT_C TInt PluginUidL( TInt aIndex );
       
   109 
       
   110 
       
   111     };
       
   112 
       
   113 #endif      //  __RPENGPLUGINCLIENT_H__