presadap12/impsplugin/inc/mimpspluginaccesshandler.h
changeset 0 094583676ce7
equal deleted inserted replaced
-1:000000000000 0:094583676ce7
       
     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: This class is an access handler of one network session.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef __MIMPSPLUGINACCESSHANDLER_H__
       
    19 #define __MIMPSPLUGINACCESSHANDLER_H__
       
    20 
       
    21 
       
    22 //  INCLUDES
       
    23 #include <E32Std.h>
       
    24 
       
    25 
       
    26 // FORWARD DECLARATIONS
       
    27 class MPEngSessionStatusObserver;
       
    28 class TPEngWVCspServicesTree2;
       
    29 
       
    30 
       
    31 // CLASS DECLARATION
       
    32 
       
    33 /**
       
    34  *  Access handler of one network session
       
    35  *
       
    36  *  It is used to open/close network session
       
    37  *  and register its observers
       
    38  *
       
    39  *  @since 3.0
       
    40  */
       
    41 class MImpsPluginAccessHandler
       
    42     {
       
    43 
       
    44     public: //
       
    45 
       
    46         /**
       
    47          *  Log in to the presence server
       
    48          *  Log in is done with the parameters passed in the
       
    49          *  aLoginBuffer.
       
    50          *
       
    51          *  @since 3.0
       
    52          *
       
    53          *  @param aStatus TRequestStatus where completion of the
       
    54          *          log in is signaled
       
    55          *  @param aLoginBuffer login buffer containing
       
    56          *          data which is used to log in to the
       
    57          *          presence server.
       
    58          */
       
    59         virtual void LogInL( TRequestStatus& aStatus,
       
    60                              TDesC &aPassword,
       
    61                              TDesC &aClientId,
       
    62                              TDesC &aServiceAddress,
       
    63                              TInt32 aSapId ) = 0;
       
    64         /**
       
    65          *  Log out from the presence server
       
    66          *
       
    67          *  @since 3.0
       
    68          *
       
    69          *  @param aStatus TRequestStatus where completion of the
       
    70          *           log out is signaled.
       
    71          *  @return
       
    72          */
       
    73         virtual void LogOutL( TRequestStatus& aStatus ) = 0;
       
    74 
       
    75 
       
    76         /**
       
    77          *  Cancels active asynchronous operation
       
    78          *  There can be only one active asynchronous
       
    79          *  operation at the time ( LogInL, LogOutL)
       
    80          *
       
    81          *  @since 3.0
       
    82          */
       
    83         virtual void Cancel( TInt aReason ) = 0;
       
    84 
       
    85         /**
       
    86          *  Register session status observer
       
    87          *
       
    88          *  @since 3.0
       
    89          *
       
    90          *  @param aObserver session status observer
       
    91          */
       
    92         virtual void RegisterSessionObserverL(
       
    93             MPEngSessionStatusObserver& aObserver ) = 0;
       
    94 
       
    95         /**
       
    96          *  UnRegister session status observer
       
    97          *
       
    98          *  @since 3.0
       
    99          *  @param aObserver session status observer
       
   100          */
       
   101         virtual void UnregisterSessionObserver(
       
   102             MPEngSessionStatusObserver& aObserver ) = 0;
       
   103 
       
   104 
       
   105         /**
       
   106          *  Get session service capabilities
       
   107          *
       
   108          *  @since 3.0
       
   109          *
       
   110          *  @return session service capabilities
       
   111          */
       
   112         virtual TPEngWVCspServicesTree2& ServiceCapabilities() = 0;
       
   113 
       
   114     protected:  //Destructor
       
   115 
       
   116         /**
       
   117          *  Virtual inline destructor.
       
   118          *  Protected destructor to prohibits deletion trough interface.
       
   119          */
       
   120         virtual ~MImpsPluginAccessHandler() {};
       
   121     };
       
   122 
       
   123 
       
   124 #endif      //  __MIMPSACCESSHANDLER_H
       
   125 
       
   126 //  End of File
       
   127 
       
   128 
       
   129