IMPSengine/client/src/impswatchcli.cpp
changeset 0 094583676ce7
equal deleted inserted replaced
-1:000000000000 0:094583676ce7
       
     1 /*
       
     2 * Copyright (c) 2003-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: 
       
    15 * watcher class to im client.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #include    <e32base.h>
       
    21 #include    "impswatchcli.h"
       
    22 #include    "impsservercommon.h"
       
    23 #include    "impsclientsrv.h"
       
    24 
       
    25 // For two pending request + cancel
       
    26 const TUint KImpsDefMsgSlots = 3;
       
    27 
       
    28 
       
    29 // ================= MEMBER FUNCTIONS =======================
       
    30 
       
    31 // C++ default constructor can NOT contain any code, that
       
    32 // might leave.
       
    33 //
       
    34 
       
    35 EXPORT_C RImpsWatchClient::RImpsWatchClient() : RImpsEng( )
       
    36     {
       
    37     }
       
    38 
       
    39 
       
    40 // ---------------------------------------------------------
       
    41 // RImpsWatchClient::RegisterL
       
    42 // ---------------------------------------------------------
       
    43 //
       
    44 EXPORT_C TInt RImpsWatchClient::Register( )
       
    45    {
       
    46    return CreateSession( KImpsServerName, Version(), KImpsDefMsgSlots );
       
    47    }
       
    48 
       
    49 // -----------------------------------------------------------------------------
       
    50 // RImpsWatchClient::SendCIR( )
       
    51 // -----------------------------------------------------------------------------
       
    52 EXPORT_C void RImpsWatchClient::SendCIR( const TDesC8& aCookie )
       
    53    {
       
    54 
       
    55    // The server reads from the index 1. This is because the version 1.2
       
    56    // is also used this way
       
    57    SendReceive( EImpsServPush, TIpcArgs(TIpcArgs::ENothing, &aCookie) );
       
    58    }
       
    59 
       
    60 // -----------------------------------------------------------------------------
       
    61 // RImpsWatchClient::UnRegister( )
       
    62 // -----------------------------------------------------------------------------
       
    63 EXPORT_C void RImpsWatchClient::UnRegister( )
       
    64    {
       
    65    RSessionBase::Close( );
       
    66    }
       
    67 
       
    68 
       
    69 // -----------------------------------------------------------------------------
       
    70 // RImpsWatchClient::DoRegister()
       
    71 //
       
    72 // -----------------------------------------------------------------------------
       
    73 TInt RImpsWatchClient::DoRegister( CImpsHandler2* /*aHandler*/ )
       
    74     {
       
    75     return KErrNone;
       
    76     }
       
    77 
       
    78 //  End of File