wvuing/IMPSConnectionUI/Inc/CIMPSConnectionUiNGAgent.h
changeset 0 094583676ce7
equal deleted inserted replaced
-1:000000000000 0:094583676ce7
       
     1 /*
       
     2 * Copyright (c) 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:  IMPS Connection UI Agent.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef __CIMPSCONNECTIONUINGAGENT_H
       
    19 #define __CIMPSCONNECTIONUINGAGENT_H
       
    20 
       
    21 // INCLUDES
       
    22 #include <E32Base.h>
       
    23 #include <impspresenceconnectionuiconstsng.h>
       
    24 
       
    25 // FORWARD DECLARATION
       
    26 class CIMPSConnectionUiAgentImp;
       
    27 
       
    28 
       
    29 // CLASS DECLARATION
       
    30 /**
       
    31  * CIMPSConnectionUiAgent.
       
    32  *
       
    33  * Connection UI agent performs notification and query
       
    34  * services for the Connection UI's behalf on the client
       
    35  * application context. Client application should have
       
    36  * just one CIMPSConnectionUiAgent instance in its execution
       
    37  * context. Usually this is owned directly by the AppUI
       
    38  * or similar singleton instance.
       
    39  *
       
    40  * Client may itself deside which services to start and when.
       
    41  * However, the CIMPSConnectionUiAgent implementation is
       
    42  * designed so that the client may start all needed services
       
    43  * directly in its construction, and leave them so, without
       
    44  * any further actions. CIMPSConnectionUiAgent itself
       
    45  * follows the registered client group online status,
       
    46  * and acts based on that. Notification and query services
       
    47  * may be stopped however if the user navigates in the host
       
    48  * application to certain state where UI interrupts are not
       
    49  * allowed.
       
    50  *
       
    51  * @lib IMPSConnectionUi
       
    52  * @since 2.1
       
    53  */
       
    54 class CIMPSConnectionUiAgent : public CBase
       
    55     {
       
    56     public:  // Two-phased constructor and destructor
       
    57 
       
    58         /**
       
    59          * Two-phased constructor.
       
    60          * @param aClient The client for which handle
       
    61          * IMPS connection related UI notifications etc.
       
    62          */
       
    63         IMPORT_C static CIMPSConnectionUiAgent* NewL( TIMPSConnectionClient aClient );
       
    64 
       
    65         /**
       
    66          * Destructor.
       
    67          */
       
    68         IMPORT_C virtual ~CIMPSConnectionUiAgent();
       
    69 
       
    70 
       
    71 
       
    72     public:  // New service handling methods
       
    73 
       
    74 
       
    75         /**
       
    76          * Starts delivering IMPS connection related UI notifications
       
    77          * and queries in client process UI.
       
    78          *
       
    79          * It is up to client to decide which services
       
    80          * to start. Available services are listed in
       
    81          * TIMPSConnectionAgentUiService enumeration.
       
    82          *
       
    83          * Starting a service fails with leave if:
       
    84          * - if running out of resourcies (KErrNoMemory)
       
    85          * - or with other standard Symbian OS error codes
       
    86          *   coming from underlying implementation.
       
    87          *
       
    88          * @since 2.1
       
    89          * @see TIMPSConnectionAgentUiService
       
    90          * @param aService The service to start.
       
    91          * @return Service start status - always KErrNone.
       
    92          */
       
    93         IMPORT_C TInt StartServiceL( TIMPSConnectionUiAgentService aService );
       
    94 
       
    95 
       
    96         /**
       
    97          * Stops defined service.
       
    98          *
       
    99          * @since 2.1
       
   100          * @param aService The service to stop.
       
   101          * @return Service stop status - always KErrNone.
       
   102          */
       
   103         IMPORT_C TInt StopService( TIMPSConnectionUiAgentService aService );
       
   104 
       
   105 
       
   106         /**
       
   107          * Stops all previously started services.
       
   108          *
       
   109          * @since 2.1
       
   110          */
       
   111         IMPORT_C void StopAllServices();
       
   112 
       
   113 
       
   114         /**
       
   115          * Sets the new resource file to use in Connection UI.
       
   116          *
       
   117          * @param aNewResourceFile the new resourcefile to be used
       
   118          * @since 2.6
       
   119          */
       
   120         IMPORT_C void UseResourceFileL( const TDesC& aNewResourceFile );
       
   121 
       
   122     private: //Constructors.
       
   123 
       
   124         /**
       
   125          * C++ default constructor.
       
   126          */
       
   127         CIMPSConnectionUiAgent();
       
   128 
       
   129 
       
   130         /**
       
   131          * Symbian OS constructor.
       
   132          */
       
   133         void ConstructL( TIMPSConnectionClient aClient );
       
   134 
       
   135 
       
   136     private: //Data
       
   137         CIMPSConnectionUiAgentImp*        iImp;          ///<Implementation, owned
       
   138         TAny*                             iReserved1;    ///<Reserved, owned
       
   139     };
       
   140 
       
   141 
       
   142 
       
   143 #endif      //__CIMPSCONNECTIONUINGAGENT_H
       
   144 
       
   145 //  End of File
       
   146